POST/Bill/

Create an invoice

Creates a new invoice using the supplied invoice details. Provide language, currency, dueAfterDays, recipient, and positions; date defaults to today and complete defaults to false. A 200 response returns the created invoice object.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

24 body fields

Invoice details for the recipient and invoice positions. language, currency, dueAfterDays, recipient, and positions are required.

additionalRecipientsarray<string>optional
Send invoice to additional recipients. Pass email addresses as Strings.
applicationFeeintegeroptional
Amount in the smallest unit of the currency.
attachmentsarray<object>optional
Files to attach to the invoice; each attachment has a name and binary data.
bankInformationobjectoptional
Bank details for the invoice, including the IBAN, name, and address.
cashDiscountsarray<object>optional
Cash discount options, each with a number of days and a discount percentage.
completebooleanoptional
Whether to complete the invoice.
Default:false
currencystringrequired
Currency code (ISO 4217)
datestringoptional
Invoice date in YYYY-MM-DD format. Defaults to today when omitted.
Default:TODAY
designstringoptional
Identifier or value for the invoice design.
discountobjectoptional
Discount with an amount and a type of percent or amount; specify the amount in the currency's smallest unit when the type is amount.
dueAfterDaysintegerrequired
Number of days until the invoice is due: 5, 10, 20, 30, 40, 50, or 60.
Allowed:5102030405060
languagestringrequired
The language ISO code by ISO 639-1.
notestringoptional
Additional note for the invoice.
payoutDescriptorstringoptional
This payout descriptor is added to the payout statement (Only for Payrexx Swiss Collecting payments and single transaction payouts). Max. 80 chars.
pmarray<string>optional
Payment method names to use for the invoice.
positionsarray<object>required
The invoice line items.
psparray<integer>optional
recipientobjectrequired
The invoice recipient.
referencestringoptional
remindersarray<object>optional
sendbooleanoptional
Whether to send the invoice.
Default:false
servicePeriodobjectoptional
shippingCostintegeroptional
Amount in the smallest unit of the currency.
termsstringoptional

3 status codes
200Returns the created invoice object, including its invoice details and payment link.
dataobjectoptional
metaobjectoptional
statusstringoptional
400Returned when a required field is missing or a supplied value fails validation.
errorobjectoptional
messagestringoptional
reasonstringoptional
statusstringoptional
404Returned when a referenced resource cannot be found.
errorobjectoptional
messagestringoptional
reasonstringoptional
statusstringoptional

Error handling

A 400 is returned when a required field is missing or a supplied value is invalid. language, currency, dueAfterDays, recipient, and positions are required; dueAfterDays must be one of 5, 10, 20, 30, 40, 50, 60. A 404 is returned when a referenced resource cannot be found.