To resend the invoice
Resend Invoice allows the merchant to resend an existing invoice link or notification to the customer without creating a new one
Pass access token obtained from login endpoint
In: header
Header Parameters
Pass the merchant access code issued by Hesabe
application/json
application/json
Convert payload JSON object to encrypted string and send it to the server
Sample Encryption and Decryption Process:
The following steps demonstrate how to integrate with this API using sandbox credentials.
Step 1: Create JSON Object
{
"merchantCode": "842217", // Merchant code
"mobileNumber": "66666666", // Customer mobile number
"resendId": "1782", // Invoice ID
"countryCode": "965" // Mobile number country code
}Payload Details:
Contains the list of parameters and their corresponding values required to make the API request.
| Field Name | Description | Required |
|---|---|---|
merchantCode | Pass the merchant code provided by Hesabe | Yes |
resendId | Pass the invoice ID | Yes |
mobileNumber | Pass the customer mobile number | Yes |
countryCode | Pass the mobile number country code | Yes |
Step 2: Convert the JSON object into an encrypted string format and post to Hesabe
{
"data": "0e7898bd7464d0c402fe8a949d9cbf9b64a98634a092ee6261f9f3d288eb01a442a32ba890f3e1db57ebd53c63045f937893814a58f53fe89567e4a7fd0923ca713b69bc551f42f20dbf709a3a0ecbff399283b2fa9dae1182c39e332b309746"
}Step 3: Receive encrypted response from Hesabe:
{
"response": "60a8f6241932227b840a9f5e36987f4d894e5813e1ec714a9f1093832ea779372e755d4f96de747965dbe4f0a7a10302862340426d65a0ccad68965594c5b4bed6b6a2036f42cae49d781bd0e3d3e0fdd6a0a4a38f631face99e1f4f819b29099a1ff18b4f1f4b59623868fa8d938efc4ddea36d08655dea2d54a259a37e95da5e6420501c248ca23e735272f907c5b71ad3b4bb61de1d3411003447d1584f4adb3ba7c630cd360df78df77faac5b6b746602ec241cdc67254fe8303b65ceafe3b1d24d289f794fbd185a1e7bfaaba832da0dc3264a128b947eb5b207732889bfb879661e0c97c3a67132758ae532373a94df265a4a2b0074ac66cd022d6f4c5ecba1266212ccae58d1f25b01b350828061f1911ef242a7b5a78a80c5e301ca0f631d567576436c9b2dfdfd2ec40de91dc4ceedf0389599460bef3eba2bb45ec28a01c45daf0d605bb9dfd10e39f90d9e9c50055809050fad216e61121391d2dd8bcf43dc3150a99b16e0269eed22cb504d3f8e4ba7d148fbe720b99a6d1c71a30f707037a78cd96d06888d6cc63c7a6a75ae77ac9d03c8a4acec528f75ccc15dfa86d0fdd6b85a6e19775e3ab9f848b333dd704ae7a8f51250633f0b8005259664a7278224d6467193457246661b710c0d058a1e27e92acc86c7fae622f83a63d72374ca044357f81f034bc578aef6ae9e4fc95ef92351dc08d33c6c7f961330e07043785ac82b8139a51527dd0262404e6745f42b53759edaed002191f727dc5d597f85f805a4a00422671042f57267af331bab4bd2e834bbf5c5d9aa9ec04c49d26ef4139900d7fea9dc090adf5e93d86cdfd3a1398a6c6f80e59e66875751c37f4b856dc01f9a732f27f32f195e0b8ab273cea0631f850bcf2445b829aa501cc2a5d3d88fb85b0b025e173a3749bada6ce71c30b96d1c3b67fbade58800507fe73bdc9a30a3732c4e670eb4e00a0f501a923e1c4adbdd10ea373d98f8b5b1b22ee56aaa5f9e226704bbfe315472c1d05dba73985709ca597d319be2070ed8aefd48b2afa0d699f4d4042dc821c1be7f211af84ae3dfbfe7e3420cf6154c8c3c0df1464f7a8defd0c946ebddbd40b0ae450815e0a0180ab2d7838425930d96d9f10a5557d24fc9bf520a80d894f6432fdf66f8413fba6e5d948f390e2cfabb8e1ca20d3b960b656ba0f5db40de2268aceff95ecfdd28f8f6be1c8abdaad3dcb658226724ed0db5b1235132eae6e16de54bfdbc1f8dac2404383c080d35f0784c7c1b52a2e1cee97f745bbe5f24b1948b902e2879aa380005dfe71387d44c30ee0a7b1eb22914e27c902ff7c3d0a53f90413f5f59f3d59c62944f927d2b322b01d3d25eefc7b06e45a2106e657116ac240d0234ab718442e7c490f9ba9e605872b353212f36309456be511f761197422a47b792fce6530afcd532ce8a1711d"
}Step 4: Decrypt the api response and view the JSON output
{
"status": true,
"message": "Invoice Resent Successfully",
"response": {
"id": 1782,
"invoice_type": 2,
"invoice_sub_type": 0,
"token": "84159548797454477963411",
"access_key": "17825f1936e6a80d5",
"split_access_key": "",
"merchant_id": "84",
"reference_number": "HEST00043",
"amount": "2.320",
"service_charge": "0.000",
"payment_method": [
""
],
"discount": "0.000",
"description": "Due Payment",
"sms_response": "{\"requestError\":0,\"messageId\":\"786297ad-7c50-4b8f-92e0-2cfedce5daa3\",\"isOK\":true,\"result\":\"0\",\"smS_Cost\":3200}",
"invoice_status": 0,
"subscription": null,
"sms_status": 1,
"url_status": 0,
"visited_count": 0,
"country_id": 11,
"created_id": 84,
"language": null,
"expires_at": null,
"attachment": "",
"url": "http://demo.hesabe.com/s/17825f1936e6a80d5",
"spliturl": null,
"created_at": "2020-07-23 10:06:14",
"updated_at": "2025-10-09 09:07:50",
"en_sms": "",
"ar_sms": "",
"customer": {
"name": "Shabhazz",
"email": "rezna.ursource@gmail.com",
"phone_number": "96566666666"
},
"created_by_merchant": {
"id": 84,
"name": "test"
},
"products": [],
"transaction": null
}
}Response Body
application/json
application/json
application/json
const body = JSON.stringify({ "data": "0e7898bd7464d0c402fe8a949d9cbf9b64a98634a092ee6261f9f3d288eb01a442a32ba890f3e1db57ebd53c63045f937893814a58f53fe89567e4a7fd0923ca713b69bc551f42f20dbf709a3a0ecbff399283b2fa9dae1182c39e332b309746"})fetch("https://merchantapisandbox.hesabe.com/api/v1/invoice/resend", { method: "POST", headers: { "Content-Type": "application/json", "accessCode": "c333729b-d060-4b74-a49d-7686a8353481", "Accept": "application/json" }, body}){
"status": true,
"message": "Invoice Resent Successfully",
"response": {
"id": 1782,
"invoice_type": 2,
"invoice_sub_type": 0,
"token": "84159548797454477963411",
"access_key": "17825f1936e6a80d5",
"split_access_key": "",
"merchant_id": "84",
"reference_number": "HEST00043",
"amount": "2.320",
"service_charge": "0.000",
"payment_method": [
""
],
"discount": "0.000",
"description": "Due Payment",
"sms_response": "{\"requestError\":0,\"messageId\":\"786297ad-7c50-4b8f-92e0-2cfedce5daa3\",\"isOK\":true,\"result\":\"0\",\"smS_Cost\":3200}",
"invoice_status": 0,
"subscription": null,
"sms_status": 1,
"url_status": 0,
"visited_count": 0,
"country_id": 11,
"created_id": 84,
"language": null,
"expires_at": null,
"attachment": "",
"url": "http://demo.hesabe.com/s/17825f1936e6a80d5",
"spliturl": null,
"created_at": "2020-07-23 10:06:14",
"updated_at": "2025-10-09 09:07:50",
"en_sms": "",
"ar_sms": "",
"customer": {
"name": "Shabhazz",
"email": "rezna.ursource@gmail.com",
"phone_number": "96566666666"
},
"created_by_merchant": {
"id": 84,
"name": "test"
},
"products": [],
"transaction": null
}
}{
"status": false,
"message": "Request not found, Please verify the request data",
"response": null
}{
"message": "Internal server error occurred"
}Get Invoice list
Retrieves the list of invoices for the merchant with customer details, amount, and payment status. The request payload must be sent in encrypted format.
Get Invoice Details
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