4. Redirect back to Merchant
Handle redirect from Express Checkout back to merchant website/mobile app.
Redirect Method
We do a form POST request when redirecting back to merchant with the parameters
Success Redirect
The customer is redirected to the merchant successRedirectURL when the request payment is made in full.
The following parameters will be passed to the merchant during the redirect:
Parameter Name | Type | Description |
---|---|---|
checkoutRequestID | integer | Unique transaction ID identifying the transaction as provided by the checkout platform. |
merchantTransactionID | string | Unique transaction ID identifying the transaction as given by the merchant. |
requestStatusCode | integer | Request status after the customer makes the payment. 176 - Partial payment made for the request and has been marked as closed. Available for merchants who accept partial payments for their request. 178 - Full payment made for the request. |
requestStatusDescription | string | Request status description |
MSISDN | string | Mobile number users make payments with. |
serviceCode | string | Identifier for the service that request has be raised to |
accountNumber | string | Reference for the item being paid for eg: Pay TV account number or Airline ticket number |
currencyCode | string | A three character currency code (ISO 4217) that the payment originated in. |
amountPaid | integer | Amount received from customer. |
requestCurrencyCode | string | A three character currency code (ISO 4217) that the transaction was converted to for collection. |
requestAmount | integer | Amount of the transaction request after conversion |
requestCurrencyCode | string | A three character currency code (ISO 4217) that the request originated from. |
requestAmount | string | Amount of the transaction request. |
requestDate | date | Date and time payment was logged into the Cellulant Payment Gateway. |
payments | JSON Array | List of payments made for the request as described below |
The payments parameter holds a list of payments that have been made for the current request.
Parameter Name | Type | Description |
---|---|---|
payerClientCode | string | A unique identifying code of the payment option that was used to initiate the request. E.g. 'MPESA' for Mpesa. |
payerTransactionID | string | A unique identifier of the payment as logged on the payment channel's platform. This may be logged by the merchant for easier transaction tracking and support for customers |
currencyCode | string | A three characters currency code (ISO 4217) that the payment originated. |
amountPaid | string | A numerical value of the payment amount i.e. the amount received from the payment channel the customer paid from |
MSISDN | string | The mobile number of the customer who made the payment. |
serviceCode | string | Identifier for the service that request has be raised to |
cpgTransactionID | string | A unique identifier to identify the payment on the Cellulant's payment Gateway |
accountNumber | string | Reference for the item being paid for eg: Pay TV account number or Airline ticket number |
datePaymentReceived | string | The date in which the payment was logged onto the cellulant payment gateway. |
Example:
//This is a form post redirect to the merchants success notificaiton url
"requestStatusCode": 178,
"accountNumber": "rssd1526561537.171",
"currencyCode": "KES",
"checkoutRequestID": 212366,
"requestAmount": "100.00",
"amountPaid": 1234,
"merchantTransactionID": "sayrRsxXJTVlHBvncI",
"serviceCode": "XXXXXXX",
"requestDate": "2020-08-25 12:53:04.0",
"requestStatusDescription": "Request fully paid",
"MSISDN": "254722100200",
"shortUrl": "",
"payments": [
{
"customerName": "Customer",
"accountNumber": "rssd1526561537.171",
"cpgTransactionID": "10309066",
"currencyCode": "KES",
"payerClientCode": "SAFKE",
"amountPaid": 1234,
"serviceCode": "XXXXXXX",
"datePaymentReceived": "2020-08-25 12:58:23.0",
"MSISDN": 254722100200,
"payerTransactionID": "dev-test-1526550799"
}
]
Failed Redirect
The customer is redirected to the merchant pendingRedirectUrL(if configured) or the failRedirectURL when the payment request expires before the customer makes a full payment.
Example:
{
"requestStatusCode": 129,
"accountNumber": "rssd1526561537.171",
"currencyCode": "KES",
"checkoutRequestID": 212366,
"requestCurrencyCode": "KES",
"requestAmount": 100.00,
"amountPaid": 100.00,
"merchantTransactionID": "sayrRsxXJTVlHBvncI",
"serviceCode": "XXXXXX",
"requestDate": "2020-08-25 16:53:04.0",
"requestStatusDescription": "Payment rejected",
"MSISDN": "254722100200",
"payments": [],
}
Updated about 1 year ago