Login

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 NameTypeDescription
checkoutRequestIDintegerUnique transaction ID identifying the transaction as provided by the checkout platform.
merchantTransactionIDstringUnique transaction ID identifying the transaction as given by the merchant.
requestStatusCodeintegerRequest 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.
requestStatusDescriptionstringRequest status description
MSISDNstringMobile number users make payments with.
serviceCodestringIdentifier for the service that request has be raised to
accountNumberstringReference for the item being paid for eg: Pay TV account number or Airline ticket number
currencyCodestringA three character currency code (ISO 4217) that the payment originated in.
amountPaidintegerAmount received from customer.
requestCurrencyCodestringA three character currency code (ISO 4217) that the transaction was converted to for collection.
requestAmountintegerAmount of the transaction request after conversion
requestCurrencyCodestringA three character currency code (ISO 4217) that the request originated from.
requestAmountstringAmount of the transaction request.
requestDatedateDate and time payment was logged into the Cellulant Payment Gateway.
paymentsJSON ArrayList 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 NameTypeDescription
payerClientCodestringA unique identifying code of the payment option that was used to initiate the request. E.g. 'MPESA' for Mpesa.
payerTransactionIDstringA 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
currencyCodestringA three characters currency code (ISO 4217) that the payment originated.
amountPaidstringA numerical value of the payment amount i.e. the amount received from the payment channel the customer paid from
MSISDNstringThe mobile number of the customer who made the payment.
serviceCodestringIdentifier for the service that request has be raised to
cpgTransactionIDstringA unique identifier to identify the payment on the Cellulant's payment Gateway
accountNumberstringReference for the item being paid for eg: Pay TV account number or Airline ticket number
datePaymentReceivedstringThe 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": [],
}