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

ParameterMeaningMandatorySample
tokenThe payment token generated in the previous stepYESxccuUjuysdsnvtloPWqiT
merchantCodeThe merchant code provided at registration. Use the merchant code provided during token generation.YES9837446275
walletThe wallet to be used for the transactionYES if currency is not provided
currencyThe currency for the TransactionYES if wallet is not provided
amountThe value of the transaction.YES
orderReferenceThe merchant order reference.

Min 8 characters

It has to be alphanumeric
YES4yTr67j
productTypeProduct categoryYES
productDescriptionA brief summary of the product. max 200 charactersYES
extraDataThis data will be echoed back during callback urlYES
paymentTimeLimitDuration payment is validNO15mins
customerFirstNameThe customer's First NameYES
customerLastNameThe customer's Last NameYES
customerPostalCodeZipCustomer’s postal codeYES
customerAddressCustomer’s addressYES
customerEmailCustomer email addressYES
customerPhoneCustomer phone numberYES
callbackUrlMerchant callback urlYES
countryCodeCountry codeYESKE
signatureSecurity signatureNOmerchantCode+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.

EndpointBase PathDependencyFunctionalityMethod
/processPaymentNot ApplicableToken GenerationIntegrate the payment widgetPOST
<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="wallet" name="wallet">  
     <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 nameData typeDescription
transactionIdstring
statusstringtransaction status:
- paid - transaction has been successfully performed.
datestringtransaction date in yyyy-MM-dd'T'HH:mm:ss.SSSz format.
descstringchannel used to make payment;
- CARD
- EQUITEL
- MPESA
- AIRTEL
amountstringtransaction amount.
orderReferencestringmerchant order reference – it is the same value you sent in the request.
hashstringsecurity hash.
extraDatastringany metadata that is associated with the request.