Sazabi
APIBilling

Schedule subscription cancellation

POST
/billing/subscription-cancellation

Schedule cancellation at the end of the paid billing cycle.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/billing/subscription-cancellation" \  -H "Content-Type: application/json" \  -d '{}'
{  "currentPlan": {    "slug": "string",    "name": "string",    "price": "string",    "currency": "string",    "targetCreditBalance": "string",    "subscriptionStatus": "string",    "cycleStartsAt": "2019-08-24T14:15:22Z",    "cycleEndsAt": "2019-08-24T14:15:22Z",    "renewalAt": "2019-08-24T14:15:22Z",    "pendingSwitch": {      "billingSubscriptionChangeId": "string",      "effectiveAt": "2019-08-24T14:15:22Z",      "planSlug": "string",      "planName": "string",      "price": "string",      "currency": "string",      "targetCreditBalance": "string"    },    "pendingCancellation": {      "effectiveAt": "2019-08-24T14:15:22Z"    }  },  "effectiveAt": "2019-08-24T14:15:22Z",  "currentBalance": "string",  "servicePolicy": "active_until_period_end",  "creditPolicy": "dormant_until_resubscription",  "scheduledFinalCharge": "string",  "autoTopUpEnabled": true,  "pendingDowngrade": {    "billingSubscriptionChangeId": "string",    "effectiveAt": "2019-08-24T14:15:22Z",    "planSlug": "string",    "planName": "string",    "price": "string",    "currency": "string",    "targetCreditBalance": "string"  },  "calculatedAt": "2019-08-24T14:15:22Z",  "billingSubscriptionChangeId": "string",  "alreadyScheduled": true}