Get Service Details
Get details for a single Storefront service using a serviceKey, country and a Storefront domain
nIn order to get service details using Centili Storefront Content API v1, you need to send an HTTP GET request with a domain name, service key, and country.
Before initiating a get services request you will need to obtain an access token
GET Service Details request
URL to which a request should be sent
https://capi.centili.com/content/v1/services/{serviceKey}/{country}?domain={domain}
https://capi.centili.com/content/v1/services/{serviceKey}/{country}?domain={domain}
Host: capi.centili.com:443
Authorization: bearer token
Request parameters
Parameter | Description | Example | Required as |
---|---|---|---|
domain | A Storefront domain name for which the services and categories are retrieved | store-demo.centili.com | mandatory |
serviceKey | Centili issued a service key, unique for every payment service. Consists of alphanumeric characters and counts up to 32 characters. | 388e8ff1fd2db5c2c644562e697fd0f1 | mandatory |
country | 2-letter country parameter. We are using "ISO 3166-1 alpha-2" standard. | rs | mandatory |
GET Service Details response
200
Obtained service details for a service key, country and a domain
Response example
{
"image":"https://store-demo.centili.com/res/sf/SF_DEMO/388e8ff1fd2db5c2c644562e697fd0f1.png?v=77",
"termsAndConditionsURL":"",
"validators":[
{
"trigger":"onchange",
"params":[
"email"
],
"url":"https://capi.centili.com/content/v1/params/validate/GaijinCheckProfileQA"
},
{
"trigger":"onsubmit",
"params":[
"email",
"package"
],
"url":"https://capi.centili.com/content/v1/params/validate/GaijinCheckItemQA"
}
],
"merchant":"Demo Storefront",
"description":"Fortnite is a survival game where 100 players fight against each other in player versus player combat to be the last one standing. It is a fast-paced, action-packed game, not unlike The Hunger Games, where strategic thinking is a must in order to survive.",
"helpURL":"",
"params":[
{
"imageUrl":"https://qa-a1.centili.com/res/sf/RS_A1_QA/gaijinUser.png",
"name":"email",
"stringFormatRegex":"",
"position":0,
"type":"String",
"required":true
},
{
"imageUrl":null,
"name":"test_param",
"stringFormatRegex":null,
"position":1,
"type":"String",
"required":false
}
],
"packages":[
{
"amount":1,
"unit":"item",
"paymentMethods":[
{
"reference":"fd7541a5-c1cd-4f3e-9b88-efeb0fdb4c76",
"code":"RS_VOUCHERS",
"price":10,
"oldPrice":null,
"merchantReference":null,
"currencyCode":"RSD"
},
{
"reference":"37f39ed2-e44c-4dd7-acdd-54e574ea8dd9",
"code":"IPG_TELEKOM",
"price":10,
"oldPrice":null,
"merchantReference":null,
"currencyCode":"RSD"
},
{
"reference":"37f39ed2-e44c-4dd7-acdd-54e574ea8dd9",
"code":"WS_PAY",
"price":10,
"oldPrice":null,
"merchantReference":null,
"currencyCode":"RSD"
}
],
"interval":null
},
{
"amount":2,
"unit":"item",
"paymentMethods":[
{
"reference":"d724ca32-c00d-4b5c-818f-5ba448c16cde",
"code":"IPG_TELEKOM",
"price":20,
"oldPrice":null,
"merchantReference":null,
"currencyCode":"RSD"
},
{
"reference":"d724ca32-c00d-4b5c-818f-5ba448c16cde",
"code":"WS_PAY",
"price":20,
"oldPrice":null,
"merchantReference":null,
"currencyCode":"RSD"
},
{
"reference":"a16362b3-31df-46ec-b332-04490199e178",
"code":"RS_DCB",
"price":20,
"oldPrice":null,
"merchantReference":null,
"currencyCode":"RSD"
}
],
"interval":null
},
{
"amount":3,
"unit":"item",
"paymentMethods":[
{
"reference":"fc5ac398-b582-43f4-a6c8-52b3dbb3dac9",
"code":"IPG_TELEKOM",
"price":30,
"oldPrice":null,
"merchantReference":null,
"currencyCode":"RSD"
},
{
"reference":"fc5ac398-b582-43f4-a6c8-52b3dbb3dac9",
"code":"WS_PAY",
"price":30,
"oldPrice":null,
"merchantReference":null,
"currencyCode":"RSD"
}
],
"interval":null
}
],
"paymentMethods":[
{
"code":"RS_VOUCHERS",
"providerCode":null,
"tosUrl":null,
"countryCode":"rs",
"name":"DEMO VOUCER",
"helpUrl":null,
"iconUrl":"https://store-demo.centili.com/res/sf/SF_DEMO/ico-voucher.png?v=77",
"operatorCode":"RS_VOUCHERS",
"type":"WALLET",
"order":2,
"paymentMethodParams":[
{
"validatorUrl":"",
"columnType":"String",
"regex":"",
"name":"voucher",
"required":true
}
],
"paymentAppContext":null
},
{
"code":"IPG_TELEKOM",
"providerCode":"RS_TELEKOM_IPG",
"tosUrl":null,
"countryCode":"rs",
"name":"IPG Telekom TEST",
"helpUrl":null,
"iconUrl":"https://store-demo.centili.com/res/sf/SF_DEMO/ico-cc.png?v=77",
"operatorCode":null,
"type":"CC",
"order":5,
"paymentMethodParams":null,
"paymentAppContext":"payment-widget"
},
{
"code":"WS_PAY",
"providerCode":"WS_PAY",
"tosUrl":null,
"countryCode":"rs",
"name":"WS Pay TEST",
"helpUrl":null,
"iconUrl":"https://store-demo.centili.com/res/sf/SF_DEMO/ico-cc.png?v=77",
"operatorCode":null,
"type":"CC",
"order":3,
"paymentMethodParams":null,
"paymentAppContext":"payment-widget"
},
{
"code":"RS_DCB",
"providerCode":null,
"tosUrl":null,
"countryCode":"rs",
"name":"RS DCB",
"helpUrl":null,
"iconUrl":"https://store-demo.centili.com/res/sf/SF_DEMO/ico-dcb.png?v=77",
"operatorCode":null,
"type":"MOBILE",
"order":4,
"paymentMethodParams":[
{
"validatorUrl":null,
"columnType":"Number",
"regex":null,
"name":"msisdn",
"required":true
}
],
"paymentAppContext":null
}
],
"name":"Fortnite",
"serviceKey":"388e8ff1fd2db5c2c644562e697fd0f1",
"activateURL":""
}
Response parameters
Parameter | Description | Example |
---|---|---|
name | A service name associated with a given service | Fortnite |
serviceKey | Centili issued service key, unique for every payment service. Consists of alphanumeric characters and counts up to 32 characters. | 388e8ff1fd2db5c2c644562e697fd0f1 |
description | A service description associated with a given service | Fortnite is a survival game where 100 players fight against each other in player versus player combat to be the last one standing. It is a fast-paced, action-packed game, not unlike The Hunger Games, where strategic thinking is a must in order to survive. |
image | An image associated with a given service | https://store-demo.centili.com/res/sf/SF_DEMO/388e8ff1fd2db5c2c644562e697fd0f1.png?v=77 |
merchant | Merchant/client name associated with a given service | Demo Storefront |
params | List of arbitrary service parameters needed in order for the service activation to be completed. See (https://dev.centili.com/docs/get-service#service-params) | [ { "imageUrl": "https://qa-a1.centili.com/res/sf/RS_A1_QA/gaijinUser.png", "name": "email", "stringFormatRegex": "", "position": 0, "type": "String", "required": true }, { "imageUrl": null, "name": "test_param", "stringFormatRegex": null, "position": 1, "type": "String", "required": false } ] |
validators | List of validators to be used in order to validate service parameters. See Service Parameter Validation in order to check how to validate parameters. See (https://dev.centili.com/docs/get-service#validators) for additional information | [ { "trigger": "onchange", "params": [ "email" ], "url": "https://capi.centili.com/content/v1/params/validate/GaijinCheckProfileQA" }, { "trigger": "onsubmit", "params": [ "email", "package" ], "url": "https://capi.centili.com/content/v1/params/validate/GaijinCheckItemQA" } ] |
paymentMethods | List of all available payment methods for a given service. See (https://dev.centili.com/docs/get-service#payment-method) | {"code":"RS_VOUCHERS","providerCode":null,"tosUrl":null,"countryCode":"rs","name":"DEMO VOUCER","helpUrl":null,"iconUrl":"[https://store-demo.centili.com/res/sf/SF_DEMO/ico-voucher.png?v=77","operatorCode":"RS_VOUCHERS","type":"WALLET","order":2,"paymentMethodParams":[{"validatorUrl":"","columnType":"String","regex":"","name":"voucher","required":true}] |
packages | List of all available packages for a given service. See (https://dev.centili.com/docs/get-service#package) | [ { "amount":1, "unit":"item", "paymentMethods":[ { "reference":"fd7541a5-c1cd-4f3e-9b88-efeb0fdb4c76", "code":"RS_VOUCHERS", "price":10, "oldPrice":null, "merchantReference":null, "currencyCode":"RSD" }, { "reference":"37f39ed2-e44c-4dd7-acdd-54e574ea8dd9", "code":"IPG_TELEKOM", "price":10, "oldPrice":null, "merchantReference":null, "currencyCode":"RSD" }, { "reference":"37f39ed2-e44c-4dd7-acdd-54e574ea8dd9", "code":"WS_PAY", "price":10, "oldPrice":null, "merchantReference":null, "currencyCode":"RSD" } ], "interval":null } ] |
helpURL | Url which corresponds with the help section of a given service. | https://run.mocky.io/v3/7c8e8693-4b70-4086-a6bb-45050aa4764e |
termsAndConditionsURL | Url which corresponds with the terms and conditions section of a given service. | https://run.mocky.io/v3/7c8e8693-4b70-4086-a6bb-45050aa4764e |
activateURL | Where to redirect the end user in order to activate the service. This parameter will be present only if a service is a 3rd party service, where the entire service integration is handled by a 3rd party | https://run.mocky.io/v3/7c8e8693-4b70-4086-a6bb-45050aa4764e |
Package
Parameter | Description | Example |
---|---|---|
amount | Package item amount being sold | 1 |
unit | Package item name being sold | item |
paymentMethod | List of all available payment methods for a given package. (https://dev.centili.com/docs/get-service#package-payment-method) | { "reference": "a16362b3-31df-46ec-b332-04490199e178", "code": "RS_DCB", "price": 20, "oldPrice": null, "merchantReference": null, "currencyCode": "RSD" } |
interval | Subscription interval, present only for subscription services | Day/Week/Month |
Package Payment Method
Parameter | Description | Example |
---|---|---|
code | Payment method code | RS_DCB |
currencyCode | Package currency code in ISO 4217 format | RSD |
price | Package price | 25,50 |
oldPrice | Old package price | 14,80 |
reference | Unique package reference | a16362b3-31df-46ec-b332-04490199e178 |
merchantReference | Unique package reference on the merchant's side | Steam-Voucher-10 |
Payment Method
Parameter | Description | Example |
---|---|---|
type | Payment method type | DCB/WALLET/CC/VOUCHER |
code | Payment method code | RS_VOUCHERS |
name | Payment method name | Vouchers |
countryCode | 2 letter country parameter. We are using "ISO 3166-1 alpha-2" standard. Here is full list of 2 letter country codes. | rs |
operatorCode | Operator code associated with the given payment method | RS_VOUCHERS |
order | Order priority for a given payment method | 1 |
providerCode | Provider code associated with the given payment method | CENTILI_LTD |
paymentMethodParams | List of parameters related to a specific payment method. See (https://dev.centili.com/docs/get-service#payment-method-params) | { "validatorUrl": "", "columnType": "String", "regex": "", "name": "voucher", "required": true } |
tosUrl | Url for payment method terms of service | https://www.example.com |
helpUrl | Url for payment method help | https://www.example.com |
iconUrl | Url of an icon to display for a given payment method | https://www.example.com |
Payment Method Params
Parameter | Description | Example |
---|---|---|
name | Name of the payment method parameter | voucher |
columnType | Type of the payment method parameter | String/Number |
validatorUrl | Url that needs to be triggered in order to validate the parameter input. Request that needs to be sent is a POST application/json request where the body has only the name of the payment method param and the value which was provided by the end user. | https://run.mocky.io/v3/7c8e8693-4b70-4086-a6bb-45050aa4764e |
regex | A regular expression that the parameter value needs to match | ([A-Z])\w+ |
required | Boolean indicating whether the parameter is mandatory | true |
Service Params
Parameter | Description | Example |
---|---|---|
name | Service parameter name | |
type | Service parameter type | String/Number |
imageUrl | Image to be additionally displayed for the given service parameter | https://qa-a1.centili.com/res/sf/RS_A1_QA/gaijinUser.png |
stringFormatRegex | A regular expression that the parameter value needs to match | ([A-Z])\w+ |
position | Order of the service parameter | 0 |
required | Boolean indicating whether the parameter is mandatory | true |
Validators
Parameter | Description | Example |
---|---|---|
params | List of parameter names to be sent to the validator url. | ["email", "userId"] |
trigger | When the validator needs to be triggered | onchange/onsubmit |
url | Validator url that needs to be triggered. | https://capi.centili.com/content/v1/params/validate/GaijinCheckProfileQA |
4xx client error / 5xx server error
400 - Mandatory request parameters not present
401 - Invalid credentials
404 - Domain not configured
500 - Request can not be processed at the current time
HTTP/1.1 401 Unauthorized
Content-Type: application/json
{
"message": "Authorization failed",
"code": "AUTH_FAILED"
}
Parameter | Description | Example |
---|---|---|
code | Error response code | AUTH_FAILED |
message | Error response message | Authorization failed |
Updated over 1 year ago