Skip to main content
When you create a subscription, Fintoc generates an Invoice for each billing cycle. An invoice represents the amount your customer owes for a given period. With charge_automatically, Fintoc attempts to collect the invoice using the enrolled payment method. With send_invoice, the invoice stays open for you to collect. Fintoc creates the invoices of the subscription for you. You can also create your own invoices for amounts the subscription does not cover, and collect any open invoice on demand. For full details on invoices, see the Invoice object.

Invoices in the subscription flow

After the checkout_session.finished event, Fintoc creates the first invoice and charges the enrolled payment method. With charge_automatically, the subscription stays incomplete until that first payment succeeds, and then becomes active. Handle the following invoice-related events alongside the post-session events in Create subscriptions for your customer: Month 1: When the subscription is created, Fintoc generates the first invoice and finalizes it without the one-hour draft window. Fintoc then charges the enrolled payment method. On success, you receive invoice.created, followed by invoice.finalized, invoice.payment_succeeded, invoice.paid, and payment_intent.succeeded. Month 2 onwards: At each billing cycle renewal, based on the subscription’s billing_cycle_anchor, Fintoc creates a new invoice in draft status. After 1 hour, Fintoc finalizes the invoice, moves it to open, and charges the enrolled payment method. Use that hour to adjust the invoice before Fintoc charges it. On success, you receive invoice.finalized, invoice.payment_succeeded, and invoice.paid. On failure, you receive invoice.payment_failed. Fintoc finalizes the invoices of a subscription for you. An invoice you create yourself stays draft until you finalize it, as described in Charge an amount outside the billing cycle.

Recovering a failed payment

When an automatic charge fails, Fintoc emits invoice.payment_failed. To recover the payment, send the invoice’s hosted_invoice_url to your customer through your own channel, such as email or WhatsApp. The hosted page lets your customer pay using the payment methods enabled on your organization’s account. A successful payment creates a payment_intent on the invoice and settles the debt. The subscription’s enrolled payment method stays valid, and Fintoc charges the next cycle automatically. The hosted_invoice_url becomes available on the Invoice object once the invoice reaches open status. For details, see the Invoice object.
An invoice accepts only one payment at a time. If you open the hosted_invoice_url while an automatic charge is in progress, the page shows that an invoice payment is in progress and the payment link is disabled. Fintoc re-enables the payment link if the automatic charge fails.

Charge an amount outside the billing cycle

Fintoc issues the subscription invoices for you. You can also create an invoice yourself for an amount the subscription does not cover. Use this for a one-off adjustment, an extra service, or a charge outside the billing calendar. Create it for the same customer, with the payment method enrolled during checkout as default_payment_method.
fintoc-invoice-creation-diagram
Server
Node
Fintoc returns the invoice in draft status, with subscription set to null. The invoice bills the customer, not the subscription, so it does not change the subscription’s billing cycle or amount. Finalize the invoice to move it to open and charge default_payment_method. Unlike the invoices of a subscription, which Fintoc finalizes on its own after an hour in draft, an invoice you create stays draft until you finalize it. Server
After finalization, the invoice behaves like a subscription invoice. It emits the same invoice.* events, keeps the same payments history, and exposes the same hosted_invoice_url to fall back on when a charge fails. You can also retry a failed charge with Pay an invoice, against the enrolled payment method or another active payment method of the same customer. For the full on-demand flow, including how to collect an invoice from a customer with no enrolled payment method, see Save a payment method for future charges.

Collect the invoices yourself instead of charging automatically

With collection_method set to send_invoice, Fintoc stops making automatic charges. Fintoc still issues one invoice per billing period, but each invoice stays open and you decide how to collect it. You have three ways to settle an open invoice:
  1. Send your customer the payment link in hosted_invoice_url and let them pay through the Fintoc-hosted page.
  2. Charge the invoice on demand with Pay an invoice, using the payment method attached to the subscription.
  3. Collect the money outside Fintoc, by bank transfer or cash, and mark the invoice as paid. Fintoc records this with external_payment set to true.
Because send_invoice never charges automatically, it does not require a payment method. To create this subscription with the API, without sending your customer through a checkout enrollment, see Issue invoices without charging. You can still attach a payment method later, which lets you charge invoices on demand. Fintoc does not contact your customer through any channel. Reaching out is your responsibility, whichever option you use. Collecting the invoices yourself has three consequences:
  • Unpaid invoices accumulate. Each billing period adds one invoice, and each one settles separately.
  • The subscription starts active, and that does not mean your customer paid. With send_invoice, no automatic charge waits to complete, so Fintoc skips the incomplete status used with charge_automatically. Track the status of each invoice to know what your customer owes.
  • Only Update a subscription changes the collection method. Attaching a payment method does not switch the subscription to charge_automatically.
The events differ depending on who collects. See Invoice payment events.

Test invoice creation with status draft

To test an invoice that is created in draft status, create a subscription with a line item using the product name sandbox_draft: Server
Node
Fintoc creates the Checkout Session:
Fintoc creates the invoice in draft status, so you can edit its items with the Add lines endpoint before the invoice leaves draft.