Query Transaction Status

This is to retrieve the transaction results for a specific transaction reference

1. URL:

https://app.senangpay.my/apiv1/query_transaction_status

2. Method: GET

3. Parameters:

  • merchant_id
  • transaction_reference
  • hash

4. Return format: JSON

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

  • merchant_id
  • secret key
  • transaction_reference

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

$secret_key = '21245-957';
$transaction_reference = '160499101311679101';

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

?>

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

  • 640a0a2f9bbf2a1e78b64f8849bfbf71

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

$secret_key = '21245-957';
$transaction_reference = '160499101311679101';

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

?>

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

  • 5685bce1a5c462c4a3f9d40440cab606f02886fbe246ae094f16c492754a2f6b