Transaction Enquiry
🔍 Enquiry Process
🔍
Transaction Status Enquiry
If you wish to enquire about a transaction status after completion, you can use the following API endpoint with the provided information.
📋 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. |
accessCode | String | Access Code provided by Hesabe to be passed in the Headers |
⚠️Note:If you are using Order Reference Number, you are required to pass
isOrderReference=1
in the body of the request.$baseUrl = "https://sandbox.hesabe.com";
$transactionApiUrl = $baseUrl . "/api/transaction/" . $data;
$transactionRequestData = new Request();
$transactionRequest = Request::create($transactionApiUrl, 'GET', $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": "521042117249344539468767555844",
"amount": "45.000",
"reference_number": "1724934434",
"status": "SUCCESSFUL",
"TransactionID": "424210001296274",
"Id": 129179,
"PaymentID": "100424210000015649",
"Terminal": "144301",
"TrackID": "25119",
"payment_type": "KNET",
"service_type": "Payment Gateway",
"customerName": "User Name",
"customerEmail": "user@gmail.com",
"customerMobile": "98726012",
"customerCardType": null,
"customerCard": null,
"datetime": "2024-08-29 15:27:38"
},
"results": [
{
"token": "521042117249344539468767555844",
"amount": "45.000",
"reference_number": "1724934434",
"status": "SUCCESSFUL",
"TransactionID": "424210001296274",
"Id": 129179,
"PaymentID": "100424210000015649",
"Terminal": "144301",
"TrackID": "25119",
"payment_type": "KNET",
"service_type": "Payment Gateway",
"customerName": "User Name",
"customerEmail": "user@gmail.com",
"customerMobile": "98726012",
"customerCardType": null,
"customerCard": null,
"datetime": "2024-08-29 15:27:38"
}
]
}