Billing

Preview a plan change

Changed on

Preview the cost and effect of changing to a plan without applying it. Requires a user credential with billing:manage.

post/billing/plan-change/preview

Request

  • Base URL: https://api.sazabi.com/v1
  • URL: https://api.sazabi.com/v1/billing/plan-change/preview
  • Auth: none declared

Request body

organizationIdstring

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).

planSlugstring required
discountCodestring

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

Response

OK

calculatedAtstring date-time required
type'upgrade' | 'downgrade' required
effectiveAtstring date-time required
currencystring required
currentPlanSlugstring required
targetPlanSlugstring required
currentPlanNamestring required
targetPlanNamestring required
currentPlanPricestring required
targetPlanPricestring required
currentCycleCreditsstring required
currentTargetCreditBalancestring required
cycleCreditsstring required

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

targetCreditBalancestring required
creditDeficitAmountstring required
creditDeficitChargeAmountstring required
additionalCreditPricestring required
immediateChargeAmountstring required
subscriptionChargeAmountstring required
proratedCreditGrantAmountstring required
remainingCycleFractionstring required
nextCycleStartsAtstring date-time required
nextCycleChargeAmountstring required

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

Changes

    • info

      added the new optional request property

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status