Skip to main content
POST
Preview a plan change

Body

application/json
planSlug
string
required
Required string length: 1 - 100
organizationId
string

Organization to operate on. Auto-filled from CLI and SDK context when omitted. User tokens must supply it unless the credential's fixed scope resolves it; secret keys may omit it (the key's organization applies).

Minimum string length: 1
discountCode
string

A promotion code to apply to the upgrade's immediate charge and, when the coupon repeats, to later renewals.

Required string length: 1 - 100

Response

200 - application/json

OK

calculatedAt
string<date-time>
required
type
enum<string>
required
Available options:
upgrade,
downgrade
effectiveAt
string<date-time>
required
currency
string
required
currentPlanSlug
string
required
targetPlanSlug
string
required
currentPlanName
string
required
targetPlanName
string
required
currentPlanPrice
string
required
targetPlanPrice
string
required
currentCycleCredits
string
required
currentTargetCreditBalance
string
required
cycleCredits
string
required

Credits added to the balance each billing cycle (billing_plans.config.cycleCredits). Additive, never a balance target.

targetCreditBalance
string
required
creditDeficitAmount
string
required
creditDeficitChargeAmount
string
required
additionalCreditPrice
string
required
immediateChargeAmount
string
required
subscriptionChargeAmount
string
required
proratedCreditGrantAmount
string
required
remainingCycleFraction
string
required
nextCycleStartsAt
string<date-time>
required
nextCycleChargeAmount
string
required

The next renewal's plan charge, net of a discount that applies to renewals.

discount
object | null
required
paymentMethod
object | null
required

The payment method an upgrade charges; null for a downgrade or with none on file.