1. Home
  2. Docs
  3. API Integration
  4. 4. API Call To Request Payment

4. API Call To Request Payment

Print

This is to initiate a request for payment.

  • URL: https://payment.brisktrex.com
  • Method: POST/GET
  • Parameters
    • billing_name – buyer’s name [mandatory]
    • billing_email – buyer’s email address [mandatory]
    • billing_mobile – buyer’s mobile phone number [mandatory]
    • billing_info – payment description [mandatory]
    • amount – amount to be paid (with 2 decimal places) [mandatory]
    • order_no – reference to identify payment transaction [mandatory]
    • merchant_code – merchant code provided by edxaPay [mandatory]
    • scode – MD5 hash of below information. Details below. [mandatory]
      • amount
      • merchant_code
      • order_no
      • verify key
    • split_status – indicator for split payment (default value is 0). Details below. [optional]
      • 0 – No
      • 1 – Yes
    • split_args – split arguments in JSON format. Details below. [mandatory if split_status = 1
    • return_url – url to be redirected after payment completed [optional]
    • callback_url – url to be notified after payment completed [optional]

order_no parameter is the reference id on your application. For example, your application issue an invoice no 888999 and direct user to pay via edxaPay.

order_no will be 888999

After customer make payment, the callback URL will return this value to your application so you can automate your process e.g approve the invoice or run affiliates.

Hashing The scode

To ensure the data transmit is not tempered, we need to hash the data below using MD5 hash algorithm. Below is an example using PHP using built-in MD5 hash function.

$amount = 3.50
$merchant_code = MERCHANT01
$order_no = INV001
$verify_key = 123321ABCCDA

$scode = md5($amount . $merchant_code . $order_no . $verify_key);

Processing Split Payments

If the payment need to be split into multiple merchant account e.g pay commission or profit sharing, you need

  1. send split_status value to 1
  2. send split_args value in json format e.g
    • [{“merchant_code”:”BRI1234″,”amount”:”1.50″}]

Example Of A Working GET Call

https://payment.brisktrex.com/?billing_name=<BILLER NAME>&billing_email=<BILLER EMAIL>&billing_mobile=<BILLER PHONE>&billing_info=<DESCRIPTION>&order_no=<ORDER NO>&amount=<AMOUNT>&merchant_code=<MERCHANTID>&scode=<SCODE>&return_url=https://<RETURN URL>&callback_url=https://<CALLBACK URL>

Output of The Call

If it is a successful call, you will receive the payment page with the necessary payment features.

How can we help?