API Reference · Invoices

Create an invoice

Creates a draft invoice that has not yet been sent.

POST/v1/invoices

Invoices start in DRAFT. You can continue editing line items, notes, and terms until you call the send endpoint. Call `/send` to deliver the invoice and transition it to OPEN.

Body parameters

customerstringRequired

Id of the customer to bill.

currencystringRequired

Lowercase 3-letter ISO 4217 code.

line_itemsarrayRequired

At least one line item. Each has `description`, `quantity`, `unit_price_cents`.

tax_rate_bpsinteger

Tax rate in basis points. Default 0.

payment_termsstringdefault: due_on_receipt

One of `due_on_receipt`, `net_7`, `net_15`, `net_30`, `net_60`, `net_90`.

due_datestring

ISO date. Required when `payment_terms` is a net term.

notesstring

Free-form note shown to the customer.

installment_enabledboolean

Split the invoice into installments. See the installment guide.

installment_countinteger

Number of installments when enabled. Between 2 and 12.

metadataobject

Up to 20 key/value pairs.

Errors

400
parameter_missing

`customer` or `line_items` not supplied.

404
resource_missing

Referenced customer does not exist.

422
invalid_request_error

A line item total is negative or `installment_count` out of range.