Get Packages
Obtain billable packages for a service
In order to get available packages for service and country or subscriber with Centili Payment API, you need to send an HTTP GET request with the appropriate service and country or subscriber.
Before initiating a get packages request you will need to obtain an access token
GET packages for country request
URL to which a request should be sent
https://capi.centili.com/payments/v3/services/packages
https://capi.centili.com/payments/v3/services/packages?serviceKey={serviceKey}&country={country}
Host: capi.centili.com:443
Content-Type: application/json
Authorization: bearer token
Request parameters
Parameter | Description | Example | Required as |
---|---|---|---|
serviceKey | Centili issued service key, unique for every payment service. Consists of alphanumeric characters and counts up to 32 characters. | f31a355df6dad07e49ba474db7ff9b07 | mandatory |
country | 2 letters country parameter. We are using "ISO 3166-1 alpha-2" standard. Here is full list of 2 letter country codes. | es | mandatory |
GET packages for country 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
Obtained packages for country
[
{
"country": "rs",
"mccmnc": "22001",
"currency": "EUR",
"serviceDescription": "",
"canBill": true,
"localCurrency": "RSD",
"operatorCode": "RS_TELENOR",
"packages": [
{
"localPayout": 42.5,
"unit": "item",
"amount": 1,
"price": 0.41,
"payout": 0.35,
"localPrice": 50,
"flow": "PIN"
},
{
"localPayout": 63.75,
"unit": "item",
"amount": 2,
"price": 0.61,
"payout": 0.52,
"localPrice": 75,
"flow": "PIN"
},
{
"localPayout": 85,
"unit": "item",
"amount": 3,
"price": 0.81,
"payout": 0.69,
"localPrice": 100,
"flow": "PIN"
}
],
"operatorName": "Telenor Serbia"
},
{
"country": "rs",
"mccmnc": "22005",
"currency": "EUR",
"serviceDescription": "",
"canBill": true,
"localCurrency": "RSD",
"operatorCode": "RS_VIP",
"packages": [
{
"localPayout": 42.08,
"unit": "item",
"amount": 1,
"price": 0.41,
"payout": 0.34,
"localPrice": 50,
"flow": "PIN"
},
{
"localPayout": 63.11,
"unit": "item",
"amount": 2,
"price": 0.61,
"payout": 0.51,
"localPrice": 75,
"flow": "PIN"
},
{
"localPayout": 84.15,
"unit": "item",
"amount": 3,
"price": 0.81,
"payout": 0.68,
"localPrice": 100,
"flow": "PIN"
}
],
"operatorName": "VIP Mobile Serbia"
},
{
"country": "rs",
"mccmnc": "22003",
"currency": "EUR",
"serviceDescription": "",
"canBill": true,
"localCurrency": "RSD",
"operatorCode": "RS_MTS",
"packages": [
{
"localPayout": 42.5,
"unit": "item",
"amount": 1,
"price": 0.41,
"payout": 0.35,
"localPrice": 50,
"flow": "PIN"
},
{
"localPayout": 63.75,
"unit": "item",
"amount": 2,
"price": 0.61,
"payout": 0.52,
"localPrice": 75,
"flow": "PIN"
},
{
"localPayout": 85,
"unit": "item",
"amount": 3,
"price": 0.81,
"payout": 0.69,
"localPrice": 100,
"flow": "PIN"
}
],
"operatorName": "m:ts Serbia"
}
]
Response parameters
Parameter | Description | Example |
---|---|---|
country | 2 letter country parameter. We are using "ISO 3166-1 alpha-2" standard. Here is full list of 2 letter country codes. | rs |
mccmnc | Mobile country code and mobile network code. | 22003 |
currency | Package currency | EUR |
serviceDescirption | Description of a given service | Example one time payment service |
canBill | Weather the package is billable or not | true |
localCurrency | Local package currency | RSD |
operatorCode | Code of Mobile Network Operator in Centili’s system which end user belongs to. | RS_MTS |
operatorName | Name of Mobile Network Operator in Centili’s system which end user belongs to. | m:ts Serbia |
packages | List of packages for a given service and operator. See (https://dev.centili.com/docs/get-packages-country#packages) | { "localPayout": 42.5, "unit": "item", "amount": 1, "price": 0.41, "payout": 0.35, "localPrice": 50, "flow": "PIN" }, { "localPayout": 63.75, "unit": "item", "amount": 2, "price": 0.61, "payout": 0.52, "localPrice": 75, "flow": "PIN" }, |
4xx client error / 5xx server error
400 - Bad request parameters - check message for details
401 - Invalid credentials
404 - Packages not found
500 - Request can not be processed at the current time
HTTP/1.1 404 Not Found
Content-Type: application/json
{
"code": "NOT_FOUND",
"message": "Packages not found"
}
GET packages for subscriber request
URL to which a request should be sent
https://capi.centili.com/payments/v3/services/packages/subscribers
https://capi.centili.com/payments/v3/services/packages/subscribers?serviceKey={serviceKey}&msisdn={msisdn}
Host: api.centili.com:443
Content-Type: application/json
Authorization: bearer token
Request parameters:
Parameter | Description | Example | Required as |
---|---|---|---|
serviceKey | Centili issued service key, unique for every payment service. Consists of alphanumeric characters and counts up to 32 characters. | f31a355df6dad07e49ba474db7ff9b07 | mandatory |
msisdn | Customer mobile phone number. | 4477781234567 | mandatory |
GET packages for subscriber 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
Obtained packages for subscriber
{
"country": "rs",
"mccmnc": "22003",
"currency": "EUR",
"localCurrency": "RSD",
"msisdn": "381644150105",
"operatorCode": "RS_MTS",
"packages": [
{
"localPayout": 42.5,
"price": 0.41,
"payout": 0.35,
"localPrice": 50,
"flow": "PIN"
},
{
"localPayout": 63.75,
"price": 0.61,
"payout": 0.52,
"localPrice": 75,
"flow": "PIN"
},
{
"localPayout": 85,
"price": 0.81,
"payout": 0.69,
"localPrice": 100,
"flow": "PIN"
},
{
"localPayout": 85,
"price": 0.81,
"payout": 0.69,
"localPrice": 100,
"flow": "PIN"
}
],
"operatorName": "m:ts Serbia"
}
Response parameters
Parameter | Description | Example |
---|---|---|
country | 2 letter country parameter. We are using "ISO 3166-1 alpha-2" standard. Here is full list of 2 letter country codes. | rs |
mccmnc | Mobile country code and mobile network code. | 22003 |
currency | Package currency | EUR |
localCurrency | Local package currency | RSD |
msisdn | 381644150105 | |
operatorCode | Code of Mobile Network Operator in Centili’s system which end user belongs to. | RS_MTS |
operatorName | Name of Mobile Network Operator in Centili’s system which end user belongs to. | m:ts Serbia |
packages | List of packages for a given service and msisdn. See (https://dev.centili.com/docs/get-packages-country#packages) | { "localPayout": 42.5, "price": 0.41, "payout": 0.35, "localPrice": 50, "flow": "PIN" }, { "localPayout": 63.75, "price": 0.61, "payout": 0.52, "localPrice": 75, "flow": "PIN" } |
4xx client error / 5xx server error
400 - Bad request parameters - check message for details
401 - Invalid credentials
404 - Packages not found
500 - Request can not be processed at the current time
HTTP/1.1 404 Not Found
Content-Type: application/json
{
"code": "NOT_FOUND",
"message": "Packages not found"
}
Packages
Parameter | Description | Example |
---|---|---|
localPayout | Merchant payout in local currency | 42.5 |
unit | Package item name being sold | item |
amount | Package item amount being sold | 1 |
price | Package price | 0.41 |
payout | Merchant payout | 0.35 |
localPrice | Package price in local currency | 50 |
flow | Flow type | PIN |
Updated 11 months ago