Update an invoice

Manage merchant invoices. Invoices allows for line items. Invoices status lifecycle is: (Draft → Sent → Paid / Cancelled). You can also connect an invoice to any payment.



Updates an invoice. Only the fields supplied are changed; omitted fields are left unchanged. When 'lineItems' is supplied, the entire set of line items is replaced. Notes (and 'showNotesToCustomer') can be updated at any status; every other field can only be changed while the invoice is in Draft.

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

Unique identifier code for the invoice.

Body Params
Customer
object
string | null

Your merchant-supplied invoice number.

date
required
^\d\d\d\d\-\d\d\-\d\d$

The date the invoice was issued.

date | null
^\d\d\d\d\-\d\d\-\d\d$

Optional due date for payment of this invoice. Send null to clear.

string | null

Optional notes or message to the customer. Send null to clear.

string | null

Optional merchant internal reference. Send null to clear.

string | null

Optional identifier from your own system. Send null to clear.

LineItems
array of objects | null

Replacement set of line items. When supplied, all existing line items are replaced by this set; omit to leave them unchanged.

LineItems
string | null

Description of the goods or services for this line item. Required unless 'product' is supplied, in which case it defaults to the product's description (or its name if the product has no description).

double | null
1 to 999

Quantity of units. Defaults to 1 when omitted. Supports fractional quantities (e.g. 1.5 hours).

double | null

Unit price per item. When set, 'amount' is computed as quantity × unitPrice by the server.

double | null

Total line amount. Required when 'unitPrice' is not provided. Ignored if 'unitPrice' is provided.

string | null

A product code. When set, pre-fills description, unit price, and tax code if those fields are not explicitly provided.

double
required
0 to 99999

Discount amount subtracted from the line subtotal (quantity x unitPrice). Defaults to 0.

string | null

A tax code. If omitted, the product's tax code is used; if no product is provided either, the merchant's default tax code is applied. The tax amount is always derived server-side from the resolved tax code's rate.

int16
required

Display order of this line item. Lower values appear first.

boolean
required

Whether notes on this invoice are visible to the customer on the hosted invoice page.

boolean
required

Whether line item unit prices are tax exclusive (tax added on top) rather than tax inclusive. Changing this recalculates line tax and totals.

Responses

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