Skip to main content
Once a subscription exists you can change it over its lifetime. Every change is available through the Update Subscription endpoint (and cancellation through Cancel Subscription), or from your dashboard.
One change per request. Each update carries exactly one intent: change the plan, or the seat count, or the payment method, or the trial, or the metadata. Combining them in a single request returns 400.
Fetch the current state first with Get Subscription; every update returns the full, updated subscription object.

Change the plan

Move a subscriber to a different plan by sending the target product_id. Bachs resolves the price from that product for the subscription’s currency, so you name the plan and the plan owns the price. Include a proration_behavior to say how the price difference is settled.
  • invoice_now: apply now and settle the difference immediately (upgrade charged, downgrade credited).
  • next_cycle: apply now, roll the difference into the next renewal.
  • none: change the terms with no proration.
The target product must have a price in the subscription’s currency, otherwise the request returns 400. A product on a different billing cycle, for example monthly to annual, is not applied now. It is staged in pending_update and takes effect at the next renewal. This works only on a subscription with one item, because every item bills on the subscription’s one cycle. On a subscription with more than one item, a billing cycle change returns 400. A downgrade’s credit goes to the customer’s credit balance and is applied to future invoices automatically. See How proration works for the full model.

Change the seat count

If you charge per user, the plan’s price is the price of one seat. Send the new total as seats.
seats is the new total, not the number to add. To go from 3 seats to 5, send 5.
  • Adding seats charges the difference for the rest of the current period. proration_behavior decides when: now (invoice_now, the default), on the next renewal (next_cycle), or not at all (none). Every renewal after that bills the new count.
  • Removing seats gives the customer a prorated credit, whatever proration_behavior you send. The credit is used on their next invoices.
For example, a plan costs $10 per seat each month. Halfway through the month the customer goes from 3 seats to 5. With `invoice_now` they pay $10 now: 2 extra seats for half a month. Their next renewal is $50. The response shows the count as seats on the subscription and on each item. quantity is the same number. A subscription with more than one priced item needs subscription_item_id to say which item to change. Without it the request returns 400 and lists the item IDs. On those subscriptions the top-level seats is null, so read each item’s seats instead.
seats must be 1 or more. The subscription must be active, trialing or past_due.

Manage the trial

Add, extend, or end a trial by setting trial_end. A future timestamp adds or extends the trial (nothing is charged); a past-or-now timestamp ends it and bills the first cycle immediately. On an active subscription, the trial must end after current_period_end, because the customer has already paid until then.
Full details, including ending a trial early, are on the Trials page.

Update the metadata

Merge into the subscription’s key-value metadata (up to 20 keys). Sent keys are added or overwritten and any keys you don’t mention are left untouched. To remove one key, send it with an empty-string value; to clear everything, send "".
Metadata is first attached at the checkout session that starts the subscription and copied onto it on success; this endpoint lets you change it afterward. The system-managed checkout_id key is preserved and can’t be overwritten.

Cancel a subscription

Cancel with the Cancel Subscription endpoint. You choose when the cancellation takes effect with cancel_at_period_end.
The subscription keeps working until current_period_end (the customer paid for that period), then transitions to canceled. Bachs sets cancel_at_period_end: true and emits customer.subscription.updated.
This is the gentler option: no partial refund, no interruption, access continues to the date they already paid for.
reason is optional (max 255 characters) and is stored on the subscription. Canceling an already-canceled subscription returns 400.

What makes a subscription canceled

A subscription reaches the terminal canceled status in exactly three ways:
  1. Immediate cancel: a DELETE with cancel_at_period_end: false.
  2. Scheduled cancel reaching the period end: after a DELETE with cancel_at_period_end: true, when current_period_end passes.
  3. Payment recovery exhausted: a subscription in recovery runs out of retries and your account is set to cancel (the default). The cancellation reason is payment_failed.
Once canceled, a subscription is terminal; a later payment can’t revive it. The customer must start a new subscription.

What customers can do themselves

When a payment fails, the customer receives an email with a hosted link to update their card. Completing it charges the outstanding invoice and reactivates the subscription, with no action needed from you. See Recover failed payments.

Proration

How plan and seat changes are settled.

Subscriptions API

List, retrieve, update, and cancel subscriptions programmatically.