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

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

FieldTypeDescriptionRequired
token
AlphanumericPayment transaction token to be passed in the URL (/api/transaction/{token}).Yes
accessCode
StringAccess Code provided by Hesabe to be passed in the HeadersYes

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