1. Formulate Payload
Generate payload details to be passed to the checkout platform.
Parameters
Parameter name | Type | Description | Required |
---|---|---|---|
merchantTransactionID | string | Unique identifier of the request for payment | TRUE |
requestAmount | string | Merchant amount to be collected. | TRUE |
currencyCode | string | Currency of the amount to be collected | TRUE |
accountNumber | string | A unique reference number identifying the customer's account | TRUE |
serviceCode | string | Merchant's service code. This can be found here. | TRUE |
countryCode | string | The ISO 3166-1 alpha-2 code of the country you wish to collect payment for. The country code ensures we present valid payment options available in that particular country. | TRUE |
dueDate | string | Time window a customer should complete making a payment. If not passed passed time defaults to 12 hours. Date format is YYYY-MM-DD hh:mm:ss . | FALSE |
payerClientCode | string | Parameter to limit the payment that is presented to the customer. The value will be the payer client code from | FALSE |
requestDescription | string | Shows the description of the item being purchased. | FALSE |
languageCode | string | Language preferred by the merchant using the two letter ISO 639-1 code. Available language codes can be found here. | FALSE |
MSISDN | string | Customer's phone number formatted as given in the E.164 phone numbering. | TRUE |
customerFirstName | string | Customer first name | TRUE |
customerLastName | string | Customer last name | TRUE |
customerEmail | string | Customer email address | TRUE |
successRedirectUrl | string | The URL where the customer will be redirected on merchant's site once a full payment is made. | TRUE |
pendingRedirectUrl | string | The URL where the customer will be redirected on merchant's site after a timeout period reaches and the request has not been paid or when the back button is clicked once you are redirected to checkout. Mandatory if timeout period is configured | FALSE |
failRedirectUrl | string | URL where the customer will be redirected to if a full payment is not done within the payment window | TRUE |
paymentWebhookUrl | string | A server to server URL endpoint that will be called to notify a merchant of a complete payment. | TRUE |
extraData | JSON | Additional data specific to a client's application | FALSE |
NOTE:
The
MSISDN
andcustomerEmail
presented may be used to receive invoice and payment notifications to confirm completion of service.
The resulting checkout request details JSON object should be as follows:
{
"merchantTransactionID": "<YOUR_UNIQUE_TRANSACTION_ID>",
"requestAmount": "100",
"currencyCode": "KES",
"accountNumber": "10092019",
"serviceCode": "<SERVICE_CODE>",
"dueDate": "2019-06-01 23:59:59", //Must be a future date
"requestDescription": "Dummy merchant transaction",
"countryCode": "KE",
"languageCode": "en",
"payerClientCode": "",
"MSISDN": "+2547XXXXXXXX", //Must be a valid number format
"customerFirstName": "John",
"customerLastName": "Smith",
"customerEmail": "[email protected]",
"successRedirectUrl": "<YOUR_SUCCESS_REDIRECT_URL>",
"failRedirectUrl": "<YOUR_FAIL_REDIRECT_URL>",
"pendingRedirectUrl": "<YOUR_PENDING_REDIRECT_URL>",
"paymentWebhookUrl": "<PAYMENT_WEBHOOK_URL>",
"extraData": {
"bundleID": "30GB"
}
}
Updated about 1 year ago