Authorized Method

The Authorize/Capture payment flow is a two-step process that allows merchants to authorize a transaction first (ensuring funds availability) and capture the funds later when ready to deliver the service or product.

Good to Know

Authorize and Capture features are only available with the MPGS payment gateway service.

🎯 Authorize Transaction Request

Payment Checkout Integration Steps

Refer Hesabe Checkout API Guides before integrating authorization steps

Pre-requisites Setup

You can follow the Checkout Setup guide to get started.

Hesabe Request Handler

You can follow the Hesabe Request Handler guide to get started.

To authorize the payment transaction

Pass the following parameters below:

Sandbox Checkout API

Below Checkout API strictly for sandbox testing only. Never use these sandbox URL's in production environment

https://sandbox.hesabe.com/api/checkout

Production Checkout API

Use the following Checkout API strictly for production transactions. Ensure that you never use these production URLs in the sandbox or testing environment

https://api.hesabe.com/api/checkout

Authorized Payment Method

  • Make sure to pass paymentType:2 in checkout payload request
  • Number 2 indicates MPGS payment gateway service
checkout.php
    $baseUrl =  "http://sandbox.hesebe.com/api/";
    $CheckoutApiUrl = "{$baseUrl}/checkout"; 
    $requestData = [
        "merchantCode" => "842217", 
        "amount" => "2", 
        "paymentType" => "2", // Visa / Master Cards
        "responseUrl" => "https://sandbox.hesabe.com/customer-response?id=842217", 
        "failureUrl" => "https://sandbox.hesabe.com/customer-response?id=842217", 
        "version" => "2.0", 
        "orderReferenceNumber" => "9874659805", 
        "currency" => "KWD", 
        "name" => "customername", 
        "email" => "customeremail@gmail.com", 
        "mobile_number" => "66666666", 
        "variable1" => "First__variable", 
        "variable2" => "Second__variable", 
        "variable3" => "Third__variable", 
        "variable4" => "forth__variable", 
        "variable5" => "example.com",
        "authorize" => '1'
        "webhookUrl" => 'https://yourdomain.com/example' 
    ]; 

Authorized Transaction

  • To authorize a transaction, include the following parameter in the checkout request:

authorize:1

  • Authorization is confirmed when the value is 1

Here's an authorize transaction parameters details

FieldTypeDescriptionRequired
merchantCode
NumericAssigned by HesabeYes
amount
NumericAmount in currencyYes
responseUrl
AlphanumericRedirect URL on successYes
failureUrl
AlphanumericRedirect URL on failureYes
version
Alphanumeric2.0Yes
orderReferenceNumber
StringYour reference / order IDYes
paymentType
Numeric2 - ( Visa / MasterCard )Yes
authorize
Numeric1 - TrueYes

Additional Checkout API Parameters

Optional parameters that allow you to include extra data or customize the checkout flow in your API request

FieldTypeDescriptionRequired
name
StringCustomer NameOptional
mobile_number
Numeric (8)Customer Mobile Number ( Without country code )Optional
email
StringCustomer Email AddressOptional
webhookUrl
StringYour endpoint for receiving payment statusOptional
variable1
AlphanumericCustom user parameter which will be included in the response when it returnsOptional
variable2
AlphanumericCustom user parameter which will be included in the response when it returnsOptional
variable3
AlphanumericCustom user parameter which will be included in the response when it returnsOptional
variable4
AlphanumericCustom user parameter which will be included in the response when it returnsOptional
variable5
StringCustom user parameter which will be included in the response when it returnsOptional

For Any Technical Assistance

If you encounter any issues or need support during setup or integration, please contact our technical team for assistance.

Hesabe IT Support

Email address:itsupport@hesabe.com