fbpx
← back

Query Order Status

This is to retrieve transactions results for order ids as passed using the Open API method.

1. URL: https://app.senangpay.my/apiv1/query_order_status

2 . Method: GET

3. Parameters:

  • merchant_id
  • order_id
  • hash

4. Return format: JSON

5. In order to generate the hash, create a single string consisting of (according to sequence) the values below

  • merchant_id
  • secret key
  • order_id

6. Then please use md5 to hash the string. Sample code in PHP as shown below :

$secret_key = '21245-957';
$order_id = '123';

$hash = md5($merchant_id.$secret_key.$order_id);

?>

So the string to be hash is 54316046480557421245-957123 which will generate hash values as:

  • 368c7a62e622a553107dc5b30849a5f2

7. If you choose SHA256 , sample code in PHP as shown below :

$secret_key = '21245-957';
$order_id = '123';

$hash = hash_hmac('sha256',$merchant_id.$secret_key.$order_id, $secret_key);

?>

So the string to be hash is 54316046480557421245-957123 which will generate hash values as:

  • b613679a0814d9ec772f95d778c35fc5ff1697c493715653c6c712144292c5ad