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

https://sandbox.hesabe.com/api/transaction

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

https://api.hesabe.com/api/transaction
TransactionEnquiry.php
$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

FieldTypeDescriptionRequired
data
AlphanumericData can be either Payment Transaction token or Order Reference Number (used in the request) to be passed in the URLYes
accessCode
StringAccess Code provided by Hesabe to be passed in the HeadersYes

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

Email address:itsupport@hesabe.com