Initiate Subscription Cancelation

Initate a subscription cancelation

In order to cancel a subscription/unsubscribe a user from Centili platform using Centili Payment API, you need to send an HTTP POST request with Content-Type: application/json composed of parameters with associated values.

Before initiating a cancel subscription request you will need to obtain an access token

URL to which a request should be sent{subscriptionid}/cancel

POST subscription cancel request{subscriptionId}/cancel HTTP/1.1
Content type: application/json
Authorization: bearer token

Request parameters

ParameterDescriptionExampleRequired as
subscriptionidUnique identifier of subscription in Centili system.6000557067 mandatory

POST subscription cancel response

Once a request is received, Centili will synchronously respond with an appropriate HTTP response and a list of parameters and values in JSON format:



Subscription cancel transaction created

HTTP/1.1 200 OK
Content-Type: application/json

    "transactionId": "17000002453",
    "subscriptionId": "6000557067",
    "clientData": {
        "clientUserId": null,
        "clientReference": null

Response parameters:

transactionIdUnique identifier of a transaction in Centili system.17000002453
subscriptionIdUnique identifier of a subscription in Centili system.6000557067
clientDataClient related parameters. See ({
"clientUserId": "usrId1983",
"clientReference": "appID1"

Client data

clientUserIdIdentification of the customer.usrId1983
clientReferenceUnique identification parameter under your system (pass-through variable).appID1


4xx client error / 5xx server error

400 - Subscription cannot be canceled - check message for details.
401 - Invalid credentials
404 - Subscription not found
429 - Number of attempts over the max retry limit, request can not be retried.
500 - Request can not be processed at the current time

HTTP/1.1 404 Not Found
Content-Type: application/json

    "code": "NOT_FOUND",
    "message": "Subscription does not exist"
codeError response codeNOT_FOUND
messageError response messageSubscription does not exist