In order to initiate subscription, request must be sent as HTTPS POST with Content-Type: application/json composed of parameters with associated values.
**URL to which request should be posted:**
## POST subscribe request
## All possible initiation parameters:
Parameter | Description | Example | Required as |
**apikey** | Centili issued service key, unique for every payment service. Consists of alphanumeric characters and counts up to 32 characters. | f31a355df6dad07e49ba474db7ff9b07 | **mandatory both for 3G and WiFi flow** |
**price** | End user price for specific transaction. | 1.45 | **mandatory both for 3G and WiFi flow** |
**priceid** | Identifier of a specific package under Centili platform. | 326 | optional |
**mno** | Code of Mobile Network Operator in Centili’s system which end user belongs to. | ES_VODAFONE (for Vodafone Spain) | mandatory / optional Look for "**Keep in mind**" callout box underneath this table. |
**mccmnc** | Mobile country code and mobile network code. | 23201 (for A1 Telekom Austria) | optional Look for "**Keep in mind**" callout box underneath this table. |
**msisdn** | Customer mobile phone number. | 4477781234567 | optional (**mandatory for WiFi flow**) Look for "**Keep in mind**" callout box underneath this table. |
**clientid** | Unique identification parameter under your system (pass-through variable). | appID1 | optional |
**userid** | Identification of the end user performing payment. | usrId1983 _NOTE: If the value is not set within payment request, this field will contain MSISDN of the particular customer._ | optional |
**username** | Configured under Partner Panel service, it is used only if API authentication is activated. | username | optional |
**password** | Configured under Partner Panel service, it is used only if API authentication is activated. | password | optional |
**identid** | ID of the identification transaction that preceded the payment request. | | optional (**mandatory for 3G flow**) |
**country** | 2 letters country parameter. We are using "ISO 3166-1 alpha-2" standard. [Here](🔗) is full list of 2 letter country codes. | es | optional |
**params** | Special additional parameter. Allows adding design_id parameter in request if merchant want customized payment page. **Any page customization must be allowed by MNO.** | [{"name":"design_id","value":"1"}] | optional |
**returnurl** | URL to which user is redirected after payment. | http://www.example.com | optional (**mandatory for url redirect flows**) |
Keep in mind:
"**mno**" parameter is:
mandatory for 3G flow, with value equal to value of "**operator**" parameter received in previous [Identify User response](🔗)
mandatory for WiFi flow as well, but only if used instead of "**msisdn**" parameter (supported for certain Mobile Network Operators).
**mccmnc** parameter can be sent instead of parameter ''**mno**"
## POST payment response
Once request is received, Centili will synchronously respond with POST response containing appropriate HTTP response and list of parameters and values in JSON format.
## Response parameters:
Parameter | Description | Example |
**status** | Indicates status of the current request. | Possible values: _ ACCEPTED _ CHARGING_FAILED _ EXISTING_SUBSCRIPTION _ INVALID_REQUEST _ INVALID_SERVICE _ UNAUTHORIZED _ INACTIVE _ INVALID_MSISDN _ INVALID_OPERATOR_CODE _ INVALID_MCCMNC _ INVALID_PRICE _ DAILY_LIMIT_EXCEEDED * MONTHLY_LIMIT_EXCEEDED |
**errorMessage** | Error description in case of failed request. | Bad request |
**transactionId** | Unique payment transaction identifier used on Centili Payment Platform. Used to identify any particular transaction within Centili system. | ac8bd4a9c26fd94c |
**apikey** | Centili issued service key, unique for every payment service. Consists of alphanumeric characters and counts up to 32 characters. | f31a355df6dad07e49ba474db7ff9b07 |
**clientId** | Unique identification parameter under your system (pass-through variable reference; max length: 256 characters). | appID1 |
**price** | End user price for specific transaction. | 1.45 |
**countryCode** | Two-letter ISO 31661 international standard code. | FR (for France) |
**operatorCode** | Code of Mobile Network Operator in Centili’s system which end user belongs to. | ES_VODAFONE (for Vodafone Spain) |
**mcc** | Mobile country code. | 232 (example for Austria) |
**mnc** | Mobile network code. | 01 |
**msisdn** | Customer mobile phone number. NOTE: The number must be in [E.164](🔗) format, excluding the plus ("+") character. | 4477781234567 |
**action** | Signifies type of flow for the initiated transaction. | Possible values: _ URL_REDIRECT _ PREMIUM _ PIN _ HANDSHAKE _NOTE: look for these [instructions](🔗) how to regulate further flow according to data received in our response (underneath this table)._ |
**sessionStatus** | Indicatior of current state of transaction. | Possible values: _ PENDING _ FAILED * COMPLETED |
**urlRedirect** | URL to which user should be redirected in order to continue with payment process (delivered only if action=URL_REDIRECT). | |
**premiumInstructions** | Instruction containing keyword and shortcode user needs to configure confirmation MO message before sending (delivered only if action=PREMIUM). | "Please send GO to 1234 in order to confirm purchase." _NOTE: instruction is displayed in a local language. Check our country [coverage](🔗)._ |
**shortCode** | Shortcode contained in premium instruction (delivered only if action=PREMIUM). | 1234 |
**smsBody** | Keyword contained in premium instruction (delivered only if action=PREMIUM). | GO |
**handshakeInstructions** | Text instructing user to reply to the received MT message in order to confirm payment (delivered only if action=HANDSHAKE). | "Please send YES to 1234 in order to continue with payment." _NOTE: message is sent in a local language. Check our country [coverage](🔗)._ |
Once transaction reaches a final state Payment Result Notification will be delivered to your system.
## Instructions depending on the "Action" parameter value
##
Regulate further flow according to data received in our response:
"ACTION" parameter value | Centili instruction |
**URL_REDIRECT** | Redirect user to URL provided as a value of **_urlRedirect_** parameter mentioned in the table above. Once redirected, you should expect that user will be returned to URL provided in your initial request under **_returnurl_** parameter, according to the logic described in [Redirect after Payment](🔗) guide. |
**PREMIUM** | You have two options: * Display instruction message to user, using text you received in Centili response under **_premiumInstructions_** parameter, * Use Short code and Keyword you received in response under **_shortCode_** and **_smsBody_** parameters and create instruction message on your own. Once transaction reaches a final state, next step is [Payment Result Notification](🔗) which will be delivered to URL defined under your Partner Panel service. |
**PIN** | Please refer to [PIN Payment Flow Update](🔗) guide for complete reference how to forward PIN after user enters it and track its status. |
**HANDSHAKE** | Display instruction message to user containing text you received in Centili response under **_handshakeInstructions_** parameter. Once transaction reaches a final state, next step is [Payment Result Notification](🔗) which will be delivered to URL defined under your Partner Panel service. |
Payment flows
To help you understand these instructions, there are few types of payment flow, depending on [the billing technology available](🔗) in the country of your target:
[PIN flow](🔗)
[Premium SMS flow](🔗)
[Handshake flow](🔗)
[URL Redirect flow](🔗)