Add invoice lines

Appends one or more line items to a draft invoice and recalculates the invoice total. The invoice must be in draft status and every line item must use the invoice currency. If any line item is invalid, the whole request fails and no line item is added.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

The id of the invoice to add line items to.

Body Params
lines
array of objects
required
length ≥ 1

Line items to append to the invoice. Must contain at least one line item.

lines*
integer
required

Amount of the line item, in the smallest unit of currency (for example, 30000 for $30000 CLP, since CLP has no minor unit, or 3000 for $30.00 MXN). Must be greater than 0.

string
enum
required

Currency of the line item, as an ISO 4217 code. Must match the invoice currency.

Allowed:
date-time

ISO 8601 datetime in UTC marking the end of the billing period covered by the line item. Optional, but must be provided together with period_start and be after it. Omit both for invoices not tied to a subscription.

date-time

ISO 8601 datetime in UTC marking the start of the billing period covered by the line item. Optional, but must be provided together with period_end. Omit both for invoices not tied to a subscription.

integer
required

Number of units billed by the line item. Must be greater than 0.

string
required

Display name for the line item shown on the invoice.

string

Additional details about the line item shown on the invoice.

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json