Create an invoice

Creates a real invoice against a billing customer — it is issued and becomes payable, so do not use this endpoint to try things out. line_items must be nonempty and every item needs both rate and quantity; the numeric types are declared but not checked at runtime, so send numbers. The whole body is forwarded, and fields beyond the ones listed here are passed along untouched.

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

The billing customer the invoice is issued to. Required.

string
required

Invoice date as YYYY-MM-DD. Required, though the format is not checked here.

line_items
array of objects
required

The invoice lines, at least one. Each needs rate and quantity, and may carry item_id, name, description, discount, tax_id, item_order and any other fields the billing system accepts.

line_items*
string

Invoice number to use instead of the next generated one.

number

Number of days until payment is due.

string

Human-readable label for the payment terms, such as Net 30.

string

Due date as YYYY-MM-DD.

number

Discount applied to the invoice, read according to discount_type.

string

Whether discount applies to the whole invoice or to each line — entity_level or item_level. Not validated here.

boolean

Whether the discount is applied before tax.

number

Exchange rate to the base currency.

string

Notes shown on the invoice.

string

Terms and conditions shown on the invoice.

number

Shipping charge added to the invoice.

number

Adjustment added to or subtracted from the invoice total.

string

Label shown beside the adjustment.

custom_fields
array of objects

Custom fields to set on the invoice, each with index, label and value.

custom_fields
boolean

Whether the customer may pay the invoice in parts.

string

ID of the invoice template to render with.

string

Salesperson recorded on the invoice.

Responses
201

The created invoice, unwrapped: its ID, number, reference, customer, date, currency, status, total, balance and last payment date, plus any other fields the billing system returns.

401

Missing or invalid API key.

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