Integrating With Hesabe Payment Gateway Api End-point


Next Page: HesabeRequestHandler
Previous Page: Access Keys

INTEGRATION TYPES


Direct Integration

In this integration method, the merchant provides an option to select the Payment Method (Knet or MPGS) in the app itself. Based on the customer’s selection, the request param paymentType should be sent accordingly as described in the section Posting Payment Data.


Indirect Integration

In this integration method, the merchant does not provide an option to select the Payment Method (Knet or MPGS) in the app. Customers would be able to select their choice of Payment Method from the Hesabe Payment Gateway Landing page. The request param paymentType should be sent accordingly as described in the section Posting Payment Data.

Based on the selection of Payment Method here, the Customer will be redirected to the respective Payment page and Payment Type will be recorded by Hesabe.

The Hesabe Payment Gateway Page would look similar to as shown below: Hesabe Landing Page

POSTING PAYMENT DATA

Payment data containing the following fields in encrypted form need to be submitted to ‘Checkout’ Endpoint (https://sandbox.hesabe.com/checkout on Test and https://api.hesabe.com/checkout on Production) for initiating the payment request.


REQUEST PARAMETERS

Field Type Description
amount Numeric Amount must be greater than zero
currency String Currency ISO code
responseUrl Alphanumeric (200) Characters allowed: Alphabet (A-Z), (a-z), Numbers, / (slash),_ (underscore) Webpay will be redirected back to this url after payment completes
failureUrl Alphanumeric (200) Characters allowed: Alphabet (A-Z), (a-z), Numbers, / (slash),_ (underscore) Webpay will be redirected back to this url after payment completes
merchantCode Numeric Merchant Code is a unique identifier generated by Hesabe for each activated merchant.
paymentType Numeric Payment Type 0, 1 or 2; 0 - Indirect, 1 - Knet, 2 - MPGS
version Alphanumeric [10] Version of the API (example 2.0)
orderReferenceNumber Alphanumeric [100] Custom user parameter which will be included in the response when it returns
variable1 Alphanumeric [100] Custom user parameter which will be included in the response when it returns
variable2 Alphanumeric [100] Custom user parameter which will be included in the response when it returns
variable3 Alphanumeric [100] Custom user parameter which will be included in the response when it returns
variable4 Alphanumeric [100] Custom user parameter which will be included in the response when it returns
variable5 Alphanumeric [100] Custom user parameter which will be included in the response when it returns
name Alphanumeric [100] (*) Customer's name
mobile_number Numeric [8] (*) Customer's mobile number. Do not add country code with the mobile number.
email Alphanumeric [100] (*) Customer's email address

{info} * These parameters are only used for KFast. If you want to enable KFast, Please contact your Account Manager or drop an email to support@hesabe.com.

Params - variable1, variable2, variable3, variable4, and variable5 can be used to pass arbitrary values (string only) in the form of key value pairs in the format "key__value". For example, to pass Customer Name in variable1, you can pass "Customer Name__John Doe" as value of variable1. These values would then be visible in the transaction details window of Merchant Panel and also be displayed in the email notifications.


The data is posted/passed to the HesabeRequestHandler that will concatenate and encrypt the data before invoking the Hesabe Checkout API endpoint.






Next Page: HesabeRequestHandler
Previous Page: Access Keys