Checkout Reference
Jenga Payment Gateway is a solution that offers e-commerce merchants and their customers a secure mode of payment through various payment channels.
Jenga Payment Gateway functions by aggregating different digital payment channels available in the market to provide a single interface to users. It is hosted in the cloud and merchants integrate it with their websites by including provided resource files.
Supported payment channels
- Mobile Money i.e MPESA and Equitel
- Cards
- Pay with bank account
Generating and using tokens
This is the first step before interacting with JengaPGW. The token generated at this step is used for subsequent interactions.
Here's an example request and response that you'll get when you call the Get Your JengaPGW Access Token API.
POST /authenticate/merchant HTTP/1.1
Api-Key: WDZZMlVvbloyQkdsVTBDSEpHb3FmSHJmVTBzZXo4Ym06R3pocmptWUtqUm4ySFRXeQ==
Content-Type: application/json
{
"merchantCode": "9397187322",
"consumerSecret": "U7R1smPWwPa61979lHPWbsD52Pmsk9"
}
200 OK
{
"accessToken": "eyJhbGciOiJSUzUxMiJ9.eyJ0b2tlblR5cGUiOiJNRVJDSEFOVCIsImVudiI6IlVBVCIsImV4cCI6MTYyNDk1NzgwMSwiaWF0IjoxNjI0OTU2OTAxLCJhY2NvdW50IjoiMUQ2RjdBMzgwNTgwRDExODZDNzBBQzU4NTI1RTFDQTU0NkRDQ0U1M0I1ODU1OEE0NjM3QTI3M0U1MDZEMkZCMjE5MUM5ODgwRTEwQzlBOEIwOTg0OEJFQzk4Mzc5MThCTzhLMjJabzNJSmJYUzRKMnl6Mk50MDM4NVozSkNWUDB2WjJVNVdKbVArVVNnQndDdk1qNDRuaFUvaGl5V2VvTVYwVW0zNTFkZlUwTFA1bDBldUQ2QWIrczQxajdlUk0rdVBCNnAwTHZXWG9xczRMWURtRUxyZUpxZElEZU92TUwzbVo4Y2xlUDExMzM5WXJEM3lKVG9WQWMwL0RCbkorZHZ3OWRlY0trQVYwbHFEaURVNVhNVU84K3JuRmhuYnQ4Snp2SUZoWnNjQk9hK0FKdFpVY0cvc3F4Rm1tWDgrVTcxM3VXTkE5cXZwN3F5eDBzNzhWbEt6czdYS3lEek1jem9PcE1VR0FwVHVVWWVFT3BmRTBkQ0FZZXVPaVBoM1JrUkU0d2RlUWpNS1NkSVdBT0JGaUFSbTJBbWY3VVNHTUtTTkx0NHh0b09yWGorUFZmZXhBMVhHZlpCNllsekRnS0VHMktiTVF6WWt2RmxNWkNrNlB1ZGxxTG5jZjRQQ3FkIn0.EAR6W-LhAcnZQAy3ni7vWXhrwvBa_P9VTFSvRRNUjueFINV8mZ_CLyIXdZIsEiB7NdGfqXwtKV8o-KgdiGMeBjFeO4xVhLmaRn0_07vTGdz8j4nXhp1pACHYlZN72I7bugnyOu1h-c0TBF56AbHVml4lOMCFS8eKlHL8XO2WqVBRJDoA3tekPzJM8fmq9KnGIxv00v1_wdEtDh7UrFnJMqdNKMtb2t6JZ4bRliXyjduoQNHRt_B7vLJrsT0eZHJ37YE9mEf1y9MhywUfb7PN1xsjmeKICv_xgwK8kwKkoWTykZTKY6CfJupOq7XJsvviPN8tGm2X1nwa-5GasAjpAw",
"refreshToken": "ryRifZbH+JWvhDTFa1GqJkKBGuFMvfioRcJraAVIEsZm0fN80ttNz3B+1Niu10LTCZnG5k9BWVkq8GEPmIQHVA==",
"expiresIn": "2021-06-29T09:10:01Z",
"issuedAt": "2021-06-29T08:55:01Z",
"tokenType": "Bearer"
}
Integrating Jenga Payment Gateway
Payment parameters
Parameter | Meaning | Mandatory | Sample |
---|---|---|---|
token | The payment token generated in the previous step | YES | xccuUjuysdsnvtloPWqiT |
merchantCode | The merchant code provided at registration. Use the merchant code provided during token generation. | YES | 9837446275 |
currency | The currency for the Transaction | YES | |
amount | The value of the transaction. | YES | |
orderReference | The merchant order reference. Min 8 characters It has to be alphanumeric | YES | 4yTr67j |
productType | Product category | YES | |
productDescription | A brief summary of the product. max 200 characters | YES | |
extraData | This data will be echoed back during callback url | YES | |
paymentTimeLimit | Duration payment is valid | NO | 15mins |
customerFirstName | The customer's First Name | YES | |
customerLastName | The customer's Last Name | YES | |
customerPostalCodeZip | Customer’s postal code | YES | |
customerAddress | Customer’s address | YES | |
customerEmail | Customer email address | YES | |
customerPhone | Customer phone number | YES | |
callbackUrl | Merchant callback url | YES | |
countryCode | Country code | YES | KE |
signature | Security signature | NO | merchantCode+orderReference+currency+orderAmount+callbackUrl |
Integration
The form field names used are as described above in the payment parameters. Implement the hidden form exactly as the sample code below demonstrates.
Endpoint | Base Path | Dependency | Functionality | Method |
---|---|---|---|---|
/processPayment | Not Applicable | Token Generation | Integrate the payment widget | POST |
<form id="submitcheckout" action="https://v3-uat.jengapgw.io/processPayment" method="POST">
<input type="hidden" id="token" name="token">
<input type="hidden" id="merchantCode" name="merchantCode">
<input type="hidden" id="currency" name="currency">
<input type="hidden" id="orderAmount" name="orderAmount">
<input type="hidden" id="orderReference" name="orderReference">
<input type="hidden" id="productType" name="productType">
<input type="hidden" id="productDescription" name="productDescription">
<input type="hidden" id=" paymentTimeLimit " name=" paymentTimeLimit ">
<input type="hidden" id="customerFirstName" name="customerFirstName">
<input type="hidden" id="customerLastName" name="customerLastName">
<input type="hidden" id="customerPostalCodeZip" name=" customerPostalCodeZip ">
<input type="hidden" id="customerAddress" name=" customerAddress ">
<input type="hidden" id="customerEmail" name="customerEmail" >
<input type="hidden" id="customerPhone" name="customerPhone">
<input type="hidden" id="extraData" name="extraData">
<input type="hidden" id="callbackUrl" name="callbackUrl">
<input type="hidden" id="countryCode" name="countryCode">
<input type="hidden" id="signature" name="signature" value="merchantCode+orderReference+currency+orderAmount+callbackUrl">
</form>
Payment Response
Once the payment is complete the user is redirected to the callback_url
specified by you. A set of parameters is passed in response (using GET).
POST field name | Data type | Description |
---|---|---|
transactionId | string | |
status | string | transaction status: - paid - transaction has been successfully performed. |
date | string | transaction date in yyyy-MM-dd'T'HH:mm:ss.SSSz format. |
desc | string | channel used to make payment; - CARD - EQUITEL - MPESA - AIRTEL |
amount | string | transaction amount. |
orderReference | string | merchant order reference – it is the same value you sent in the request. |
hash | string | security hash. |
extraData | string | any metadata that is associated with the request. |
Updated 4 months ago