Initiate Subscription Renewal
Initiate a subscription renewal transaction
In order to initiate subscription renewal with 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 subscription renewal request you will need to obtain an access token
URL to which a request should be sent
https://capi.centili.com/payments/v3/subscriptions/{subscriptionId}/renew
POST subscription renewal request
https://capi.centili.com/payments/v3/subscriptions/{subscriptionId}/renew HTTP/1.1
Host: capi.centili.com:443
Content-Type: application/json
Authorization:bearer token
{
"mt": null
}
Request parameters
Parameter | Description | Example | Required as |
---|---|---|---|
subscriptionId | Unique identifier of a subscription in Centili system. | 987654321 | mandatory |
mt | MT message which will be used for subscription renewal. If not sent a system configured message will be used. | Your subscription has been renewed | optional |
POST subscription renewal 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:
200
Subscription renewal transaction created
HTTP/1.1 200 OK
Content-Type: application/json
{
"transactionId": "17000002453",
"subscriptionId": "6000557067",
"clientData": {
"clientUserId": null,
"clientReference": null
}
}
Response parameters
Parameter | Description | Example |
---|---|---|
transactionId | Unique identifier of a transaction in Centili system. | 17000002453 |
subscriptionId | Unique identifier of a subscription in Centili system. | 6000557067 |
clientData | Client related parameters. See (https://dev.centili.com/docs/subscription-renew#client-data) | { "clientUserId": "usrId1983", "clientReference": "appID1" } |
Client Data
Parameter | Description | Example |
---|---|---|
clientUserId | Identification of the customer. | usrId1983 |
clientReference | Unique identification parameter under your system (pass-through variable). | appID1 |
4xx client error / 5xx server error
400 - Subscription renewal transaction cant be created - 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 not found"
}
Parameter | Description | Example |
---|---|---|
code | Error response code | CANCELED_BY_USER |
message | Error response message | Canceled by user |
Updated 11 months ago