Guides
Upgrades, downgrades and cancel
Change a subscription's plan or end it. Upgrades charge the prorated difference now and switch only after the charge is captured; downgrades wait for the period end; cancel is at period end, or now when you must.
Every change below is POST /v1/subscriptions/{subscription_id} with an Idempotency-Key, or the MCP tool update_subscription with a request_key. A retry with the same key and body returns the first answer and never charges twice. Amounts are integer cents. The examples move between Pro at $29.00 a month (price_pro_m, 2900), Premium at $52.00 a month (price_prem_m, 5200) and Pro at $250.56 a year (price_pro_y, 25056).
| From, to | When it applies | What is charged |
|---|---|---|
| Pro monthly to Premium monthly (upgrade) | Now, once the charge is captured | The prorated difference, now |
| Premium monthly to Pro monthly (downgrade) | At current_period_end | Nothing now; the renewal is at the new price |
| Same price amount, other product (lateral) | At current_period_end | Nothing now |
| Pro monthly to Pro yearly | Now, once the charge is captured; the year starts now | The year minus unused time on the month |
| Pro yearly to Pro monthly | At current_period_end | Nothing now |
Upgrade
MCP: update_subscription with subscription_id, price: price_prem_m, proration_behavior: always_invoice and a new request_key (the tool fills in the item id).
proration_behavior: always_invoiceis required for any change charged now; without it the answer is400 proration_behavior_requiredand nothing happens. It is never guessed.- The charge is two lines, each rounded half up to the cent on its own, then added:
- credit: minus the unused fraction (time left in the period over the period's length, to the second) of what was actually paid for this period, which is the plan's price after the discount that applied to that payment, minus any refund. A refunded or voided period credits nothing, and the credit never exceeds what the period's invoices still hold.
- new plan: the same fraction of the new price after the discount active now. A
forevercode (or arepeatingone still in its window) applies; aoncecode was used up by the first invoice and does not. - Example, upgrading Pro $29 to Premium $52 at the start of a period: with 20% off forever the lines are -2320 and +4160 and the charge is 1840; with a 20% off once code the lines are -2320 and +5200 and the charge is 2880. A proration invoice lists no
discountsand no line hasdiscount_amounts: the discount is already inside each amount.
- The plan changes only after that payment is proven captured. Until then
pending_updateshows the new price and the customer keeps the old plan. A decline answers402 card_declined(orprocessor_rejected,payment_failed,payment_method_blocked) and the plan does not change. - An unknown outcome answers
502 processor_unavailableor409 invoice_reconciling. Retry with the same key; a new key answers409 change_pendingwhile that change is being paid. - A difference below the minimum charge (50 cents by default) is not charged now: the plan changes at once and the difference is added to the next renewal invoice.
proration_date(optional, Unix seconds) pins the moment to prorate from, for example when the customer saw the price. It must be inside the current period, not in the future and at most 1 hour old.- The subscription must be
active.past_dueanswers409 subscription_past_due: collect the open invoice first. At or aftercurrent_period_end, before the renewal ran, the answer is409 renewal_duewithRetry-After: 120. - Show the exact charge before the customer confirms:
POST /v1/invoices/create_previewwithsubscriptionandsubscription_detailsholding the sameitemsandproration_behavior(MCPpreview_invoicewithpriceandproration_behavior). It creates, changes and charges nothing, and needscatalog:readas well asinvoices:read(it shows the new price).amount_dueis what the update charges now, computed by the same code; send itssubscription_proration_dateasproration_dateon the update (within the hour) and the update charges exactly that amount.plan_change.amount_due_nowsays the same, and for a difference below the minimum charge it is 0 andnext_invoiceshows the renewal with the carried line. A downgrade previews the next renewal at the new price, withplan_change.effective_at. The preview answers the same refusals as the update.
Events: customer.subscription.updated when the proration invoice is created (latest_invoice names it, pending_update shows the new price; the plan has not changed yet), then invoice.paid for the proration invoice and customer.subscription.updated when the plan switches. When the charge fails (declined, refused by the processor, or the invoice voided), the plan does not change and the failure is announced too: a decline sends invoice.payment_failed (billing_reason: subscription_update, next_payment_attempt: null: the plan has not ended, do not treat it as a failed renewal), then invoice.voided, then customer.subscription.updated with pending_update: null and, if the upgrade had replaced a scheduled downgrade, that scheduled_change back (while a cancel at period end is pending the downgrade is kept but not shown, and comes back if the cancel is undone; if the period ends canceled it is discarded); a processor refusal or a void sends invoice.voided, then the same customer.subscription.updated. The last subscription event always matches GET /v1/subscriptions/{id} (except scheduled_change.blocked_by, below, which can change with no event).
Downgrade, lateral change, annual to monthly
The answer is 200 with the plan unchanged and scheduled_change: {price, effective_at, blocked_by}. At current_period_end the renewal is charged at the new price. Nothing is charged or credited now. change_timing: now on a downgrade answers 400 change_timing_unsupported.
To take it back before it applies: POST /v1/subscriptions/{subscription_id}/scheduled_change/cancel (MCP cancel_scheduled_change).
blocked_by is null unless the merchant's duplicate guard (subscription_guard) would keep the change from applying: the change was stored while the guard was off or looser, and another live subscription of the same customer now holds that price (under product and customer, that product). Then it reads scheduled_change_refused_subscription_exists: as things stand, the renewal cancels the change with that same data.reason.code and bills the current plan. The change stays listed and you can still cancel it. blocked_by is a reading of now: it changes with no event on this subscription when the other subscription starts, ends or changes plan, or the guard setting changes, so read GET when you need it fresh. It, the billing portal's next charge and the invoice preview all answer as of now: if the subscription holding the price is set to end before this renewal, the change reads blocked today but applies at the renewal once that subscription has ended. Two subscriptions of one customer both scheduled onto the same price block each other: whichever renews first loses its change, and the other's then applies.
Cancel at period end, and undo
MCP: update_subscription with cancel_at_period_end: true and a request_key. The subscription stays active until current_period_end, then ends canceled with customer.subscription.deleted. No renewal is charged, and a renewal declined meanwhile is not retried. To undo it before the period ends, send false.
A scheduled change (a downgrade waiting for the period end) is kept while the subscription is ending, but it is inactive: scheduled_change reads null, because nothing will change, the subscription ends. Undo the cancel and scheduled_change is back exactly as it was, in the same customer.subscription.updated that clears cancel_at_period_end. If the period ends with the cancel in place, the change is discarded with the subscription. POST /v1/subscriptions/{subscription_id}/scheduled_change/cancel while it is inactive discards it for good, so an undo then restores nothing. The inactive change still counts for the duplicate guard (unless subscription_guard is off): while it is kept, the customer cannot buy the change's target on another subscription (409 subscription_exists, "already has a subscription to this product" under product), although nothing shows the change. To let them buy it, cancel the scheduled change on the ending subscription first; that frees the target.
While the subscription is past_due, unpaid or incomplete, cancel_at_period_end: true cancels it now: there is no paid period to wait for. Stripe waits for the period end in that case; ZeroPoint does not.
The customer can do the same on the portal.
Cancel now
MCP: cancel_subscription. The subscription ends canceled at once with customer.subscription.deleted. Its open invoice is voided unless a payment on it is still being processed; that payment resolves by itself, and if it was captured the invoice is kept paid. Nothing is refunded.
Refunds are separate
Neither cancel refunds anything, and a refund or void never cancels the subscription. To give money back, reverse the payment that paid the invoice (payment_intent on the invoice is its pay_... id): POST /v1/payments/{payment_id}/void before settlement, POST /v1/payments/{payment_id}/refund after it. A not_settled_use_void answer means use the void; never switch on your own without the merchant's approval.