Logoelepay
Subscriptions

Cancel subscription

Cancels the subscription and ends it at the end of the current period. A canceled subscription cannot be restarted. A subscription that is being processed cannot be canceled.

POST
/subscriptions/{subscriptionId}/cancel
Subscription ID

Response Body

application/json

OK

TypeScript Definitions

Use the response body type in TypeScript.

curl -X POST "https://api.elepay.io/subscriptions/string/cancel"
{
  "id": "string",
  "appId": "string",
  "object": "subscription",
  "liveMode": true,
  "customerId": "string",
  "customer": {
    "id": "string",
    "object": "customer",
    "liveMode": true,
    "defaultSource": "string",
    "name": "string",
    "description": "string",
    "email": "string",
    "phone": "string",
    "remark": "string",
    "operator": "string",
    "status": "active",
    "metadata": {},
    "updateTime": 0
  },
  "nextChargeTime": 0,
  "isCharging": true,
  "chargedPeriods": 0,
  "metadata": {},
  "status": "new",
  "createTime": 0,
  "updateTime": 0
}