Transaction Re-query

Next Page: Technical Support
Previous Page: MPGS

If you wish to enquire about a transaction status, after completion, you can do so by using the below information provided to you:

Request Parameters

Field Type Description
data Alphanumeric Data can be either Payment Transaction token or Order Reference Number (used in the request) to be passed in the URL.
NOTE: If you are using Order Reference Number, you are required to pass isOrderReference=1 in the body of the request.
accessCode String Access Code provided by Hesabe to be passed in the Headers

Request Snippet

$baseUrl =
$transactionApiUrl = {{$baseUrl}}/api/transaction/{{$data}}
$transactionRequestData = new Request();
$transactionRequest = Request::create($transactionApiUrl, 'POST', $transactionRequestData->all());
$transactionRequest->headers->set('accessCode', $accessCode);
$transactionRequest->headers->set('Accept', 'application/json');
$transactionResponse = Route::dispatch($transactionRequest);
$transactionResponseContent = $transactionResponse->content();

Response Sample

    "status": true,
    "message": "Transaction found",
    "data": {
        "token": "500161815912804XXXXXXXXXXXXX",
        "amount": 10.25,
        "reference_number": "1591280471",
        "status": "SUCCESSFUL",
        "payment_type": "MPGS",
        "service_type": "Payment Gateway",
        "datetime": "2020-06-07 08:58:48"

Response Parameters

Field Type Description
status Boolean Payment status (true - success; false - failure)
message String Response message
data JSON A JSON object of the transaction is found else null
token Numeric Payment Token returned from Hesabe
amount Float Transaction Amount
reference_number Alphanumeric Reference number stored along with the transaction
status String Status as CAPTURED or any returned from Payment Gateway
payment_type String Payment Gateway used for the transaction. Either KNET or MPGS.
service_type String Hesabe service used for the Transaction.
datetime Datetime Transaction Date and time

{info} Please use the Sandbox URL and test merchant code for testing purposes and Production URL and LIVE merchant code for real transactions.

Next Page: Technical Support
Previous Page: MPGS