Invoices
An invoice is a request for payment: line items, a customer, a total, and a hosted page where the customer pays. Create one with a single call and you get a payable URL back instantly.
Create an invoice
POST/v1/invoices
| customer_emailstring | Where the invoice is sent. Shown on the hosted page. |
| line_items[]array | Objects with description and amount (in cents). |
| days_until_dueinteger | Optional. Defaults to 14. |
cURLNodePython
The invoice object
Invoices move through draft → open → paid (or void). The object carries everything the hosted page and your ledger need:
id— e.g.in_1QaX9f2eZvKYstatus—openuntil paid, thenpaidamount_due/amount_paid/amount_remaining— in centshosted_invoice_url— the branded page your customer pays oninvoice_pdf— a downloadable copy
List invoices
GET/v1/invoices
Returns your most recent invoices, newest first. Great for building a billing table.
cURLNodePython
Retrieve one
GET/v1/invoices/:id
Fetch a single invoice by id. (This runnable example uses the last invoice you created.)
cURLNodePython
💡
Pay a test invoice with 4242 4242 4242 4242 on its hosted page and an invoice.paid event fires immediately. See Testing.