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

ParameterDescriptionExampleRequired as
serviceKeyCentili issued service key, unique for every payment service. Consists of alphanumeric characters and counts up to 32 characters.f31a355df6dad07e49ba474db7ff9b07 mandatory
country2 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

ParameterDescriptionExample
country2 letter country parameter. We are using "ISO 3166-1 alpha-2" standard. Here is full list of 2 letter country codes.rs
mccmncMobile country code and mobile network code.22003
currencyPackage currencyEUR
serviceDescirptionDescription of a given serviceExample one time payment service
canBillWeather the package is billable or nottrue
localCurrencyLocal package currencyRSD
operatorCodeCode of Mobile Network Operator in Centili’s system which end user belongs to.RS_MTS
operatorNameName of Mobile Network Operator in Centili’s system which end user belongs to.m:ts Serbia
packagesList 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:

ParameterDescriptionExampleRequired as
serviceKeyCentili issued service key, unique for every payment service. Consists of alphanumeric characters and counts up to 32 characters.f31a355df6dad07e49ba474db7ff9b07 mandatory
msisdnCustomer 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

ParameterDescriptionExample
country2 letter country parameter. We are using "ISO 3166-1 alpha-2" standard. Here is full list of 2 letter country codes.rs
mccmncMobile country code and mobile network code.22003
currencyPackage currencyEUR
localCurrencyLocal package currencyRSD
msisdn381644150105
operatorCodeCode of Mobile Network Operator in Centili’s system which end user belongs to.RS_MTS
operatorNameName of Mobile Network Operator in Centili’s system which end user belongs to.m:ts Serbia
packagesList 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

ParameterDescriptionExample
localPayoutMerchant payout in local currency42.5
unitPackage item name being solditem
amountPackage item amount being sold1
pricePackage price0.41
payoutMerchant payout0.35
localPricePackage price in local currency50
flowFlow typePIN