Cancel subscription

Use this endpoint to cancel a subscription.

post/subscriptions/{subscriptionId}/cancel

Request

  • Base URL
    https://api.sandbox.cleeng.com/3.1
  • URL
    https://api.sandbox.cleeng.com/3.1/subscriptions/{subscriptionId}/cancel
  • Auth
    API key in header X-Publisher-Token

Path parameters

subscriptionIdinteger required

Subscription identifier in Cleeng.

Headers

Content-Typestring

Request body

cancellationReasonstring required

Any reason. In case of subscription being terminated, the reason will be stored in subscribers report. The field cannot be null or empty string.

Response

200

subscriptionIdinteger
paymentDetailsIdinteger
publisherIdinteger
customerIdinteger
statusstring
dateFrominteger
dateTointeger
nextPaymentActionstring
nextPaymentActionDateinteger
subscriptionExternalIdunknown
offerIdstring
paymentCountrystring
ipAddressstring
inTrialboolean
couponCodestring
pendingSwitchIdstring
externalPropertiesobject
paymentMethodIdinteger
isExternallyManagedboolean
sourcestring
terminationTypeunknown

Example response

{
  "subscriptionId": 1999999999,
  "paymentDetailsId": 999999999,
  "publisherId": 999999999,
  "customerId": 999999999,
  "status": "cancelled",
  "dateFrom": 1,
  "dateTo": 1,
  "nextPaymentAction": "capture",
  "nextPaymentActionDate": 1,
  "offerId": "string",
  "paymentCountry": "string",
  "ipAddress": "string",
  "inTrial": true,
  "couponCode": "string",
  "pendingSwitchId": "1fa12f34-1234-1234-b1fc-1c123f12afa1",
  "isExternallyManaged": true,
  "replacedBy": {
    "subscriptionId": 1999999999,
    "reason": "string"
  },
  "originatedFrom": {
    "subscriptionId": 1999999999,
    "reason": "string"
  },
  "source": "string",
  "renewalCycle": {
    "unit": "month",
    "amount": 3
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.