Subscriptions API

❗️

In order to use this API, You will need to send Authentiaction Header !

click here to read more...

👍

This API will give You the overview of all subscriptions...

🚧

Request must be sent as HTTP POST with Content-Type: application/json.

URL to which request should be posted

https://api.centili.com/v1/subscriptions

Example of POST request

HTTP/1.1
POST https://api.centili.com/v1/subscriptions
Host: api.centili.com:443
Content-Type: application/json

{
"serviceKey":"2ea0e6c989b433d6c591633f91c67e07",
"optInTrid":"4970484531",
"msisdn":"66876696573"
}

Example of response

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

{
"active":true,
"country":"pt",
"currency":"EUR",
"lastCharge":"2017-09-07 15:17:12",
"merchant":"Go4Mobile",
"msisdn":"35176696573",
"operator":"PT_NOS",
"optInTrid":4970484531,
"period":"DAY",
"periodAmount":1,
"price":6.05,
"provider":"PT_NOS",
"providerReference":null,
"service":"Games Unlimited",
"serviceKey":"0fc073fbcba49xzc9155dd57a08454b2",
"subscriptionControl":"SYSTEM",
"subscriptionId":4304126630,
"timeSubscribed":"2017-08-07 15:17:12",
"timeSubscribedLocal":"2017-08-07 16:17:12",
"timeToExpire":null,
"timeUnsubscribed":null,
"timeUnsubscribedLocal":null,
"userId":"35176696573"
}

All parameters which You can send in request, or get in response

ParameterRequestResponseExample of param valueInfo
"active"true - user is subscribed
false - user is not subscribed
Shows if subscription is active or not.
"country"“pt”2 letters country parameter. We are using "ISO 3166-1 alpha-2" standard. Here is full list of 2 letter country codes.
"currency"“EUR”Currency in which price is presented.
"lastCharge"null - if there was none
yyyy-MM-dd HH:mm:ss
Date of the last successful renewal.
"merchant""Go4Mobility"Name of the merchant in Centili’s system.
"msisdn"“66876696573”Mobile (phone) number of customer.
It is in E.164 format excluding plus ("+") character.
"operator"“PT_NOS”Mobile Network Operator code in Centili’s system.
"optInTrid"4970484531"transactionId" of the opt-in transaction.
"period"“DAY”
"WEEK"
"MONTH"
Subscription interval unit.
"periodAmount"1
2
3
...
Amount of subscription interval units.

1 - DAY -> once per day
3 - DAY -> every 3 days
2 - WEEK -> every 2 weeks
"price"1.50
2.75
7.00
...
Price which end-user will pay when successfully charged (successful renewal) in local currency with VAT included.
Price for every service is set up on Centili platform.

* When using price in request, it should be sent in the format:
"price" : {"gt":"5.00" , "lt":"5.00"}
where "gt" means greater then, and "lt" means less then.
"provider"“PT_NOS”
"TELENOR_GROUP"
"ORANGE_GROUP"
...
Provider code in Centili’s system.
"providerReference"null"subscriptionId" in Operator's system (if Operator has subscription management on their side)
"service"“Games Unlimited”Name of the service in Centili’s system.
"serviceKey"“0fc073fbcba4916c9155dd57a08454b2”Unique identifier of each service registered inside Centili Payment Platform (API key).
Consists of alphanumeric characters and counts up to 32 characters.
"subscriptionControl"“SYSTEM" - Centili
"PROVIDER" - Provider or Operator
"MERCHANT"
Indicates who is controlling renewals.
“SYSTEM" - Centili
"PROVIDER" - Provider or Operator
"subscriptionId"4304326630Unique subscription identifier in Centili Payment Platform. Used to identify any particular subscription within Centili system.
"timeSubscribed"yyyy-MM-dd HH:mm:ssUTC-0 time when subscription (opt-in) happened.

* When using dates in requests, they should be sent in the format:
"timeSubscribed" : {"gt":"2017-08-07 12:44:19" , "lt":"2017-08-07 13:44:19"}
where "gt" means greater then, and "lt" means less then.
"timeSubscribedLocal"yyyy-MM-dd HH:mm:ssTime when subscription (opt-in) happened in local time zone.

* request: "timeSubscribedLocal" : {"gt":"2017-08-07 12:44:19" , "lt":"2017-08-07 13:44:19"}
"timeToExpire"null - not valid subscription
2017-09-13 11:39:25
Time when subscription will stop being valid.

* request: "timeToExpire" : {"gt":"2017-08-07 12:44:19" , "lt":"2017-08-07 13:44:19"}
"timeUnsubscribed"null
yyyy-MM-dd HH:mm:ss
UTC-0 time when subscription ended (when opt-out happened).

* request: "timeUnsubscribed" : {"gt":"2017-08-07 12:44:19" , "lt":"2017-08-07 13:44:19"}
"timeUnsubscribedLocal"null
yyyy-MM-dd HH:mm:ss
Time when subscription ended (when opt-out happened) in local time zone.

* request: "timeUnsubscribedLocal" : {"gt":"2017-08-07 12:44:19" , "lt":"2017-08-07 13:44:19"}
"userId"“66876696573”Identification of the end user performing payment.
By default it is msisdn of the end-user, but it can contain some other string which is meaningful to out merchants.