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:
Switching between invoicing and charging automatically
Callbilling.update with invoice_mode as the only change to switch how an existing subscription is collected. The switch applies from the next renewal: nothing is charged or invoiced now, and invoices that are already open keep their payment method.
- Switching to charging automatically requires a payment method on file; otherwise the request is rejected.
payment_method_typesoverrides your organization’s default payment methods. Omit it to keep the defaults.- If the request changes anything else (plan, quantities, items),
invoice_modedescribes how that change is billed instead of switching the subscription.
invoices.update.
Choosing how renewal invoices are issued
A customer’sconfig.renewal_issue_method controls how renewal invoices are issued for their subscriptions in invoice mode. Subscriptions that charge automatically are not affected.
Set it when you create the customer, with
customers.update, or with the Renewal issue method option in the customer’s Edit Config sheet in the dashboard. Pass null to clear it and go back to send. Updating it keeps the customer’s other config keys.
invoice_mode.issue_method on billing.attach only controls the subscription’s first invoice. Renewals follow the customer’s renewal_issue_method, not the value used at attach.
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":