Developer Docs

Update a subscription

Single declarative entry point for every subscription update. Exactly one operation group is accepted per call:

Plan change (amountInCents, interval, intervalCount, cycleCount, name, description), with prorationBehavior controlling the money side. Two independent choices — when (now or at the next billing date) and whether to prorate — are folded into this single value, since proration only makes sense for an immediate change. PRORATE_NOW: apply immediately, with proration — an amount increase is charged pro-rata now (authorized, then captured once the change is applied); an amount decrease or a longer billing cycle applies now, a fresh billing cycle starts and the unused portion of the current cycle is credited to the customer's balance, only the net is charged. FULL_CHARGE_NOW: apply immediately, without proration — an amount increase is charged in full now (not scaled down for the days remaining in the cycle); an amount decrease or a longer billing cycle starts a fresh cycle now at the full new amount, with no credit for the unused portion. NEXT_PERIOD: the new plan takes effect at the next billing date, nothing charged or credited now. Defaults: amount increase and longer cycle use PRORATE_NOW; amount decrease and shorter cycle use NEXT_PERIOD. A shorter cycle only supports NEXT_PERIOD (PRORATE_NOW/FULL_CHARGE_NOW rejected) — the customer finishes the period already paid, then switches. No cash refund is ever issued: any excess credit stays on the customer's balance and is consumed by upcoming invoices. A body carrying only name and/or description renames the subscription labels: no billing change is applied and nothing is charged.

pauseCollection: pass an object (optionally with resumesAt) to pause payment collection, pass null explicitly to resume.

trialEnd: an ISO 8601 date extends a trial or postpones the next charge of an active subscription (forward only, at most one year); the special value "now" ends a trial immediately and starts billing; the special value "cancel" reverts a pending billing postponement or trial extension to its original date (only while that date is still in the future).

cancelAtPeriodEnd: true schedules the cancellation at the end of the current billing period, false reactivates a subscription in PENDING_CANCELLATION.

Replaces POST /subscription/:id/reactivate, which is deprecated.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Unique identifier of the subscription to update

Body Params
number

The new amount in cents. A higher amount is an upgrade, a lower amount a downgrade; how the difference is settled is controlled by prorationBehavior.

string
enum

The new billing interval. A longer cycle (e.g. month to year) accepts PRORATE_NOW, FULL_CHARGE_NOW or NEXT_PERIOD; a shorter cycle (e.g. year to month) only supports prorationBehavior: NEXT_PERIOD — the customer finishes the period already paid, then switches.

Allowed:
number

The new billing interval count. Defaults to the current subscription interval count.

number

Number of billing cycles after which the subscription ends, the current (or new) cycle counting as the first one. Only allowed on a subscription without an existing cycle limit.

string
enum

How the money side of a plan change is settled. Two independent choices — when (now or at the next billing date) and whether to prorate — are folded into this single enum, since proration only makes sense for an immediate change. PRORATE_NOW: apply immediately with proration — an amount increase is charged pro-rata now; an amount decrease or a longer cycle applies now, a fresh billing cycle starts and the unused portion of the current cycle is credited to the customer's balance (never refunded in cash), only the net is charged. FULL_CHARGE_NOW: apply immediately without proration — an amount increase is charged in full now (not scaled down for the days remaining); an amount decrease or a longer cycle starts a fresh cycle now at the full new amount with no credit for the unused portion. NEXT_PERIOD: the new plan takes effect at the next billing date, nothing is charged or credited now. Defaults: amount increase and longer cycle use PRORATE_NOW, amount decrease and shorter cycle use NEXT_PERIOD.

Allowed:
string

The new name of the subscription plan, if not provided, the current subscription name will be used. Sent alone (or with description), it only renames the subscription: no billing change, nothing charged.

string

The new description of the subscription plan, if not provided, the current subscription description will be used. Sent alone (or with name), it only renames the subscription: no billing change, nothing charged.

pauseCollection
object | null

Pauses or resumes payment collection. Pass an object (optionally with resumesAt) to pause an active subscription: invoices generated while paused are voided and the status becomes PAUSED. Pass null explicitly to resume a paused subscription. Cannot be combined with any other change.

string

End of the trial / next billing date. An ISO 8601 date extends a trial or postpones the next charge of an active subscription (forward only, at most one year — nothing is charged during the gap). The special value "now" ends a trial immediately and starts billing. The special value "cancel" reverts a pending billing postponement or trial extension: the next billing date (or trial end) moves back to what it was before the change, only possible while that original date is still in the future. Cannot be combined with any other change.

boolean

true schedules the cancellation of the subscription at the end of the current billing period (status becomes PENDING_CANCELLATION). false reactivates a subscription currently in PENDING_CANCELLATION. Cannot be combined with any other change.

string

The URL to redirect to after successful 3DS authentication, only relevant when the update triggers an immediate charge

string

The URL to redirect to after failed 3DS authentication, only relevant when the update triggers an immediate charge

boolean

Whether to save the payment method

boolean

Whether to use the customer's last saved payment method, it will get the current subscription's customer payment method

boolean

Whether to auto-confirm the payment, if not provided, the payment will be confirmed manually

string
enum

The pricing mode for the products

Allowed:
Responses

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json