Bills

Understand how bills are generated and processed within a subscription.

Overview

A bill represents a single payment within a subscription. Each billing cycle, a new bill is automatically created and a payment is attempted against the customer's stored payment method. Bills provide a complete record of each payment attempt, including the amount, due date, and any associated transactions.


How bills are generated

When a subscription becomes active, the first bill is created automatically. From that point, each time a bill is successfully paid, the next bill is created for the following billing cycle. This continues until the subscription's cycle limit is reached or the subscription is cancelled.

The bill generation process follows this sequence:

  1. Subscription is activated — the first bill is created with a status of draft.
  2. At the bill's due date, the bill transitions to open and a payment is automatically attempted.
  3. If the payment succeeds, the bill transitions to paid and the next bill is created.
  4. If the payment fails, the bill transitions to past_due and will be sent to recovery or remains available for manual action.
  5. When the cycle limit is reached, the subscription is automatically cancelled and no further bills are created.

Bill status

Each bill transitions through the following statuses:

StatusDescription
draftThe bill has been created but payment has not yet been attempted. This is the initial status for all bills.
openThe bill is finalised and due to be charged (draftopen happens before the payment attempt is made).
past_dueA payment attempt was made and failed; the bill is past_due and remains available for recovery / manually paid / void. See the guide for how failed payments interact with subscription statuses for more.
paidThe bill has been successfully paid.
voidThe bill has been voided and no payment will be collected. This status is irreversible.

The allowed status transitions are:

  • draftopen, paid, or void
  • openpast_due, paid or void
  • past_duepaid or void
  • paidvoid
  • void → no further transitions
📘

Note

When a payment attempt fails, the bill transitions to past_due rather than void. This allows you to take further action, such as recovering the payment or manually marking the bill as paid or void via the API.

From past_due the bill can transition automatically to paid or void after the outcome of recovery, depending on the automatic cancellation of subscription configuration you have set.


To learn how to retrieve and update bills, see Managing Bills.