Mark an invoice uncollectible
Writes off an open invoice as uncollectible, retaining the outstanding balance for reporting.
Authorizations
A merchant secret key (sk_…) sent as Authorization: Bearer <key>.
Headers
A unique key that makes retries safe: the same key with the same request body returns the original response instead of repeating the operation.
255Path Parameters
The invoice id (inv_…).
Response
The uncollectible invoice.
The invoice id (inv_…).
Always invoice.
invoice The gapless per-merchant number, assigned at finalize. Null while draft.
The billed customer (cus_…), set at creation and immutable.
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).
draft, open, paid, void, uncollectible One of charge_automatically (charged automatically against the pinned payment method) or send_invoice (the buyer pays the hosted page by due_date).
charge_automatically, send_invoice Whether the hosted invoice page offers the buyer the option to save their card for future use.
Three-letter ISO currency code. USD, EUR, and GBP are supported; all use 2-decimal minor units.
The invoice's line items. Frozen once the invoice leaves draft.
The sum of the line amounts, in minor units.
The tax amount, in minor units. Zero until finalize supplies a tax amount.
subtotal plus tax minus discounts, in minor units. Discounts can reduce this to zero but never below it.
The cumulative amount paid so far, in minor units.
total minus amount_paid, in minor units.
The number of collection attempts recorded against this invoice so far.
A string key-value map for storing your own structured data. Up to 50 keys; each key at most 40 characters and each value at most 500 characters.
Unix epoch seconds when the invoice was created.
Unix epoch seconds when the invoice was last updated.
The subscription that generated this invoice (sub_…). Absent for one-off invoices created directly against a customer.
The payment method (pm_…) pinned for automatic collection. Null when no method is pinned.
Unix epoch seconds by which the buyer must pay. Used with send_invoice; null otherwise.
Unix epoch seconds when the invoice was finalized. Null while the invoice is a draft.
Unix epoch seconds when the invoice became fully paid. Null until then.
Unix epoch seconds when the invoice was voided. Null unless the invoice is void.
Unix time of the next scheduled automatic collection retry. Present only while a dunning retry is pending.
The payment intent created to collect this invoice (pi_…). Present once a collection attempt has created one; links the invoice to its transaction.
The dunning policy's total attempt allowance, for rendering progress like "attempt N of max_attempts". Present only on subscription charge_automatically invoices when the dunning schedule is enabled for the deployment; null otherwise.
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.

