inv_…) bills a customer. Your server creates one-off invoices,
and a subscription generates one at each period boundary. An invoice
item (ii_…) is a pending charge recorded against a customer. When you create an invoice for that
customer, every pending item in the invoice currency is drained onto the new draft as a line (il_…).
See Invoices for the full flow.
A draft can be edited freely. Finalizing it assigns a gapless, sequential number per merchant and mode
(for example INV-000001), applies tax, freezes the lines, and opens the invoice. Drafts carry no number,
so an abandoned draft never consumes one. A paid invoice can be offset with a credit note.
Platforms can create and manage billing for connected accounts: see Billing for connected accounts.
Attributes
string
The invoice id (
inv_…).string | null
The gapless per-merchant number, assigned at finalize. Null while draft.
string
The billed customer (
cus_…), set at creation and immutable.string | null
The subscription that generated this invoice (
sub_…). Absent for one-off invoices created directly against a customer.string
One of
draft (being built, lines mutable, never customer-visible), open (finalized, lines frozen, awaiting payment), paid (terminal; reachable from open, from uncollectible via a late payment, or directly at finalize when the total is zero), void (terminal; requires amount_paid of zero), or uncollectible (written off; not terminal, since a late payment can still move it to paid).string
One of
charge_automatically (charged automatically against the pinned payment method) or send_invoice (the buyer pays through the hosted invoice page, with an optional due_date).string
Three-letter ISO currency code. USD, EUR, and GBP are supported; all use 2-decimal minor units.
integer
subtotal plus tax minus discounts, in minor units. Discounts can reduce this to zero but never below it.integer
The cumulative amount paid so far, in minor units.
integer
total minus amount_paid, in minor units.string | null
The buyer-facing hosted invoice page URL. Present once the invoice has been finalized and hosted invoicing is enabled for the deployment; null on drafts or when hosted invoicing is not configured.
Endpoints
Statuses
Collection methods
Payment attempts
Each automatic collection attempt is recorded as aninvoice_payment_attempt with a status of pending, succeeded, failed, or blocked. pending means the final outcome is not known yet. Retrieve the attempts again before retrying.
Notes
- Live invoice numbers use
INV-000001style labels. Test invoice numbers useTEST-INV-000001. - An authorized platform can call every invoice and invoice item endpoint for a connected account by sending
Ionic-Account. See Bill a connected account. - Mutating endpoints accept an optional
Idempotency-Keyheader. See Idempotency.

