Invoices
Invoices issued for your payments, and the issuer profile and number series they use.
Concepts, behaviour and examples: Invoices guide.
- GET
/v1/invoicesList invoices - POST
/v1/invoicesCreate a draft invoice - GET
/v1/invoices/:idRetrieve an invoice - PATCH
/v1/invoices/:idChange a draft invoice - DELETE
/v1/invoices/:idDelete a draft invoice - POST
/v1/invoices/:id/billingSupply billing details for an invoice - GET
/v1/invoicing/profileRetrieve the issuer profile - POST
/v1/invoicing/profileSave the issuer profile - GET
/v1/invoicing/seriesList number series - POST
/v1/invoicing/seriesCreate a number series - GET
/v1/invoices/:id/pdfDownload an invoice PDF - POST
/v1/invoices/:id/sendEmail an invoice - GET
/v1/invoicing/lookupLook up a company by CUI - GET
/v1/invoices/:id/emailsList an invoice's emails - POST
/v1/invoices/:id/finalizeFinalize a draft invoice - POST
/v1/invoices/:id/voidVoid an invoice - POST
/v1/invoices/:id/mark-uncollectibleMark an invoice uncollectible - POST
/v1/invoices/:id/mark-paidMark an invoice paid - POST
/v1/invoices/:id/payCharge an invoice now - GET
/v1/invoicing/collectionRead the collection settings - POST
/v1/invoicing/collectionSave the collection settings
GET /v1/invoices
List invoices
Cursor-paginated (limit, starting_after). Lines are included; the frozen issuer and billing copies are only on retrieve. Needs the invoices:read scope on an agent key.
- Authentication
- Merchant API key
- Effect
- Read-only.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Page size (1–100). · ≥ 1, ≤ 100, default 20 |
starting_after | string | no | Object ID; return objects after it (in the chosen order). · 26 chars |
order | "asc" | "desc" | no | asc or desc by creation (default desc). · default "desc" |
status | "draft" | "needs_details" | "open" | "paid" | "uncollectible" | "void" | "credited" | no | Filter by status. |
customer | string | no | Filter by customer id. |
payment | string | no | Filter by the payment the invoice was issued for. |
subscription | string | no | Filter by subscription id. |
number | string | no | Filter by the invoice number. |
created[gt] | string (date-time) | no | Only invoices with created after this ISO 8601 date or date-time. |
created[gte] | string (date-time) | no | Only invoices with created at or after this ISO 8601 date or date-time. |
created[lt] | string (date-time) | no | Only invoices with created before this ISO 8601 date or date-time. |
created[lte] | string (date-time) | no | Only invoices with created at or before this ISO 8601 date or date-time. |
due_date[gt] | string (date-time) | no | Only invoices with due_date after this ISO 8601 date or date-time. |
due_date[gte] | string (date-time) | no | Only invoices with due_date at or after this ISO 8601 date or date-time. |
due_date[lt] | string (date-time) | no | Only invoices with due_date before this ISO 8601 date or date-time. |
due_date[lte] | string (date-time) | no | Only invoices with due_date at or before this ISO 8601 date or date-time. |
Responses
| Status | Meaning | Body / error codes |
|---|---|---|
| 200 | Success. | object |
| 400 | Invalid query parameter (status, limit, starting_after, created[*], due_date[*]). | invalid_query_param |
| 401 | Missing or invalid API key. | authentication_error |
| 403 | Agent API key lacks the invoices:read scope. | scope_missing |
| 429 | Rate limited; honor retry-after. | rate_limit_exceeded too_many_auth_failures |
| 500 | Server error. | api_error |
Example response
{
"object": "list",
"url": "string",
"has_more": false,
"data": [
{
"object": "invoice",
"id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"merchant_id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"customer_id": "string",
"status": "draft",
"number": "string",
"collection_method": "charge_automatically",
"fiscal": false,
"reverse_charge": false,
"currency": "string",
"subtotal": 1,
"tax_total": 1,
"total": 1,
"amount_due": 1,
"amount_paid": 1,
"description": "string",
"footer": "string",
"metadata": {},
"payment_id": "string",
"payment_link_id": "string",
"subscription_id": "string",
"period_start": "2026-10-25T18:00:00.000Z",
"period_end": "2026-10-25T18:00:00.000Z",
"issue_date": "2026-10-25T18:00:00.000Z",
"due_date": "2026-10-25T18:00:00.000Z",
"finalized_at": "2026-10-25T18:00:00.000Z",
"paid_at": "2026-10-25T18:00:00.000Z",
"pdf_sha256": "string",
"lines": [
{
"id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"price_id": "string",
"description": "string",
"quantity": 1,
"unit_amount": 1,
"tax_rate_bp": 1,
"tax_amount": 1,
"total": 1
}
],
"issuer": {},
"billing": {
"type": "person",
"name": "string",
"email": "ana@example.com",
"phone": "string",
"country": "string",
"county": "string",
"city": "string",
"address": "string",
"postal_code": "string",
"language": "ro",
"company_name": "string",
"tax_id": "string",
"registration_number": "string",
"contact_person": "string",
"reference": "string"
},
"created_at": "2026-10-25T18:00:00.000Z",
"sent_at": "2026-10-25T18:00:00.000Z",
"email_status": "sent",
"pay_url": "string"
}
]
}POST /v1/invoices
Create a draft invoice
Creates a draft for a customer. Lines are net; VAT defaults to your issuer rate. With collection_method: send_invoice (the default) the payer pays on a hosted page; with charge_automatically the customer's default saved card is charged after the invoice is issued (finalizing fails with instrument_required when the customer has no card that can be charged). Emits invoice.created. Needs the invoices:write scope on an agent key. 404 when the customer is not yours.
- Authentication
- Merchant API key
- Effect
- Creates a draft; nothing is sent or charged.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Idempotency-Key | string | no | Makes retries safe: same key + body replays the stored response (idempotency-replayed: true); a different body, or an agent key or dashboard session reusing another credential's key, returns 409 idempotency_key_in_use. · ≤ 96 chars |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
customer_id | string | yes | |
collection_method | "send_invoice" | "charge_automatically" | no | send_invoice: the payer pays on a hosted page. charge_automatically: the customer's default saved card is charged when the invoice is issued, and again on your retry schedule if it is declined (see /v1/invoicing/collection). · default "send_invoice" |
currency | "RON" | "EUR" | "USD" | yes | |
lines | object[] | yes | ≥ 1 items, ≤ 100 items |
lines[].description | string | yes | ≤ 500 chars |
lines[].quantity | integer | no | ≥ 1, default 1 |
lines[].unit_amount | integer | yes | Net amount per unit, in minor units. · ≥ 0 |
lines[].tax_rate_bp | integer | no | VAT in basis points. Defaults to the issuer's default_vat_rate_bp when it is a VAT payer, else 0. · ≥ 0, ≤ 10000 |
days_until_due | integer | null | no | ≥ 0, ≤ 365 |
description | string | null | no | ≤ 500 chars |
footer | string | null | no | ≤ 1000 chars |
metadata | object | null | no |
Example request
{
"customer_id": "string",
"collection_method": "send_invoice",
"currency": "RON",
"lines": [
{
"description": "string",
"quantity": 1,
"unit_amount": 0,
"tax_rate_bp": 0
}
],
"days_until_due": 0,
"description": "string",
"footer": "string",
"metadata": {}
}Responses
| Status | Meaning | Body / error codes |
|---|---|---|
| 201 | The invoice. | Invoice |
| 400 | Invalid invoice fields or line total exceeds the maximum amount. | validation_failed amount_too_large |
| 401 | Missing or invalid API key. | authentication_error |
| 403 | Agent API key lacks the invoices:write scope. | scope_missing |
| 404 | Customer not found, or not yours. | resource_missing |
| 409 | Idempotency key reused with a different request body. | idempotency_key_in_use |
| 429 | Rate limited; honor retry-after. | rate_limit_exceeded too_many_auth_failures |
| 500 | Server error. | api_error |
Example response
{
"object": "invoice",
"id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"merchant_id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"customer_id": "string",
"status": "draft",
"number": "string",
"collection_method": "charge_automatically",
"fiscal": false,
"reverse_charge": false,
"currency": "string",
"subtotal": 1,
"tax_total": 1,
"total": 1,
"amount_due": 1,
"amount_paid": 1,
"description": "string",
"footer": "string",
"metadata": {},
"payment_id": "string",
"payment_link_id": "string",
"subscription_id": "string",
"period_start": "2026-10-25T18:00:00.000Z",
"period_end": "2026-10-25T18:00:00.000Z",
"issue_date": "2026-10-25T18:00:00.000Z",
"due_date": "2026-10-25T18:00:00.000Z",
"finalized_at": "2026-10-25T18:00:00.000Z",
"paid_at": "2026-10-25T18:00:00.000Z",
"pdf_sha256": "string",
"lines": [
{
"id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"price_id": "string",
"description": "string",
"quantity": 1,
"unit_amount": 1,
"tax_rate_bp": 1,
"tax_amount": 1,
"total": 1
}
],
"issuer": {},
"billing": {
"type": "person",
"name": "string",
"email": "ana@example.com",
"phone": "string",
"country": "string",
"county": "string",
"city": "string",
"address": "string",
"postal_code": "string",
"language": "ro",
"company_name": "string",
"tax_id": "string",
"registration_number": "string",
"contact_person": "string",
"reference": "string"
},
"created_at": "2026-10-25T18:00:00.000Z",
"sent_at": "2026-10-25T18:00:00.000Z",
"email_status": "sent",
"pay_url": "string"
}GET /v1/invoices/:id
Retrieve an invoice
Includes the frozen issuer and billing copies.
- Authentication
- Merchant API key
- Effect
- Read-only.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | Object ID (ULID). · 26 chars |
Responses
| Status | Meaning | Body / error codes |
|---|---|---|
| 200 | Success. | Invoice |
| 401 | Missing or invalid API key. | authentication_error |
| 403 | Agent API key lacks the invoices:read scope. | scope_missing |
| 404 | Invoice not found, or not yours. | resource_missing |
| 429 | Rate limited; honor retry-after. | rate_limit_exceeded too_many_auth_failures |
| 500 | Server error. | api_error |
Example response
{
"object": "invoice",
"id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"merchant_id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"customer_id": "string",
"status": "draft",
"number": "string",
"collection_method": "charge_automatically",
"fiscal": false,
"reverse_charge": false,
"currency": "string",
"subtotal": 1,
"tax_total": 1,
"total": 1,
"amount_due": 1,
"amount_paid": 1,
"description": "string",
"footer": "string",
"metadata": {},
"payment_id": "string",
"payment_link_id": "string",
"subscription_id": "string",
"period_start": "2026-10-25T18:00:00.000Z",
"period_end": "2026-10-25T18:00:00.000Z",
"issue_date": "2026-10-25T18:00:00.000Z",
"due_date": "2026-10-25T18:00:00.000Z",
"finalized_at": "2026-10-25T18:00:00.000Z",
"paid_at": "2026-10-25T18:00:00.000Z",
"pdf_sha256": "string",
"lines": [
{
"id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"price_id": "string",
"description": "string",
"quantity": 1,
"unit_amount": 1,
"tax_rate_bp": 1,
"tax_amount": 1,
"total": 1
}
],
"issuer": {},
"billing": {
"type": "person",
"name": "string",
"email": "ana@example.com",
"phone": "string",
"country": "string",
"county": "string",
"city": "string",
"address": "string",
"postal_code": "string",
"language": "ro",
"company_name": "string",
"tax_id": "string",
"registration_number": "string",
"contact_person": "string",
"reference": "string"
},
"created_at": "2026-10-25T18:00:00.000Z",
"sent_at": "2026-10-25T18:00:00.000Z",
"email_status": "sent",
"pay_url": "string"
}PATCH /v1/invoices/:id
Change a draft invoice
Changes a draft: any of the fields, and the whole list when lines is given. 409 invoice_not_editable once it is issued.
- Authentication
- Merchant API key
- Effect
- Changes a draft.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | Object ID (ULID). · 26 chars |
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Idempotency-Key | string | no | Makes retries safe: same key + body replays the stored response (idempotency-replayed: true); a different body, or an agent key or dashboard session reusing another credential's key, returns 409 idempotency_key_in_use. · ≤ 96 chars |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
customer_id | string | no | |
currency | "RON" | "EUR" | "USD" | no | |
lines | object[] | no | ≥ 1 items, ≤ 100 items |
lines[].description | string | yes | ≤ 500 chars |
lines[].quantity | integer | no | ≥ 1, default 1 |
lines[].unit_amount | integer | yes | Net amount per unit, in minor units. · ≥ 0 |
lines[].tax_rate_bp | integer | no | VAT in basis points. Defaults to the issuer's default_vat_rate_bp when it is a VAT payer, else 0. · ≥ 0, ≤ 10000 |
days_until_due | integer | null | no | ≥ 0, ≤ 365 |
description | string | null | no | ≤ 500 chars |
footer | string | null | no | ≤ 1000 chars |
metadata | object | null | no |
Example request
{
"customer_id": "string",
"currency": "RON",
"lines": [
{
"description": "string",
"quantity": 1,
"unit_amount": 0,
"tax_rate_bp": 0
}
],
"days_until_due": 0,
"description": "string",
"footer": "string",
"metadata": {}
}Responses
| Status | Meaning | Body / error codes |
|---|---|---|
| 200 | The invoice. | Invoice |
| 400 | Invalid invoice fields or line total exceeds the maximum amount. | validation_failed amount_too_large |
| 401 | Missing or invalid API key. | authentication_error |
| 403 | Agent API key lacks the invoices:write scope. | scope_missing |
| 404 | Invoice or customer not found, or not yours. | resource_missing |
| 409 | Invoice is no longer a draft, or idempotency key reused with a different body. | invoice_not_editable idempotency_key_in_use |
| 429 | Rate limited; honor retry-after. | rate_limit_exceeded too_many_auth_failures |
| 500 | Server error. | api_error |
Example response
{
"object": "invoice",
"id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"merchant_id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"customer_id": "string",
"status": "draft",
"number": "string",
"collection_method": "charge_automatically",
"fiscal": false,
"reverse_charge": false,
"currency": "string",
"subtotal": 1,
"tax_total": 1,
"total": 1,
"amount_due": 1,
"amount_paid": 1,
"description": "string",
"footer": "string",
"metadata": {},
"payment_id": "string",
"payment_link_id": "string",
"subscription_id": "string",
"period_start": "2026-10-25T18:00:00.000Z",
"period_end": "2026-10-25T18:00:00.000Z",
"issue_date": "2026-10-25T18:00:00.000Z",
"due_date": "2026-10-25T18:00:00.000Z",
"finalized_at": "2026-10-25T18:00:00.000Z",
"paid_at": "2026-10-25T18:00:00.000Z",
"pdf_sha256": "string",
"lines": [
{
"id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"price_id": "string",
"description": "string",
"quantity": 1,
"unit_amount": 1,
"tax_rate_bp": 1,
"tax_amount": 1,
"total": 1
}
],
"issuer": {},
"billing": {
"type": "person",
"name": "string",
"email": "ana@example.com",
"phone": "string",
"country": "string",
"county": "string",
"city": "string",
"address": "string",
"postal_code": "string",
"language": "ro",
"company_name": "string",
"tax_id": "string",
"registration_number": "string",
"contact_person": "string",
"reference": "string"
},
"created_at": "2026-10-25T18:00:00.000Z",
"sent_at": "2026-10-25T18:00:00.000Z",
"email_status": "sent",
"pay_url": "string"
}DELETE /v1/invoices/:id
Delete a draft invoice
Retires a draft that was never issued: it becomes void with no number (fiscal records are never erased). 409 invoice_not_editable for an issued invoice; void those instead.
- Authentication
- Merchant API key
- Effect
- Retires a draft.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | Object ID (ULID). · 26 chars |
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Idempotency-Key | string | no | Makes retries safe: same key + body replays the stored response (idempotency-replayed: true); a different body, or an agent key or dashboard session reusing another credential's key, returns 409 idempotency_key_in_use. · ≤ 96 chars |
Responses
| Status | Meaning | Body / error codes |
|---|---|---|
| 200 | Retired. | object |
| 401 | Missing or invalid API key. | authentication_error |
| 403 | Agent API keys cannot delete invoices. | scope_missing |
| 404 | Invoice not found, or not yours. | resource_missing |
| 409 | Invoice was already issued (void it instead), or idempotency key reused with a different body. | invoice_not_editable idempotency_key_in_use |
| 429 | Rate limited; honor retry-after. | rate_limit_exceeded too_many_auth_failures |
| 500 | Server error. | api_error |
Example response
{
"id": "string",
"object": "invoice",
"deleted": true
}POST /v1/invoices/:id/billing
Supply billing details for an invoice
For a send_invoice invoice waiting in needs_details after being finalized with incomplete customer billing details. Once the details are complete, the invoice receives its number and opens as open with pay_url; otherwise the response lists missing_fields and the invoice stays in needs_details. An invoice that has already been issued cannot be changed: 409 invoice_not_editable.
- Authentication
- Merchant API key
- Effect
- Issues the invoice when the details are complete; emits
invoice.finalized.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | Object ID (ULID). · 26 chars |
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Idempotency-Key | string | no | Makes retries safe: same key + body replays the stored response (idempotency-replayed: true); a different body, or an agent key or dashboard session reusing another credential's key, returns 409 idempotency_key_in_use. · ≤ 96 chars |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
type | "person" | "company" | no | A person is invoiced by name; a company by legal name and tax id. No national id (CNP) is collected. · default "person" |
name | string | no | Person: the full name. · ≤ 255 chars |
email | string (email) | no | Where the invoice is sent (defaults to the customer's email). |
phone | string | no | ≤ 50 chars |
country | string | no | ISO 3166-1 alpha-2, e.g. RO. · 2 chars |
county | string | no | ≤ 100 chars |
city | string | no | ≤ 100 chars |
address | string | no | Street and number. · ≤ 255 chars |
postal_code | string | no | ≤ 16 chars |
language | "ro" | "en" | no | |
company_name | string | no | Company only: the legal name. · ≤ 255 chars |
tax_id | string | no | Company only: the CUI/CIF for Romania (checksum validated, optional RO prefix) or the VAT id of another EU member state (format validated). · ≤ 40 chars |
registration_number | string | no | Company only: trade register number (J-number). · ≤ 40 chars |
contact_person | string | no | ≤ 255 chars |
reference | string | no | Company only: purchase order or billing reference. · ≤ 255 chars |
Example request
{
"type": "person",
"name": "string",
"email": "ana@example.com",
"phone": "string",
"country": "string",
"county": "string",
"city": "string",
"address": "string",
"postal_code": "string",
"language": "ro",
"company_name": "string",
"tax_id": "string",
"registration_number": "string",
"contact_person": "string",
"reference": "string"
}Responses
| Status | Meaning | Body / error codes |
|---|---|---|
| 200 | Success. | object |
| 400 | Invalid billing details (e.g. invalid Romanian CUI/CNP checksum or postal code). | validation_failed |
| 401 | Missing or invalid API key. | authentication_error |
| 403 | Agent API key lacks the invoices:write scope. | scope_missing |
| 404 | Invoice not found, or not yours. | resource_missing |
| 409 | Invoice has already been issued, invoicing or NETOPIA Payments is not configured, or idempotency key reused with a different body. | invoice_not_editable issuer_profile_incomplete netopia_not_configured idempotency_key_in_use |
| 429 | Rate limited; honor retry-after. | rate_limit_exceeded too_many_auth_failures |
| 500 | Server error. | api_error |
Example response
{
"object": "invoice",
"id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"merchant_id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"customer_id": "string",
"status": "draft",
"number": "string",
"collection_method": "charge_automatically",
"fiscal": false,
"reverse_charge": false,
"currency": "string",
"subtotal": 1,
"tax_total": 1,
"total": 1,
"amount_due": 1,
"amount_paid": 1,
"description": "string",
"footer": "string",
"metadata": {},
"payment_id": "string",
"payment_link_id": "string",
"subscription_id": "string",
"period_start": "2026-10-25T18:00:00.000Z",
"period_end": "2026-10-25T18:00:00.000Z",
"issue_date": "2026-10-25T18:00:00.000Z",
"due_date": "2026-10-25T18:00:00.000Z",
"finalized_at": "2026-10-25T18:00:00.000Z",
"paid_at": "2026-10-25T18:00:00.000Z",
"pdf_sha256": "string",
"lines": [
{
"id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"price_id": "string",
"description": "string",
"quantity": 1,
"unit_amount": 1,
"tax_rate_bp": 1,
"tax_amount": 1,
"total": 1
}
],
"issuer": {},
"billing": {
"type": "person",
"name": "string",
"email": "ana@example.com",
"phone": "string",
"country": "string",
"county": "string",
"city": "string",
"address": "string",
"postal_code": "string",
"language": "ro",
"company_name": "string",
"tax_id": "string",
"registration_number": "string",
"contact_person": "string",
"reference": "string"
},
"created_at": "2026-10-25T18:00:00.000Z",
"sent_at": "2026-10-25T18:00:00.000Z",
"email_status": "sent",
"pay_url": "string",
"missing_fields": [
"string"
]
}GET /v1/invoicing/profile
Retrieve the issuer profile
The supplier named on every invoice: your own company details. Invoicing is off until a profile is saved. Agent keys with the invoices:read scope can read it (MCP tool get_company_profile); only you can change it.
- Authentication
- Merchant API key
- Effect
- Read-only.
Responses
| Status | Meaning | Body / error codes |
|---|---|---|
| 200 | Success. | InvoicingProfile |
| 401 | Missing or invalid API key. | authentication_error |
| 403 | Agent API key lacks the invoices:read scope. | scope_missing |
| 429 | Rate limited; honor retry-after. | rate_limit_exceeded too_many_auth_failures |
| 500 | Server error. | api_error |
Example response
{
"object": "invoicing_profile",
"invoicing_enabled": false,
"profile": {
"legal_name": "string",
"country": "string",
"county": "string",
"city": "string",
"address": "string",
"postal_code": "string",
"tax_id": "string",
"registration_number": "string",
"vat_payer": false,
"vat_on_collection": false,
"default_vat_rate_bp": 0,
"iban": "string",
"email": "ana@example.com",
"phone": "string",
"language": "ro",
"default_days_until_due": 14,
"footer": "string",
"invoice_prefix": "INV"
}
}POST /v1/invoicing/profile
Save the issuer profile
Replaces the profile. You are the supplier and issue every invoice; Payware generates and delivers it on your behalf. invoicing_enabled (default true) turns invoicing on for new payments. Test accounts issue non-fiscal sample invoices.
- Authentication
- Merchant API key
- Effect
- Saves the profile; invoices are issued for later payments only.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Idempotency-Key | string | no | Makes retries safe: same key + body replays the stored response (idempotency-replayed: true); a different body, or an agent key or dashboard session reusing another credential's key, returns 409 idempotency_key_in_use. · ≤ 96 chars |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
legal_name | string | yes | ≤ 255 chars |
country | string | yes | 2 chars |
county | string | no | ≤ 100 chars |
city | string | yes | ≤ 100 chars |
address | string | yes | ≤ 255 chars |
postal_code | string | no | ≤ 16 chars |
tax_id | string | yes | CUI/CIF (checksum validated for RO), with the RO prefix when VAT-registered. · ≤ 20 chars |
registration_number | string | no | ≤ 30 chars |
vat_payer | boolean | no | default false |
vat_on_collection | boolean | no | default false |
default_vat_rate_bp | integer | no | VAT rate in basis points, treated as included in the amount paid. Must be 0 unless vat_payer, and above 0 when vat_payer. · ≥ 0, ≤ 10000, default 0 |
iban | string | no | ≤ 34 chars |
email | string (email) | no | ≤ 255 chars |
phone | string | no | ≤ 50 chars |
language | "ro" | "en" | no | default "ro" |
default_days_until_due | integer | no | ≥ 0, ≤ 365, default 14 |
footer | string | no | ≤ 1000 chars |
invoice_prefix | string | no | default "INV" |
invoicing_enabled | boolean | no | default true |
Example request
{
"legal_name": "string",
"country": "string",
"county": "string",
"city": "string",
"address": "string",
"postal_code": "string",
"tax_id": "string",
"registration_number": "string",
"vat_payer": false,
"vat_on_collection": false,
"default_vat_rate_bp": 0,
"iban": "string",
"email": "ana@example.com",
"phone": "string",
"language": "ro",
"default_days_until_due": 14,
"footer": "string",
"invoice_prefix": "INV",
"invoicing_enabled": true
}Responses
| Status | Meaning | Body / error codes |
|---|---|---|
| 200 | Success. | InvoicingProfile |
| 400 | Invalid issuer profile fields (e.g. invalid CUI checksum, postal code, or VAT rate mismatch). | validation_failed |
| 401 | Missing or invalid API key. | authentication_error |
| 403 | Agent API keys cannot change the issuer profile. | scope_missing |
| 409 | Idempotency key reused with a different request body. | idempotency_key_in_use |
| 429 | Rate limited; honor retry-after. | rate_limit_exceeded too_many_auth_failures |
| 500 | Server error. | api_error |
Example response
{
"object": "invoicing_profile",
"invoicing_enabled": false,
"profile": {
"legal_name": "string",
"country": "string",
"county": "string",
"city": "string",
"address": "string",
"postal_code": "string",
"tax_id": "string",
"registration_number": "string",
"vat_payer": false,
"vat_on_collection": false,
"default_vat_rate_bp": 0,
"iban": "string",
"email": "ana@example.com",
"phone": "string",
"language": "ro",
"default_days_until_due": 14,
"footer": "string",
"invoice_prefix": "INV"
}
}GET /v1/invoicing/series
List number series
Not available to agent keys.
- Authentication
- Merchant API key
- Effect
- Read-only.
Responses
| Status | Meaning | Body / error codes |
|---|---|---|
| 200 | Success. | object |
| 401 | Missing or invalid API key. | authentication_error |
| 403 | Agent API keys cannot list invoice number series. | scope_missing |
| 429 | Rate limited; honor retry-after. | rate_limit_exceeded too_many_auth_failures |
| 500 | Server error. | api_error |
Example response
{
"object": "list",
"url": "string",
"has_more": false,
"data": [
{
"object": "invoice_series",
"id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"kind": "invoice",
"prefix": "string",
"next_number": 1,
"is_default": false,
"created_at": "2026-10-25T18:00:00.000Z"
}
]
}POST /v1/invoicing/series
Create a number series
Numbers within a series are strictly increasing and gap-free. A default invoice series is created from invoice_prefix the first time an invoice is issued.
- Authentication
- Merchant API key
- Effect
- Creates a series.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Idempotency-Key | string | no | Makes retries safe: same key + body replays the stored response (idempotency-replayed: true); a different body, or an agent key or dashboard session reusing another credential's key, returns 409 idempotency_key_in_use. · ≤ 96 chars |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
kind | "invoice" | "credit_note" | no | default "invoice" |
prefix | string | yes | |
next_number | integer | no | ≥ 1 |
make_default | boolean | no |
Example request
{
"kind": "invoice",
"prefix": "string",
"next_number": 1,
"make_default": false
}Responses
| Status | Meaning | Body / error codes |
|---|---|---|
| 201 | Success. | InvoiceSeries |
| 400 | Invalid series prefix or starting number. | validation_failed |
| 401 | Missing or invalid API key. | authentication_error |
| 403 | Agent API keys cannot manage invoice number series. | scope_missing |
| 409 | Series prefix already exists, or idempotency key reused with a different body. | series_exists idempotency_key_in_use |
| 429 | Rate limited; honor retry-after. | rate_limit_exceeded too_many_auth_failures |
| 500 | Server error. | api_error |
Example response
{
"object": "invoice_series",
"id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"kind": "invoice",
"prefix": "string",
"next_number": 1,
"is_default": false,
"created_at": "2026-10-25T18:00:00.000Z"
}GET /v1/invoices/:id/pdf
Download an invoice PDF
An A4 PDF in the invoice's language (the billing details' language, else the issuer's), rendered from the issuer and billing copies frozen at issue, with an embedded font. The exact bytes are stored (encrypted) the first time the invoice is rendered, and every later download, and the copy in the email, is that same file, so an invoice never changes when Payware's layout does. 409 invoice_not_issued for a draft or an invoice in needs_details. A test account's PDF says it has no fiscal value.
- Authentication
- Merchant API key
- Effect
- Read-only.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | Object ID (ULID). · 26 chars |
Responses
| Status | Meaning | Body / error codes |
|---|---|---|
| 200 | The PDF. | |
| 401 | Missing or invalid API key. | authentication_error |
| 403 | Agent API key lacks the invoices:read scope. | scope_missing |
| 404 | Invoice not found, or not yours. | resource_missing |
| 409 | Invoice has not been issued yet (draft or needs_details). | invoice_not_issued |
| 429 | Rate limited; honor retry-after. | rate_limit_exceeded too_many_auth_failures |
| 500 | Server error. | api_error |
POST /v1/invoices/:id/send
Email an invoice
Emails the invoice with its PDF attached to the billing email (or, while it waits for details, the request to complete them), and returns the signed link to the payer's page so you can pass it on yourself. Links expire after 90 days; sending again makes a new one. Pass email to send it to another address instead, for example a corrected one after a bounce: the invoice keeps the billing details it was issued with, and email_status returns to sent. 409 invoice_not_sent when there is no address to send to or the message could not be sent; 409 invoice_not_issued for a draft.
- Authentication
- Merchant API key
- Effect
- Sends an email.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | Object ID (ULID). · 26 chars |
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Idempotency-Key | string | no | Makes retries safe: same key + body replays the stored response (idempotency-replayed: true); a different body, or an agent key or dashboard session reusing another credential's key, returns 409 idempotency_key_in_use. · ≤ 96 chars |
Request body (optional)
| Field | Type | Required | Description |
|---|---|---|---|
email | string (email) | no | Send to this address instead of the invoice's billing email. · ≤ 255 chars |
Example request
{
"email": "ana@example.com"
}Responses
| Status | Meaning | Body / error codes |
|---|---|---|
| 200 | Success. | object |
| 400 | Invalid override email address or malformed JSON body. | validation_failed invalid_json |
| 401 | Missing or invalid API key. | authentication_error |
| 403 | An agent key without the invoices:write scope, or an agent key sending to another address. | scope_missing agent_not_allowed |
| 404 | Invoice not found, or not yours. | resource_missing |
| 409 | Invoice is voided or still a draft, no recipient email / mail delivery failed, or idempotency key reused with a different body. | invoice_state_invalid invoice_not_issued invoice_not_sent idempotency_key_in_use |
| 429 | Rate limited; honor retry-after. | rate_limit_exceeded too_many_auth_failures |
| 500 | Server error. | api_error |
Example response
{
"object": "invoice_delivery",
"invoice_id": "string",
"sent": false,
"url": "https://example.com/hooks/payware"
}GET /v1/invoicing/lookup
Look up a company by CUI
Fetches the registered details of a Romanian company from ANAF (the public VAT-payer service, v9) so the issuer profile can be filled from a CUI alone. The answer has the profile's field names; tax_id carries the RO prefix when ANAF lists the company as a VAT payer, and active is false for an inactive or struck-off company. The email is not published by ANAF. Romanian CUIs only. Not available to agent keys.
- Authentication
- Merchant API key
- Effect
- Read-only.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
tax_id | string | yes | The CUI, with or without the RO prefix. |
Responses
| Status | Meaning | Body / error codes |
|---|---|---|
| 200 | Success. | CompanyLookup |
| 400 | Not a valid CUI. | parameter_missing parameter_invalid |
| 401 | Missing or invalid API key. | authentication_error |
| 403 | Agent API keys cannot call CUI lookup. | scope_missing |
| 404 | ANAF has no company with that CUI. | resource_missing |
| 429 | Rate limited; honor retry-after. | rate_limit_exceeded too_many_auth_failures |
| 500 | Server error. | api_error |
| 502 | ANAF did not answer; fill the details in by hand. | lookup_unavailable |
Example response
{
"object": "company_lookup",
"source": "anaf",
"tax_id": "string",
"country": "RO",
"legal_name": "string",
"county": "string",
"city": "string",
"address": "string",
"postal_code": "string",
"registration_number": "string",
"phone": "string",
"iban": "string",
"vat_payer": false,
"active": false
}GET /v1/invoices/:id/emails
List an invoice's emails
The emails sent for the invoice, newest first, and what happened to each: sent, bounced (the address does not exist or refused it) or complained (spam report), with the events behind it. A reply from the payer shows who wrote and the subject; its text is forwarded to your issuer email address and not stored. 404 for an invoice that is not yours.
- Authentication
- Merchant API key
- Effect
- Read-only.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | Object ID (ULID). · 26 chars |
Responses
| Status | Meaning | Body / error codes |
|---|---|---|
| 200 | Success. | object |
| 401 | Missing or invalid API key. | authentication_error |
| 403 | Agent API key lacks the invoices:read scope. | scope_missing |
| 404 | Invoice not found, or not yours. | resource_missing |
| 429 | Rate limited; honor retry-after. | rate_limit_exceeded too_many_auth_failures |
| 500 | Server error. | api_error |
Example response
{
"object": "list",
"url": "string",
"has_more": false,
"data": [
{
"object": "invoice_email",
"id": "string",
"kind": "invoice_details",
"status": "queued",
"to": "ana@example.com",
"sent_at": "2026-10-25T18:00:00.000Z",
"last_event_at": "2026-10-25T18:00:00.000Z",
"created_at": "2026-10-25T18:00:00.000Z",
"events": [
{
"type": "bounce_hard",
"created_at": "2026-10-25T18:00:00.000Z",
"detail": {
"class": null,
"status": null,
"action": null,
"diagnostic": null,
"from": null,
"subject": null
}
}
]
}
]
}POST /v1/invoices/:id/finalize
Finalize a draft invoice
Issues the draft: allocates the next gap-free number, freezes your issuer details and the billing details, and opens the hosted pay page (pay_url). Billing details missing: the invoice waits as needs_details with missing_fields. Does not email it: call /send. 409 invoice_not_editable unless it is a draft; 409 issuer_profile_incomplete when invoicing is off; 409 netopia_not_configured. For a charge_automatically invoice the first charge of the customer's saved card is made by this request, and the response already reports the outcome: paid, or open after a decline, with the next attempt scheduled (invoice.payment_failed). A charge NETOPIA Payments has not answered yet leaves the invoice open until its callback.
- Authentication
- Merchant API key
- Effect
- Allocates an invoice number and opens a pay page.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | Object ID (ULID). · 26 chars |
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Idempotency-Key | string | no | Makes retries safe: same key + body replays the stored response (idempotency-replayed: true); a different body, or an agent key or dashboard session reusing another credential's key, returns 409 idempotency_key_in_use. · ≤ 96 chars |
Responses
| Status | Meaning | Body / error codes |
|---|---|---|
| 200 | The invoice. | object |
| 401 | Missing or invalid API key. | authentication_error |
| 403 | Agent API key lacks the invoices:write scope. | scope_missing |
| 404 | Invoice not found, or not yours. | resource_missing |
| 409 | Invoice is not a draft, has no lines / zero total, invoicing or NETOPIA Payments is not configured, or idempotency key reused with a different body. | invoice_not_editable issuer_profile_incomplete invoice_empty netopia_not_configured idempotency_key_in_use |
| 429 | Rate limited; honor retry-after. | rate_limit_exceeded too_many_auth_failures |
| 500 | Server error. | api_error |
Example response
{
"object": "invoice",
"id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"merchant_id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"customer_id": "string",
"status": "draft",
"number": "string",
"collection_method": "charge_automatically",
"fiscal": false,
"reverse_charge": false,
"currency": "string",
"subtotal": 1,
"tax_total": 1,
"total": 1,
"amount_due": 1,
"amount_paid": 1,
"description": "string",
"footer": "string",
"metadata": {},
"payment_id": "string",
"payment_link_id": "string",
"subscription_id": "string",
"period_start": "2026-10-25T18:00:00.000Z",
"period_end": "2026-10-25T18:00:00.000Z",
"issue_date": "2026-10-25T18:00:00.000Z",
"due_date": "2026-10-25T18:00:00.000Z",
"finalized_at": "2026-10-25T18:00:00.000Z",
"paid_at": "2026-10-25T18:00:00.000Z",
"pdf_sha256": "string",
"lines": [
{
"id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"price_id": "string",
"description": "string",
"quantity": 1,
"unit_amount": 1,
"tax_rate_bp": 1,
"tax_amount": 1,
"total": 1
}
],
"issuer": {},
"billing": {
"type": "person",
"name": "string",
"email": "ana@example.com",
"phone": "string",
"country": "string",
"county": "string",
"city": "string",
"address": "string",
"postal_code": "string",
"language": "ro",
"company_name": "string",
"tax_id": "string",
"registration_number": "string",
"contact_person": "string",
"reference": "string"
},
"created_at": "2026-10-25T18:00:00.000Z",
"sent_at": "2026-10-25T18:00:00.000Z",
"email_status": "sent",
"pay_url": "string",
"missing_fields": [
"string"
]
}POST /v1/invoices/:id/void
Void an invoice
Voids an unpaid, issued invoice and closes its pay page. 409 invoice_payment_pending while a payment on it is in progress or was taken; 409 invoice_state_invalid for a paid or void invoice. Not available to agent keys.
- Authentication
- Merchant API key
- Effect
- Voids the invoice; closes its pay page.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | Object ID (ULID). · 26 chars |
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Idempotency-Key | string | no | Makes retries safe: same key + body replays the stored response (idempotency-replayed: true); a different body, or an agent key or dashboard session reusing another credential's key, returns 409 idempotency_key_in_use. · ≤ 96 chars |
Responses
| Status | Meaning | Body / error codes |
|---|---|---|
| 200 | The invoice. | Invoice |
| 401 | Missing or invalid API key. | authentication_error |
| 403 | Agent API keys cannot void invoices. | scope_missing |
| 404 | Invoice not found, or not yours. | resource_missing |
| 409 | Invoice cannot be voided in its current status, a payment is in progress or settled, or idempotency key reused with a different body. | invoice_state_invalid invoice_payment_pending idempotency_key_in_use |
| 429 | Rate limited; honor retry-after. | rate_limit_exceeded too_many_auth_failures |
| 500 | Server error. | api_error |
Example response
{
"object": "invoice",
"id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"merchant_id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"customer_id": "string",
"status": "draft",
"number": "string",
"collection_method": "charge_automatically",
"fiscal": false,
"reverse_charge": false,
"currency": "string",
"subtotal": 1,
"tax_total": 1,
"total": 1,
"amount_due": 1,
"amount_paid": 1,
"description": "string",
"footer": "string",
"metadata": {},
"payment_id": "string",
"payment_link_id": "string",
"subscription_id": "string",
"period_start": "2026-10-25T18:00:00.000Z",
"period_end": "2026-10-25T18:00:00.000Z",
"issue_date": "2026-10-25T18:00:00.000Z",
"due_date": "2026-10-25T18:00:00.000Z",
"finalized_at": "2026-10-25T18:00:00.000Z",
"paid_at": "2026-10-25T18:00:00.000Z",
"pdf_sha256": "string",
"lines": [
{
"id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"price_id": "string",
"description": "string",
"quantity": 1,
"unit_amount": 1,
"tax_rate_bp": 1,
"tax_amount": 1,
"total": 1
}
],
"issuer": {},
"billing": {
"type": "person",
"name": "string",
"email": "ana@example.com",
"phone": "string",
"country": "string",
"county": "string",
"city": "string",
"address": "string",
"postal_code": "string",
"language": "ro",
"company_name": "string",
"tax_id": "string",
"registration_number": "string",
"contact_person": "string",
"reference": "string"
},
"created_at": "2026-10-25T18:00:00.000Z",
"sent_at": "2026-10-25T18:00:00.000Z",
"email_status": "sent",
"pay_url": "string"
}POST /v1/invoices/:id/mark-uncollectible
Mark an invoice uncollectible
An open invoice you have given up collecting. It can still be paid on its pay page, marked paid or voided.
- Authentication
- Merchant API key
- Effect
- Changes the invoice status.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | Object ID (ULID). · 26 chars |
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Idempotency-Key | string | no | Makes retries safe: same key + body replays the stored response (idempotency-replayed: true); a different body, or an agent key or dashboard session reusing another credential's key, returns 409 idempotency_key_in_use. · ≤ 96 chars |
Responses
| Status | Meaning | Body / error codes |
|---|---|---|
| 200 | The invoice. | Invoice |
| 401 | Missing or invalid API key. | authentication_error |
| 403 | Agent API keys cannot mark invoices uncollectible. | scope_missing |
| 404 | Invoice not found, or not yours. | resource_missing |
| 409 | Only an open invoice can be marked uncollectible, or idempotency key reused with a different body. | invoice_state_invalid idempotency_key_in_use |
| 429 | Rate limited; honor retry-after. | rate_limit_exceeded too_many_auth_failures |
| 500 | Server error. | api_error |
Example response
{
"object": "invoice",
"id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"merchant_id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"customer_id": "string",
"status": "draft",
"number": "string",
"collection_method": "charge_automatically",
"fiscal": false,
"reverse_charge": false,
"currency": "string",
"subtotal": 1,
"tax_total": 1,
"total": 1,
"amount_due": 1,
"amount_paid": 1,
"description": "string",
"footer": "string",
"metadata": {},
"payment_id": "string",
"payment_link_id": "string",
"subscription_id": "string",
"period_start": "2026-10-25T18:00:00.000Z",
"period_end": "2026-10-25T18:00:00.000Z",
"issue_date": "2026-10-25T18:00:00.000Z",
"due_date": "2026-10-25T18:00:00.000Z",
"finalized_at": "2026-10-25T18:00:00.000Z",
"paid_at": "2026-10-25T18:00:00.000Z",
"pdf_sha256": "string",
"lines": [
{
"id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"price_id": "string",
"description": "string",
"quantity": 1,
"unit_amount": 1,
"tax_rate_bp": 1,
"tax_amount": 1,
"total": 1
}
],
"issuer": {},
"billing": {
"type": "person",
"name": "string",
"email": "ana@example.com",
"phone": "string",
"country": "string",
"county": "string",
"city": "string",
"address": "string",
"postal_code": "string",
"language": "ro",
"company_name": "string",
"tax_id": "string",
"registration_number": "string",
"contact_person": "string",
"reference": "string"
},
"created_at": "2026-10-25T18:00:00.000Z",
"sent_at": "2026-10-25T18:00:00.000Z",
"email_status": "sent",
"pay_url": "string"
}POST /v1/invoices/:id/mark-paid
Mark an invoice paid
Records a payment made outside Payware (a bank transfer) and closes the pay page. Requires a note (why, e.g. the transfer reference); optional paid_at (ISO 8601). Emits invoice.paid with paid_out_of_band: true and the note. 409 invoice_payment_pending while a card payment on it is in progress. Not available to agent keys.
- Authentication
- Merchant API key
- Effect
- Marks the invoice paid; closes its pay page.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | Object ID (ULID). · 26 chars |
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Idempotency-Key | string | no | Makes retries safe: same key + body replays the stored response (idempotency-replayed: true); a different body, or an agent key or dashboard session reusing another credential's key, returns 409 idempotency_key_in_use. · ≤ 96 chars |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
note | string | yes | Why, for example the transfer reference. · ≥ 1 chars, ≤ 500 chars |
paid_at | string (date-time) | no |
Example request
{
"note": "string",
"paid_at": "2026-10-25T18:00:00.000Z"
}Responses
| Status | Meaning | Body / error codes |
|---|---|---|
| 200 | The invoice. | Invoice |
| 400 | Missing or invalid note or paid_at. | validation_failed |
| 401 | Missing or invalid API key. | authentication_error |
| 403 | Agent API keys cannot mark invoices paid. | scope_missing |
| 404 | Invoice not found, or not yours. | resource_missing |
| 409 | Invoice cannot be marked paid in its current status, a card payment is in progress or settled, or idempotency key reused with a different body. | invoice_state_invalid invoice_payment_pending idempotency_key_in_use |
| 429 | Rate limited; honor retry-after. | rate_limit_exceeded too_many_auth_failures |
| 500 | Server error. | api_error |
Example response
{
"object": "invoice",
"id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"merchant_id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"customer_id": "string",
"status": "draft",
"number": "string",
"collection_method": "charge_automatically",
"fiscal": false,
"reverse_charge": false,
"currency": "string",
"subtotal": 1,
"tax_total": 1,
"total": 1,
"amount_due": 1,
"amount_paid": 1,
"description": "string",
"footer": "string",
"metadata": {},
"payment_id": "string",
"payment_link_id": "string",
"subscription_id": "string",
"period_start": "2026-10-25T18:00:00.000Z",
"period_end": "2026-10-25T18:00:00.000Z",
"issue_date": "2026-10-25T18:00:00.000Z",
"due_date": "2026-10-25T18:00:00.000Z",
"finalized_at": "2026-10-25T18:00:00.000Z",
"paid_at": "2026-10-25T18:00:00.000Z",
"pdf_sha256": "string",
"lines": [
{
"id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"price_id": "string",
"description": "string",
"quantity": 1,
"unit_amount": 1,
"tax_rate_bp": 1,
"tax_amount": 1,
"total": 1
}
],
"issuer": {},
"billing": {
"type": "person",
"name": "string",
"email": "ana@example.com",
"phone": "string",
"country": "string",
"county": "string",
"city": "string",
"address": "string",
"postal_code": "string",
"language": "ro",
"company_name": "string",
"tax_id": "string",
"registration_number": "string",
"contact_person": "string",
"reference": "string"
},
"created_at": "2026-10-25T18:00:00.000Z",
"sent_at": "2026-10-25T18:00:00.000Z",
"email_status": "sent",
"pay_url": "string"
}POST /v1/invoices/:id/pay
Charge an invoice now
Charges the saved card of an open charge_automatically invoice now, instead of waiting for the next scheduled attempt. It is one more attempt of the same collection: the answer already reports the outcome, paid, or still open after a decline with the next attempt scheduled (invoice.payment_failed); a charge NETOPIA Payments has not answered yet leaves it open until its callback. Nothing is charged and nothing changes when it is refused: 409 invoice_not_open (a draft, paid, void or uncollectible invoice), 409 invoice_not_charge_automatically (a send_invoice invoice is paid by the customer on its pay page), 409 invoice_payment_in_progress, 409 invoice_busy (being collected at this moment), 409 no_chargeable_instrument (the customer has no saved card that can be charged), 409 netopia_not_configured. Not available to agent keys.
- Authentication
- Merchant API key
- Effect
- Charges the customer's saved card for the amount due.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | Object ID (ULID). · 26 chars |
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Idempotency-Key | string | no | Makes retries safe: same key + body replays the stored response (idempotency-replayed: true); a different body, or an agent key or dashboard session reusing another credential's key, returns 409 idempotency_key_in_use. · ≤ 96 chars |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
note | string | yes | Why, for example the transfer reference. · ≥ 1 chars, ≤ 500 chars |
paid_at | string (date-time) | no |
Example request
{
"note": "string",
"paid_at": "2026-10-25T18:00:00.000Z"
}Responses
| Status | Meaning | Body / error codes |
|---|---|---|
| 200 | The invoice. | Invoice |
| 401 | Missing or invalid API key. | authentication_error |
| 403 | Agent API keys cannot charge invoices. | scope_missing |
| 404 | Invoice not found, or not yours. | resource_missing |
| 409 | Not chargeable now. | invoice_not_open invoice_not_charge_automatically invoice_payment_in_progress invoice_busy no_chargeable_instrument netopia_not_configured |
| 429 | Rate limited; honor retry-after. | rate_limit_exceeded too_many_auth_failures |
| 500 | Server error. | api_error |
Example response
{
"object": "invoice",
"id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"merchant_id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"customer_id": "string",
"status": "draft",
"number": "string",
"collection_method": "charge_automatically",
"fiscal": false,
"reverse_charge": false,
"currency": "string",
"subtotal": 1,
"tax_total": 1,
"total": 1,
"amount_due": 1,
"amount_paid": 1,
"description": "string",
"footer": "string",
"metadata": {},
"payment_id": "string",
"payment_link_id": "string",
"subscription_id": "string",
"period_start": "2026-10-25T18:00:00.000Z",
"period_end": "2026-10-25T18:00:00.000Z",
"issue_date": "2026-10-25T18:00:00.000Z",
"due_date": "2026-10-25T18:00:00.000Z",
"finalized_at": "2026-10-25T18:00:00.000Z",
"paid_at": "2026-10-25T18:00:00.000Z",
"pdf_sha256": "string",
"lines": [
{
"id": "01JB9XK3M2R7TQ8N4V6Y0ZPA1C",
"price_id": "string",
"description": "string",
"quantity": 1,
"unit_amount": 1,
"tax_rate_bp": 1,
"tax_amount": 1,
"total": 1
}
],
"issuer": {},
"billing": {
"type": "person",
"name": "string",
"email": "ana@example.com",
"phone": "string",
"country": "string",
"county": "string",
"city": "string",
"address": "string",
"postal_code": "string",
"language": "ro",
"company_name": "string",
"tax_id": "string",
"registration_number": "string",
"contact_person": "string",
"reference": "string"
},
"created_at": "2026-10-25T18:00:00.000Z",
"sent_at": "2026-10-25T18:00:00.000Z",
"email_status": "sent",
"pay_url": "string"
}GET /v1/invoicing/collection
Read the collection settings
Retry days, reminder offsets and the final action for receivable invoices; the defaults until you save your own. Not available to agent keys.
- Authentication
- Merchant API key
- Effect
- Read-only.
Responses
| Status | Meaning | Body / error codes |
|---|---|---|
| 200 | Success. | InvoiceCollectionSettings |
| 401 | Missing or invalid API key. | authentication_error |
| 403 | Agent API keys cannot read the collection settings. | scope_missing |
| 429 | Rate limited; honor retry-after. | rate_limit_exceeded too_many_auth_failures |
Example response
{
"object": "invoice_collection_settings",
"retry_days": [
0,
3,
5,
7
],
"reminder_offsets": [
-3,
0,
7
],
"final_action": "leave_open"
}POST /v1/invoicing/collection
Save the collection settings
Replaces the settings. Applies to invoices from the next job run. Needs the invoicing profile to be saved first (409 issuer_profile_incomplete). Not available to agent keys.
- Authentication
- Merchant API key
- Effect
- Saves the settings; nothing is sent or charged.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
Idempotency-Key | string | no | Makes retries safe: same key + body replays the stored response (idempotency-replayed: true); a different body, or an agent key or dashboard session reusing another credential's key, returns 409 idempotency_key_in_use. · ≤ 96 chars |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
retry_days | integer[] | no | Days after the invoice is issued on which the saved card is charged (increasing). The default is 4 attempts: days 0, 3, 5 and 7. · ≥ 1 items, ≤ 8 items, default [0,3,5,7] |
reminder_offsets | integer[] | no | Days around the due date on which a send_invoice invoice's payer is reminded (negative: before). Each is sent once; an offset that falls before the invoice was issued is skipped. · ≤ 6 items, default [-3,0,7] |
final_action | "leave_open" | "uncollectible" | "void" | no | What happens to a charge_automatically invoice when every attempt has failed. leave_open keeps it open so it can still be paid or marked paid. · default "leave_open" |
Example request
{
"retry_days": [
0,
3,
5,
7
],
"reminder_offsets": [
-3,
0,
7
],
"final_action": "leave_open"
}Responses
| Status | Meaning | Body / error codes |
|---|---|---|
| 200 | Success. | InvoiceCollectionSettings |
| 400 | Invalid body. | parameter_invalid |
| 401 | Missing or invalid API key. | authentication_error |
| 403 | Agent API keys cannot change the collection settings. | scope_missing |
| 409 | The invoicing profile has not been saved. | issuer_profile_incomplete |
| 429 | Rate limited; honor retry-after. | rate_limit_exceeded too_many_auth_failures |
Example response
{
"object": "invoice_collection_settings",
"retry_days": [
0,
3,
5,
7
],
"reminder_offsets": [
-3,
0,
7
],
"final_action": "leave_open"
}