MO Forwarding
Learn how to setup MO forwarding
Some businesses have the need to receive initial MO request for payment and to handle it somehow, for example, by generating personalized (dynamic) MT message. For those types of businesses Centili provides a special feature for this kind of intermediate notifications.
It is very simple MO Forward service, which forwards initial MO to you and expects from you to answer with MT message related with this payment. To use this feature you need to provide URL of specifically designed notification web service which is able to handle MO Forward request properly. The concept of MO Forward service is based on a simple Request/Response conversation.
MO Forward Request
Both GET and POST HTTP methods are available. Our request can also be in JSON format, but in that case it can be only for POST type of methods.
This is an example of request using GET method:
http://www.mocky.io/v2/51f2c5e664250c0f01f90c24?transactionid=1&phone=3816373417161&shortcode=2525&message=CENT+Something&mno=RS_TELENOR&callback=http%3A%2F%2Fapi.centili.com%2Ftransaction%2Merchant%2F1%2Fmt
Parameters to be sent in request:
Parameter | Description | Example | Required |
---|---|---|---|
phone | End user mobile phone number. NOTE: The number must be in E.164 format, excluding the plus ("+") character. | 4477781234567 | mandatory |
shortcode | Short number that the MO message is sent to. | 1234 | mandatory |
message | Message text sent in initial MO message. It must include registered key-word for Partner's service, but also it can contain some other words after the key-word. | GO ZIP | mandatory |
mno | Code of Mobile Network Operator in Centili’s system which end user belongs to. | ES_VODAFONE (for Vodafone Spain) | mandatory |
transactionid | Unique payment transaction identifier used on Centili Payment Platform. Used to identify any particular transaction within Centili system. | ac8bd4a9c26fd94c | mandatory |
callback | URL for posting MT messages on it. NOTE: Callback parameter to which you should post MT message is optional for MO Forward with asynchronous response. | http://api.centili.com/transaction/servicekey/2562343/mt | mandatory |
Requests for POST method are the same. In that case, parameters (transactionid, shortcode, callback etc) will be in the body of the request. Request can also be in JSON format. Other formats (XML, etc.) are available on demand.
In this case, callback URL will be in the following format:
protocol//host/transaction/serviceKey/transactionId/mt
where:
- serviceKey - unique service identifier that will be given to you in advance
- transctionId - Our ID for this transaction. You will receive this ID in our MO Forward request.
For example:
http://api.centili.com/transaction/serviceKey/2562343/mt
Note:
In case clientID parameter is sent to Centili platform via Payment Page or API, the value of that parameter will be included in MO Forward request as an addition to message parameter (message=message text + “ ” + clientid).
MO Forward Response - Synchronous
To use Response of MO Forward service you need to confirm that you successfully received MO notification, but also you can use it to pass text for MT message. MT text should be passed as plain text in the body of response. To confirm that notification is received it is necessary to use standard HTTP statuses:
Response Status | Action |
---|---|
2xx (200. 201, 202...) | Handled as successful one. |
4xx (400, 406...) | Handled as rejected and in that case MO Forward service is not repeating notification procedure ever again except in some cases. |
All other statuses | Handled as failed. |
Success
In case of success status you can send MT message text in the body of response as a plain text.
Error
In case of error, you can use response body to send error description back to Centili.
MO Forward Response - Asynchronous
Same as in case of synchronous response on MO Forward request:
Response status | Action |
---|---|
2xx (200. 201, 202,...) | Handled as successful one. |
4xx (400, 406,...) | Handled as rejected and in that case MO Forward service is not repeating notification procedure ever again except in some cases. |
5xx (500,...) | Handled as some internal error occured on Merchant side, and we will retry our request later. |
Next step...
In case of MO Forward with Asynchronous response... | In case of MO Forward with Synchronous response... |
---|---|
...proceed with MT Posting guide. | ...proceed with Payment Result Notification guide. |
Updated over 1 year ago