Skip to main content
POST
Use POST /subscription/{id}/change-plan to move a subscriber to a different plan — either upgrading to a higher-priced tier or downgrading to a lower one. You control whether the change takes effect immediately (with proration charged or absorbed today) or is scheduled for the next billing cycle.
A plan’s amount, interval, and intervalCount are immutable once it has active subscribers. To change pricing or cadence, create a new plan and use this endpoint to migrate subscribers to it.
planId (target plan) is required; applyAt (now | next_billing, defaults to next_billing) controls timing — see the parameters panel above.

Response

Returns 200 OK with the updated subscription object. When applyAt is "next_billing", the response includes a scheduledPlanChange object with the planId and effectiveAt timestamp.

Errors

If you want to offer a discounted intro period on the new plan, create the new plan with introAmount and introBillingCycles set before running change-plan. The subscriber will receive the intro pricing from their first cycle on the new plan.

Authorizations

Authorization
string
header
required

Your secret API key: Bearer prv_production_xxx (production) or Bearer prv_sandbox_xxx (sandbox).

Path Parameters

id
string
required

Body

application/json
merchantCode
string
required

Your merchant account identifier.

planId
integer
required

ID of the plan to switch to.

applyAt
enum<string>

When the change takes effect. next_billing (default) stores it as pending and applies it at the next cycle with no immediate charge. now applies immediately - an upgrade charges the prorated difference by MIT straight away; a downgrade switches immediately with no refund and the lower amount takes effect next cycle.

Available options:
now,
next_billing

Response

200 - application/json

Plan changed

A customer enrollment in a plan. plan is embedded on single-subscription responses. Invoice/event history is not included here - use the invoice endpoints.

id
string

Subscription UUID.

merchantId
integer

The merchant account that owns the subscription.

planId
integer

ID of the plan this subscription is enrolled in.

customerEmail
string

Subscriber email, used for billing and dunning notifications.

customerName
string

Subscriber name as it appears on invoices.

customerDocument
string

Subscriber national ID / tax document, where a market requires it (e.g. Brazil CPF/CNPJ).

cardBrand
string

Brand of the card on the mandate, e.g. visa.

status
enum<string>

pending - awaiting first charge; trialing - in a free trial; active - billing normally; past_due - a renewal failed and dunning is running; suspended - dunning exhausted, needs a new CIT (POST /subscription/{id}/payment-method in CIT mode) to recover; paused - billing stopped on request, resumable; cancelled - terminated; completed - reached maxBillingCycles.

Available options:
pending,
trialing,
active,
past_due,
suspended,
paused,
cancelled,
completed
currentPeriodStart
string<date-time>

Start of the current billing period.

currentPeriodEnd
string<date-time>

End of the current billing period.

nextBillingDate
string<date-time>

When the next renewal charge is scheduled.

trialStart
string<date-time>

Trial start, when the plan has a trial.

trialEnd
string<date-time>

Trial end - the first real charge date.

dunningAttemptCount
integer

Failed-renewal retry attempts made in the current dunning sequence.

activatedAt
string<date-time>

When the subscription first became active.

cancelledAt
string<date-time>
pausedAt
string<date-time>
suspendedAt
string<date-time>
startAt
string<date-time>

Deferred start, when creation set a future startAt.

cyclesCompleted
integer

Number of billing cycles charged so far.

completedAt
string<date-time>

When the subscription reached maxBillingCycles.

parentSubscriptionId
string

Parent subscription UUID, for add-on hierarchies.

propagateLifecycle
boolean

Whether pause/cancel on the parent cascades to this subscription.

pendingPlanId
integer

Plan the subscription will switch to at the next cycle, set by a next_billing change-plan.

createdAt
string<date-time>
updatedAt
string<date-time>
plan
object

A reusable billing plan. amount is a flat integer in the currency minor units (with separate currency + exponent) - not an Amount object.