v55

OpenAPI 3.1.0CC-BY-NC-SA-4.0raw.githubusercontent.com2026-08-011243791.8 MB
Sales Invoices API

Create sales invoice

With the Sales Invoice API you can generate sales invoices to send to your customers.

post/v2/sales-invoices

Headers

idempotency-keystring
Example:123e4567-e89b-12d3-a456-426

A unique key to ensure idempotent requests. This key should be a UUID v4 string.

Request body

resourcestring

Indicates the response contains a sales invoice object. Will always contain the string sales-invoice for this endpoint.

idstring
mode'live' | 'test'

Whether this entity was created in live mode or in test mode.

testmodeboolean nullable

Whether to create the entity in test mode or live mode.

Most API credentials are specifically created for either live mode or test mode, in which case this parameter must not be sent. For organization-level credentials such as OAuth access tokens, you can enable test mode by setting testmode to true.

invoiceNumberstring nullable

When issued, an invoice number will be set for the sales invoice.

profileIdstring nullable

The identifier referring to the profile this entity belongs to.

Most API credentials are linked to a single profile. In these cases the profileId must not be sent in the creation request. For organization-level credentials such as OAuth access tokens however, the profileId parameter is required.

status'draft' | 'issued' | 'paid' required

The status for the invoice to end up in.

A draft invoice is not paid or not sent and can be updated after creation. Setting it to issued sends it to the recipient so they may then pay through our payment system. To skip our payment process, set this to paid to mark it as paid. It can then subsequently be sent as well, same as with issued.

Dependent parameters:

  • paymentDetails is required if invoice should be set directly to paid
  • customerId and mandateId are required if a recurring payment should be used to set the invoice to paid
  • emailDetails optional for issued and paid to send the invoice by email
eInvoiceStatus'issuing' | 'issued' | 'failed'

The e-invoice submission status for the invoice, if it was configured to be an e-invoice.

vatScheme'standard' | 'one-stop-shop'

The VAT scheme to create the invoice for. You must be enrolled with One Stop Shop enabled to use it.

vatMode'exclusive' | 'inclusive'

The VAT mode to use for VAT calculation. exclusive mode means we will apply the relevant VAT on top of the price. inclusive means the prices you are providing to us already contain the VAT you want to apply.

memostring nullable

A free-form memo you can set on the invoice, and will be shown on the invoice PDF.

metadataobject nullable

Provide any data you like as a JSON object. We will save the data alongside the entity. Whenever you fetch the entity with our API, we will also include the metadata. You can use up to approximately 1kB.

paymentTerm'7 days' | '14 days' | '30 days' | '45 days' | '60 days' | '90 days' | '120 days' nullable

The payment term to be set on the invoice.

customerIdstring

The identifier referring to the customer you want to attempt an automated payment for. If provided, mandateId becomes required as well. Only allowed for invoices with status paid.

mandateIdstring

The identifier referring to the mandate you want to use for the automated payment. If provided, customerId becomes required as well. Only allowed for invoices with status paid.

recipientIdentifierstring required

An identifier tied to the recipient data. This should be a unique value based on data your system contains, so that both you and us know who we're referring to. It is a value you provide to us so that recipient management is not required to send a first invoice to a recipient.

isEInvoiceboolean

This indicates whether the invoice is an e-invoice. The default value is false and can't be changed after the invoice has been issued. When emailDetails is provided, an additional email is sent to the recipient.

E-invoicing is only available for merchants based in Belgium, Germany, and the Netherlands, and only when the recipient is also located in one of these countries.

createdAtstring

The entity's date and time of creation, in ISO 8601 format.

issuedAtstring nullable

If issued, the date when the sales invoice was issued, in ISO 8601 format.

paidAtstring nullable

If paid, the date when the sales invoice was paid, in ISO 8601 format.

dueAtstring nullable

If issued, the date when the sales invoice payment is due, in ISO 8601 format.

Example request

{
  "resource": "sales-invoice",
  "id": "invoice_4Y0eZitmBnQ6IDoMqZQKh",
  "mode": "live",
  "invoiceNumber": "INV-0000001",
  "profileId": "pfl_QkEhN94Ba",
  "status": "draft",
  "eInvoiceStatus": "issuing",
  "vatScheme": "standard",
  "vatMode": "exclusive",
  "memo": "This is a memo!",
  "paymentTerm": "30 days",
  "paymentDetails": {
    "source": "payment-link",
    "sourceReference": "pl_d9fQur83kFdhH8hIhaZfq"
  },
  "emailDetails": {
    "subject": "Your invoice is available",
    "body": "Please find your invoice enclosed."
  },
  "customerId": "cst_8wmqcHMN4U",
  "mandateId": "mdt_pWUnw6pkBN",
  "recipientIdentifier": "customer-xyz-0123",
  "recipient": {
    "type": "consumer",
    "title": "Mrs.",
    "givenName": "Jane",
    "familyName": "Doe",
    "organizationName": "Organization Corp.",
    "organizationNumber": "12345678",
    "vatNumber": "NL123456789B01",
    "email": "example@email.com",
    "phone": "+0123456789",
    "streetAndNumber": "Keizersgracht 126",
    "streetAdditional": "4th floor",
    "postalCode": "5678AB",
    "city": "Amsterdam",
    "region": "Noord-Holland",
    "country": "NL",
    "locale": "nl_NL"
  },
  "lines": [
    {
      "description": "LEGO 4440 Forest Police Station",
      "quantity": 1,
      "vatRate": "21.00",
      "unitPrice": {
        "currency": "EUR",
        "value": "10.00"
      },
      "discount": {
        "type": "amount",
        "value": "10.00"
      }
    }
  ],
  "discount": {
    "type": "amount",
    "value": "10.00"
  },
  "amountDue": {
    "currency": "EUR",
    "value": "10.00"
  },
  "subtotalAmount": {
    "currency": "EUR",
    "value": "10.00"
  },
  "totalAmount": {
    "currency": "EUR",
    "value": "10.00"
  },
  "totalVatAmount": {
    "currency": "EUR",
    "value": "10.00"
  },
  "discountedSubtotalAmount": {
    "currency": "EUR",
    "value": "10.00"
  },
  "createdAt": "2024-03-20T09:13:37+00:00",
  "issuedAt": "2024-10-03T10:47:38+00:00",
  "paidAt": "2024-10-04T10:47:38+00:00",
  "dueAt": "2024-11-01T10:47:38+00:00",
  "_links": {
    "self": {
      "href": "https://...",
      "type": "application/hal+json"
    },
    "invoicePayment": {
      "href": "https://...",
      "type": "application/hal+json"
    },
    "pdfLink": {
      "href": "https://...",
      "type": "application/hal+json"
    },
    "documentation": {
      "href": "https://...",
      "type": "application/hal+json"
    },
    "next": {
      "href": "https://...",
      "type": "application/hal+json"
    },
    "previous": {
      "href": "https://...",
      "type": "application/hal+json"
    }
  }
}

Response

The newly created invoice object. For a complete reference of the invoice object, refer to the Get sales invoice endpoint documentation.