Pay an invoice
Settles an open invoice, in the live or test mode of the API key used. By default Fintoc charges the invoice: pass payment_method to charge a specific method, or omit it to use the invoice’s default_payment_method. The method must belong to the invoice’s customer and be active. Use this to collect an invoice on demand, or to retry collection after a failed attempt with a different method. The charge is asynchronous: the invoice stays open with a pending payment until the charge resolves. Pass external_payment instead to mark the invoice paid because you collected it outside Fintoc. Fintoc moves the invoice to paid right away and creates no payment. Fintoc does not verify the amount you collected, and settling an invoice is not reversible.
Autorizaciones
Parámetros de ruta
The id of the invoice to pay.
Cuerpo
Set to true to mark the invoice paid because you collected it outside Fintoc, which creates no payment and charges nothing. Defaults to false. Works on any open invoice, including one Fintoc collects whose charge failed. When true, cannot be combined with payment_method.
true
Payment method to charge. Must belong to the invoice's customer and be active. Defaults to the invoice's default_payment_method.
"pm_2c4mDhAbCdEfGhIjKlMnOpQrStu"
Respuesta
Returns the invoice. When Fintoc charges it, the invoice stays open with a new pending payment in payments. When you collected it outside Fintoc, the invoice is paid with external_payment: true.
Unique identifier of the invoice.
"inv_2bVdWxLpzXq8RkNcM3JtUv9AhTe"
URL of the hosted invoice page, where your customer can view and pay the invoice. null for invoices that are not open. In test mode, the URL points to the test mode portal.
"https://acme.billing.fintoc.com/invoices/inv_2bVdWxLpzXq8RkNcM3JtUv9AhTe"
Type of the object. Always invoice.
Number of automatic charge attempts Fintoc has made on the invoice. 0 until the invoice is finalized and charged for the first time.
1
The way Fintoc collects the invoice. charge_automatically means Fintoc charges default_payment_method once the invoice is finalized. send_invoice means Fintoc leaves the invoice open for you to collect, through hosted_invoice_url or outside Fintoc. Subscription invoices inherit the collection method when issued and keep that collection method even if the subscription changes later.
charge_automatically, send_invoice "send_invoice"
ISO 8601 timestamp of when the invoice was created.
"2026-05-01T12:00:00Z"
Currency of the invoice, as an ISO 4217 code. Every line item uses this currency.
CLP, MXN "CLP"
id of the customer the invoice bills.
"cus_2bVdWyTnGq4PfLs7DkXjRm0CwIo"
id of the payment method Fintoc charges when the invoice is finalized. null for invoices without one, such as subscription invoices.
"pm_2c4mDhAbCdEfGhIjKlMnOpQrStu"
Whether the invoice was settled with a payment collected outside Fintoc. false for invoices Fintoc collected, and for invoices that are not yet paid.
false
Line items that make up the invoice total.
Set of key-value pairs attached to the invoice. null when the invoice has no metadata.
Mode of the invoice. live invoices use real data; test invoices use fake data for integration testing. An API key only sees invoices that share its mode.
live, test "live"
ISO 8601 timestamp of the next scheduled automatic charge attempt. null when no further attempt is scheduled.
"2026-05-02T12:00:00Z"
Payment attempts to collect the invoice.
Status of the invoice. Invoices start as draft, become open when finalized, and end as paid or void.
draft, open, paid, void "draft"
id of the subscription that generated the invoice. null for invoices not tied to a subscription.
"sub_2bVdWzKfHr5QgMt8ElYkSn1DxJp"
Total amount of the invoice, in the smallest unit of currency (for example, 30000 for $30000 CLP, since CLP has no minor unit, or 3000 for $30.00 MXN). Equals the sum of the line item amounts.
30000