APIBilling
Preview a plan change
Preview the cost and effect of changing to a plan without applying it. Requires a user credential with billing:manage.
POST https://api.sazabi.com/v1/billing/plan-change/preview
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", "currentCycleCredits": "string", "currentTargetCreditBalance": "string", "cycleCredits": "string", "targetCreditBalance": "string", "creditDeficitAmount": "string", "creditDeficitChargeAmount": "string", "additionalCreditPrice": "string", "immediateChargeAmount": "string", "subscriptionChargeAmount": "string", "proratedCreditGrantAmount": "string", "remainingCycleFraction": "string", "nextCycleStartsAt": "2019-08-24T14:15:22Z", "nextCycleChargeAmount": "string", "discount": { "source": "code", "code": "string", "couponId": "string", "name": "string", "percentOff": "string", "amountOff": "string", "duration": "once", "durationInMonths": -9007199254740991, "endsAt": "2019-08-24T14:15:22Z", "amount": "string", "totalAmount": "string", "appliesToRenewals": true, "stackedWith": [ { "couponId": "string", "name": "string", "percentOff": "string", "amountOff": "string", "duration": "once", "durationInMonths": -9007199254740991, "endsAt": "2019-08-24T14:15:22Z", "amount": "string", "appliesToRenewals": true } ] }, "paymentMethod": { "brand": "string", "last4": "string", "display": "string" }}