Create sales invoice

Beta feature

This feature is currently in beta testing, and the final specification may still change.

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

Access with

API key

Organization access token with sales-invoices.write

OAuth access with sales-invoices.write

Body Params
boolean | null

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.

string | null

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.

string
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.

A status value that cannot be set but can be returned is canceled, for invoices which were issued, but then canceled. Currently this can only be done for invoices created in the dashboard.

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

string

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)

string

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)

string | null

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

string | null

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)

paymentDetails
object

Used when setting an invoice to status of paid, and will store a payment that fully pays the invoice with the provided details. Required for paid status.

emailDetails
object | null

Used when setting an invoice to status of either issued or paid. Will be used to issue the invoice to the recipient with the provided subject and body. Required for issued status.

string

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.

string

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.

string
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.

recipient
object | null
required
lines
array of objects | null
required

Provide the line items for the invoice. Each line contains details such as a description of the item ordered and its price.

All lines must have the same currency as the invoice.

lines*
discount
object | null

The discount to be applied to the entire invoice, applied on top of any line item discounts.

boolean

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.

Responses

Language
Credentials
Request
Response
Choose an example:
application/hal+json