Innovation
  • Introduction
  • Integration Steps
  • Types of Integration
    • 1. Standard Checkout
    • 2. Plugins
    • 3. SDK
  • Page
  • Sample Code
    • 1. Get Payment URL
    • 2. Redirect to Payment URL
    • 3. Callback To Merchant Portal
    • 4. Compute HASH
    • 5. Refund Request
    • 6. Payment Status
  • Parameters & Description
  • Payment Methods
  • Test Cards
  • Download Plugins/SDK
  • Direct Pay
    • 1. Generate Merchant Keys
    • 2. Validate Request
    • 3. Initiate Pay
    • 4. Process Payment
  • Modules Setup Guides
    • WooCommerce
    • Drupal Commerce
    • OpenCart
    • Magento 1
    • Magento 2
    • PrestaShop
    • Joomla
    • WHMCS
Powered by GitBook
On this page

Was this helpful?

  1. Direct Pay

2. Validate Request

Previous1. Generate Merchant KeysNext3. Initiate Pay

Last updated 16 days ago

Was this helpful?

API Endpoints

Production Base URL /api/GenToken/Validate
Sandbox Base URL /api/GenToken/Validate

Sample Request & Response

Use the below parameters and hashing function for order creation. The request should contain the following inputs to make sure inputs should be encrypted using our hashing function show in the following example to prevent exposure. For parameters description please refer

"ValidateRequest" : {
  "merchantCode": "xxxxx"    
  "authKey": "xxxxxxxxx",
  "currency": "KWD",   
  "pc": "DIRECTPAY",  
  "tunnel": "",    
  "amount": 1 ,   
  "doConvert": "N",
  "sourceCurrency":"conditional",
  "description": "optional",
  "referenceID": "(15 digit random number)",     
  "timeStamp": "yyyy/MM/dd HH:mm:ss tt",
  "language": "en",
  "callbackURL": "Your website URL",
  "hash": "ComputedHash",  
  "userReference": 0,   
  "billingDetails": 
  {
  "fName": "First Name",
  "lName": "last Name",
  "mobile": "mobile",
  "email": "email",
  "city": "city",
  "pincode": "pincode",
  "state": "state",
  "address1": "address1",
  "address2": "address2"
  }
}
  "errorCode": 0,
  "errorMessgae": "string",
  "result": 
  {
    "redirectURL": "string",
    "tokenID": "string",    
    "orderAmount": 0,
    "paidAmount": 0,
    "serviceAmount": 0,
    "commissionAmount": 0,   
    "originalAmount": "string"
  }
} 

Upon receiving the response, the merchant must verify the errorCode. If the errorCode is 0, the merchant should parse the result object and proceed to invoke the InitiatePay API, as detailed in the subsequent step.

here