Transaction Enquiry
If you wish to enquire about a transaction status after completion, you can use the following API endpoint with the provided information
Enquiry Implementation Steps
To get transaction results
To get the status of a transaction, call the Enquiry API with the transaction token appended to the URL, and your accessCode in the headers.
Pass the transaction token
Pass the payment transaction token (returned in the payment response) in the Enquiry API URL. Refer to the example below.
Sandbox Transaction Enquiry
Below Enquiry API strictly for sandbox testing only. Never use these sandbox URL's in production environment
$baseUrl = "https://sandbox.hesabe.com";
$token = "521042117249344539468767555844"; // Payment transaction token
$transactionApiUrl = $baseUrl . "/api/transaction/" . $token; // Pass the token in the URL
$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();Here's an transaction enquiry parameters details
| Field | Type | Description | Required |
|---|---|---|---|
token | Alphanumeric | Payment transaction token to be passed in the URL (/api/transaction/{token}). | Yes |
accessCode | String | Access Code provided by Hesabe to be passed in the Headers | Yes |
Transaction Enquiry Response Details
Here's an sample response structure
{
"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"
}
]
}For Any Technical Assistance
If you encounter any issues or need support during setup or integration, please contact our technical team for assistance.
Hesabe IT Support
Webhook Integration
Implement a webhook to receive real-time transaction updates by creating a POST API endpoint designed to accept transaction parameters. Include your URL in the "webhookUrl" variable along with other required parameters as specified in the Hesabe developer portal.
Authorized Method
The Authorize/Capture payment flow is a two-step process that allows merchants to authorize a transaction first (ensuring funds availability) and capture the funds later when ready to deliver the service or product.