Upgrade or downgrade the plan
Switch the subscription to a different recurring Product (the “plan”). The direction is derived from the price.
Upgrade (higher price) → applies immediately, customer-present. The customer does not have to re-enter a card: set useCustomerPaymentMethod: true to charge the instrument saved at the first cycle (a 3DS challenge still surfaces on-session if the issuer requires it), or pass method + card.tokenizedInstrument for a fresh token. Same cadence charges the prorated difference for the rest of the cycle; a different cadence (e.g. monthly → annual) charges the full new price and resets the billing anchor. The plan swaps when that charge completes — the response is 202 with payment (+ checkout when a 3DS/redirect action is needed) and applied: false; the swap is confirmed by a subscription.updated webhook.
Downgrade (lower price) → scheduled for the period end (no charge, no card): the next renewal bills the lower price. applied: false.
VAT (Merchant-of-Record) is recomputed on the target plan at charge time from the customer’s billing country. The target plan must be ACTIVE, recurring, and share the current plan’s currency (cadence may differ).
Authorizations
Secret API key. sk_live_… (production) or sk_sandbox_… (sandbox).
Headers
Optional key (≤255 chars, e.g. a UUID v4) that makes this POST safe to retry: the first request executes and its response is cached for 24h; a retry with the SAME key replays that response instead of re-executing (no duplicate payment/subscription). A reused key with a different request → 422 IDEMPOTENCY_KEY_CONFLICT; a retry while the first is still in flight → 409. See the Idempotency guide.
255"5f3b9c2e-1a4d-4f2b-9c31-7e2a1b6d8c04"
Path Parameters
"sub_abc123"
Body
Target plan (recurring Product) id.
"pro_9m2k1x8s7d6f"
auto = upgrade now / downgrade at period end. now/period_end override the timing (a downgrade is always period-end).
auto, now, period_end delta charges the prorated price difference on an immediate upgrade; none swaps with no charge (applied: true).
delta, none Upgrade (DEFAULT true): charge the instrument SAVED at the first cycle (no card re-entry; 3DS surfaces on-session if the issuer challenges). Passing a fresh method + card overrides it; set false to force a fresh card.
Fresh-card upgrade only (when useCustomerPaymentMethod is not set). Ignored for a downgrade / free swap.
CARD, APPLE_PAY, GOOGLE_PAY Return URL after a 3DS/redirect on the upgrade CIT.

