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:
- Subscription is activated — the first bill is created with a status of
draft. - At the bill's due date, the bill transitions to
openand a payment is automatically attempted. - If the payment succeeds, the bill transitions to
paidand the next bill is created. - If the payment fails, the bill transitions to
past_dueand will be sent to recovery or remains available for manual action. - When the cycle limit is reached, the subscription is automatically cancelled and no further bills are created.
Payment webhook notifications
Each time a payment is attempted against a bill, a status_update webhook is sent to the subscription's webhook_url. The webhook body includes the subscription_id and bill_id, so you can tie the payment outcome back to the exact bill. For the payload, field details, and an example, see Bill Payment Webhooks.
Bill status
Each bill transitions through the following statuses:
| Status | Description |
|---|---|
draft | The bill has been created but payment has not yet been attempted. This is the initial status for all bills. |
open | The bill is finalised and due to be charged (draft→open happens before the payment attempt is made). |
past_due | A 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. |
unpaid | A payment recovery for the bill ended without collecting, so collection has stopped. Set automatically when a recovery finishes unrecovered — see Recovery outcomes and Subscription/Bill statuses. This status is terminal — an unpaid bill cannot be paid or voided. |
paid | The bill has been successfully paid. |
void | The bill has been voided and no payment will be collected. This status is irreversible. |
The allowed status transitions are:
draft→open,paid, orvoidopen→past_due,paidorvoidpast_due→paid,void, orunpaidpaid→voidunpaid→ no further transitionsvoid→ no further transitions
NoteWhen a payment attempt fails, the bill becomes
past_duerather thanvoid, so you can still act on it — recover the payment, or mark itpaidorvoidmanually.When a recovery for a
past_duebill completes, its outcome sets the final status automatically:paidif recovered, orunpaidif it ends without collecting. Cancelling a recovery makes no change — the bill stayspast_due.
To learn how to retrieve and update bills, see Managing Bills.
Bill payment timing
The default behaviour for setting payment times of all Bills is to take the same time as the subscription was activated. E.g.: activation occurred at 11:23am on Jan 1st, all future Bill payments taken at 11:23am on the 1st of Feb, Mar, etc.
If the subscription has a trial, the trial end date takes over as the anchor instead. The first paid Bill is taken at the trial end, and all future Bills work off that.
When you activate a subscription with an external transaction_id the clock starts from when you activate, not from when that external transaction actually happened.
| Scenario | What anchors the schedule | First Bill taken | Future Bills taken |
|---|---|---|---|
| Subscription activation and immediate payment | Activation time | 09:00am, Jan 1st | 09:00am on the 1st of Feb, Mar, Apr… |
| Subscription with Free Trial | Activate Jan 1st, trial ends 9:00am Jan 15th | Trial end date 9:00am, Jan 15th | 9:00am on the 15th of Feb, Mar, Apr… |
| Subscription activation with transaction_id | External payment completed 9:00am Jan 1st, subscription activation at 11:23am Jan 3rd | Activation time. The Jan 1st transaction time is ignored. Recorded as already Paid, dated 11:23am Jan 3rd. | 11:23am on the 3rd of Feb, Mar, Apr… |
Key takeaways:
- The anchor for Bill payment timing is picked in this order: trial end → activation time. If a trial is set, its end date wins; otherwise the schedule anchors to when the subscription was activated.
- Prepaid caveat: if the external payment happened days before you activate, the schedule drifts to activation + cycle, not real-payment + cycle. To bill on the original date, activate as close as possible to when the external payment was taken.
Scheduled payment times are best-effort: to manage system load we may batch or briefly delay Bill payments, so a payment may be taken shortly after its scheduled time (never before.
Updated 14 days ago