Skip to main content
POST
cURL
Preview proration details for an immediate plan change without applying it. Free-to-paid changes are never scheduled and the change-plan endpoint always returns hosted checkout for them. For paid plans, interval direction takes precedence: a longer interval is immediate and a shorter interval is scheduled. When the interval is unchanged, a higher-sort-order plan is immediate and a lower-sort-order plan is scheduled. A paid-to-free change is always scheduled. Returns credit, charge, and net amount. The target plan must belong to the same plan group as the current plan, otherwise a 400 with code plans_not_in_same_group is returned. A change between two free plans has nothing to prorate and returns a zero-amount estimate. Scheduled changes return a 400 with code plan_change_scheduled; apply those via the change-plan endpoint. Pass offerId to quote the destination plan with an Offer.

Autorizaciones

x-api-key
string
header
requerido

Encabezados

Idempotency-Key
string

Unique key used to safely retry this write for 24 hours without applying it twice.

Required string length: 1 - 200
Commet-Version
string
predeterminado:2026-08-27

API version used by this reference. Send this header to select this contract explicitly.

Parámetros de ruta

id
string
requerido

Cuerpo

application/json
planId
string
requerido
Minimum string length: 1
billingInterval
enum<string>
Opciones disponibles:
weekly,
monthly,
quarterly,
yearly,
one_time
offerId
string
Minimum string length: 1

Respuesta

Success

currency
string
requerido
currentPlanCredit
integer
requerido
Rango requerido: -9007199254740991 <= x <= 9007199254740991
newPlanCharge
integer
requerido
Rango requerido: -9007199254740991 <= x <= 9007199254740991
estimatedTotal
integer
requerido
Rango requerido: -9007199254740991 <= x <= 9007199254740991
effectiveDate
string<date-time>
requerido
daysRemaining
integer
requerido
Rango requerido: -9007199254740991 <= x <= 9007199254740991
totalDays
integer
requerido
Rango requerido: -9007199254740991 <= x <= 9007199254740991
isUpgrade
boolean
requerido
object
string
requerido
Allowed value: "plan_change_preview"
livemode
boolean
requerido
offerApplication
object