Cancel invoice
Cancels an existing invoice for a merchant. Once canceled, the invoice cannot be paid or processed further. The request should include the invoice token number
Base URL
Sandbox Base URL
bearerAuthAuthorizationBearer <JWT>Pass access token obtained from login endpoint
accessCode*stringPass the merchant access code issued by Hesabe
Accept*stringapplication/json
Content-Type*stringapplication/json
invoice_token*stringPass the invoice token number
application/json- body
data*stringConvert payload JSON object to encrypted string and send it to the server
Step 1: Create JSON Object
{ "merchantCode": "842217", // Sandbox merchant code "statusId": "3" // "3" for cancelling the invoice}Step 2: Convert JSON Object into Encrypted string and post to Hesabe
{ "data": "0e7898bd7464d0c402fe8a949d9cbf9b5f8c59ee58f681aecdd90bd6b0b506de11a11b69c0a658c7a9948425daa7261a"}Step 3: Receive encrypted response from Hesabe
{ "response": "60a8f6241932227b840a9f5e36987f4d894e5813e1ec714a9f1093832ea77937b298e2fd12ae31865c8949b356931c0fd6c88f5b188f1e01857538b4431055a88813ef3ef595ff271d7ac37f0338f9a4689fd9bec344551d7b4c0c9a382f99d9"}Step 4: Decrypt the API response and view the JSON output
{ "status": true, "message": "Invoice status update successfully", "response": null}Details fetched successfully. Decrypt the server response to view the final result
application/json- response
status?booleanmessage?stringresponse?|nullconst body = JSON.stringify({ "data": "0e7898bd7464d0c402fe8a949d9cbf9b5f8c59ee58f681aecdd90bd6b0b506de11a11b69c0a658c7a9948425daa7261a"})fetch("https://merchantapisandbox.hesabe.com/api/v1/invoice/8417596678339677489", { method: "PUT", headers: { "Content-Type": "application/json", "accessCode": "c333729b-d060-4b74-a49d-7686a8353481", "Accept": "application/json" }, body}){ "status": true, "message": "Invoice status update successfully", "response": null}Get Invoice Details GET
Retrieves detailed information for a specific invoice, including customer information, invoice amount, payment status, and related transaction data. The request should include the invoice ID and required authentication credentials
Transaction list GET
Get a complete list of transactions with their results and status information