Invoices
Invoices allow you to bill customers for goods or services. Create an invoice with line items, send it via email, and track payment status automatically.
Invoice lifecycle
Create an invoice
POST
/invoicesRequest body
| Parameter | Type | Required | Description |
|---|---|---|---|
appId | string | Yes | Your app UUID |
customerAccountId | string | Yes | Customer UUID to bill |
items | InvoiceItem[] | Yes | Line items (min 1) |
currency | string | No | Currency code (default: "USD") |
dueDate | string | No | Due date (ISO 8601) |
memo | string | No | Memo or notes (max 2000) |
taxRateId | string | No | Apply a tax rate |
allowedChains | "ALL" | number[] | No | Allowed blockchain chain IDs |
allowedTokens | "ALL" | string[] | No | Allowed token identifiers |
subscriptionId | string | No | Link to a subscription |
periodStart | string | No | Billing period start (ISO 8601) |
periodEnd | string | No | Billing period end (ISO 8601) |
metadata | object | No | Arbitrary key-value metadata |
InvoiceItem
| Field | Type | Required | Description |
|---|---|---|---|
description | string | Yes | Line item description (1–500 chars) |
amount | string | Yes | Price per unit (decimal string) |
quantity | number | No | Quantity (default: 1) |
currency | string | No | Item currency (max 10) |
productPlanId | string | No | Link to product plan |
productPlanPriceId | string | No | Specific price option |
taxRateId | string | No | Per-item tax rate |
List invoices
GET
/invoicesQuery parameters
| Parameter | Type | Description |
|---|---|---|
appId | string | Filter by app UUID |
status | string | Filter by status (DRAFT, OPEN, PAID, VOID) |
page | number | Page number (default: 1) |
pageSize | number | Items per page (max 100) |
Retrieve an invoice
GET
/invoices/:idOpen an invoice
POST
/invoices/:id/openTransitions a draft invoice to OPEN status, making it payable by the customer.
Void an invoice
POST
/invoices/:id/voidVoids an invoice, preventing it from being paid.
Send an invoice
POST
/invoices/:id/sendSends the invoice to the customer via email. The email includes a link to the hosted payment page.
💡
Auto-open on send
Sending a DRAFT invoice will automatically transition it to OPEN status.
Response object
All responses are wrapped in { "success": true, "data": ... }. List endpoints add pagination.
Invoice fields
idstringUnique invoice UUIDappIdstringApp this invoice belongs tocustomerAccountIdstringCustomer being billedsubscriptionIdstring | nullLinked subscription UUID (for recurring invoices)paymentIntentIdstring | nullAssociated payment intent once payment startsinvoiceNumberstringAuto-generated invoice number (e.g. INV-0001)statusstringDRAFT, OPEN, PAID, or VOIDsubtotalstringTotal before tax as decimal stringtaxAmountstringCalculated tax amounttotalstringFinal total (subtotal + tax)currencystringCurrency codetaxRateIdstring | nullApplied tax rate UUIDdueDatestring | nullISO 8601 due datepaidAtstring | nullISO 8601 payment timestampvoidedAtstring | nullISO 8601 void timestampperiodStartstring | nullBilling period start (for subscriptions)periodEndstring | nullBilling period end (for subscriptions)allowedChains'ALL' | number[]Permitted blockchain chain IDsallowedTokens'ALL' | string[]Permitted token identifiersmemostring | nullInvoice notes or memometadataobjectArbitrary key-value pairscreatedAtstringISO 8601 creation timestampupdatedAtstringISO 8601 last-update timestampInvoiceItem fields
idstringItem UUIDinvoiceIdstringParent invoice UUIDproductPlanIdstring | nullLinked product plan UUIDproductPlanPriceIdstring | nullLinked price UUIDtaxRateIdstring | nullPer-item tax rate UUIDdescriptionstringLine item descriptionamountstringPrice per unit as decimal stringcurrencystringCurrency codequantitynumberItem quantitytaxAmountstringCalculated tax for this itemcreatedAtstringISO 8601 creation timestamp💡
Endpoint variations
Create includes
items, customerAccount, and taxRate. Retrieve adds app, paymentIntent (with transactions), and each item's taxRate. List includes all retrieve relations except app. Open/void include items only. Send returns { "sent": true }.