Skip to navigation

Create an invoice

View as Markdown
Create an invoice.

Authentication

x-api-keystring

Account API key used to authenticate server-side requests. Use the credentials issued for the same environment as the API base URL.

Headers

Idempotency-KeystringOptional<=255 characters

Unique key used to safely retry the same state-changing request.

Request

This endpoint expects an object.
lineItemslist of objectsRequired
currencystringRequired
recipientIdstringOptional
A saved recipient to address the invoice to.
recipientobjectOptional
Someone to bill. If a saved recipient has the same email address or phone number, the invoice goes to them. Otherwise a new recipient is saved.
invoiceNumberstringOptional<=50 characters
descriptionstringOptional<=2000 characters
taxAmountdoubleOptional>=0Defaults to 0
discountAmountdoubleOptional>=0Defaults to 0
dueAtdatetimeOptional

Response

Invoice created successfully.
messagestring
dataobject

Response fields are snake_case; request fields are camelCase.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error