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 create a refund request for a transaction, pass the following parameters
Sandbox Transaction Enquiry
Below Enquiry API strictly for sandbox testing only. Never use these sandbox URL's in production environment
Production Transaction Enquiry
Use the following Enquiry API strictly for production transactions. Ensure that you never use these production URLs in the sandbox or testing environment
$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();Here's an transaction enquiry parameters details
| Field | Type | Description | Required |
|---|---|---|---|
data | Alphanumeric | Data can be either Payment Transaction token or Order Reference Number (used in the request) to be passed in the URL | Yes |
accessCode | String | Access Code provided by Hesabe to be passed in the Headers | Yes |
Important Note
If you are using Order Reference Number, you are required to pass isOrderReference=1 in the body of the request.
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.
Hosted Checkout
Integrate Hesabe's payment gateway directly into your website with our embedded checkout solution. Provide customers with a smooth, secure payment experience while maintaining complete control over the user journey.