billing.update to modify an existing subscription. This is different from billing.attach which is for attaching new plans or changing between plans.
When to use billing.update:
- Update feature quantities — if your plan contains prepaid features (like seats)
- Cancel or uncancel — cancel a subscription immediately or at end of cycle
- Customize the plan — modify pricing or feature configuration (advanced)
Updating prepaid feature quantities
Prepaid features are features where customers pay upfront for a quantity (e.g., seats, team members). Here’s an example plan with a prepaidseats feature:
To update the quantity of seats for a customer:
Canceling a subscription
UsecancelAction to cancel or uncancel a subscription:
| Action | Description |
|---|---|
cancel_end_of_cycle | Cancel at the end of the current billing period. Customer retains access until then. |
cancel_immediately | Cancel immediately with a prorated refund. |
uncancel | Reverse a pending cancellation (only works if not yet expired). |
How billing works
By default, updating a subscription with billing changes will generate an invoice:- Increasing quantity (e.g., adding seats) charges a prorated amount for the remainder of the billing cycle
- Decreasing quantity (e.g., removing seats) generates a credit applied to the next invoice
- Canceling immediately generates a negative invoice granting credits to the customer
Previewing changes before executing
Similar tobilling.previewAttach, you can use billing.previewUpdate to see exactly what will be charged before making changes. This returns line items and totals that you can display in a confirmation UI.
Skipping charges
If you want to update a subscription without creating any charges or credits, passprorationBehavior: "none":

