Sazabi
APIBilling

Preview a plan change

POST
/billing/plan-change/preview

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

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/billing/plan-change/preview" \  -H "Content-Type: application/json" \  -d '{    "planSlug": "string"  }'
{  "calculatedAt": "2019-08-24T14:15:22Z",  "type": "upgrade",  "effectiveAt": "2019-08-24T14:15:22Z",  "currency": "string",  "currentPlanSlug": "string",  "targetPlanSlug": "string",  "currentPlanName": "string",  "targetPlanName": "string",  "currentPlanPrice": "string",  "targetPlanPrice": "string",  "currentTargetCreditBalance": "string",  "targetCreditBalance": "string",  "creditDeficitAmount": "string",  "creditDeficitChargeAmount": "string",  "additionalCreditPrice": "string",  "immediateChargeAmount": "string",  "subscriptionChargeAmount": "string",  "proratedCreditGrantAmount": "string",  "remainingCycleFraction": "string",  "nextCycleChargeAmount": "string"}