v1

latestOpenAPI 3.1.0CC-BY-NC-SA-4.02026-07-2413803.8 MB
Sales Invoices API

Create sales invoice

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

🔑 Access with

API key

Advanced access token with sales-invoices.write

OAuth access with sales-invoices.write

post/sales-invoices

Request body

resourcestring

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

idstring

The identifier uniquely referring to this invoice. Example: invoice_4Y0eZitmBnQ6IDoMqZQKh.

modestring

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

Possible values: live test

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.

statusstring 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

Possible values: draft issued paid

eInvoiceStatusstring

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

Possible values: issuing issued failed

vatSchemestring

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

Possible values: standard one-stop-shop (default: standard)

vatModestring

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.

Possible values: exclusive inclusive (default: exclusive)

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.

paymentTermstring nullable

The payment term to be set on the invoice.

Possible values: 7 days 14 days 30 days 45 days 60 days 90 days 120 days (default: 30 days)

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

{
  "id": "invoice_4Y0eZitmBnQ6IDoMqZQKh",
  "mode": "live",
  "invoiceNumber": "INV-0000001",
  "profileId": "pfl_QkEhN94Ba",
  "status": "draft",
  "eInvoiceStatus": "issuing",
  "memo": "This is a memo!",
  "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.