# The invoice hash API body does not match the (calculated) Hash of the XML

**URL:** <https://zatca1.discourse.group/t/the-invoice-hash-api-body-does-not-match-the-calculated-hash-of-the-xml/2301>\
**Category:** Signing process\
**Created:** [August 7, 2024, 8:25am UTC](https://zatca1.discourse.group/t/the-invoice-hash-api-body-does-not-match-the-calculated-hash-of-the-xml/2301 "2024-08-07T08:25:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohmed58264](https://avatars.discourse-cdn.com/v4/letter/m/b3f665/32.png) [@mohmed58264](https://zatca1.discourse.group/u/mohmed58264)\
**Post date:** [August 7, 2024, 8:25am UTC](https://zatca1.discourse.group/t/the-invoice-hash-api-body-does-not-match-the-calculated-hash-of-the-xml/2301/1 "2024-08-07T08:25:27Z")

</div>

i always recive this error

{  
“validationResults”: {  
“infoMessages”: [  
{  
“type”: “INFO”,  
“code”: “XSD\_ZATCA\_VALID”,  
“category”: “XSD validation”,  
“message”: “Complied with UBL 2.1 standards in line with ZATCA specifications”,  
“status”: “PASS”  
}  
],  
“warningMessages”: ,  
“errorMessages”: [  
{  
“type”: “ERROR”,  
“code”: “invalid-invoice-hash”,  
“category”: “INVOICE\_HASHING\_ERRORS”,  
“message”: “The invoice hash API body does not match the (calculated) Hash of the XML”,  
“status”: “ERROR”  
}  
],  
“status”: “ERROR”  
},  
“reportingStatus”: null,  
“clearanceStatus”: “NOT\_CLEARED”,  
“qrSellertStatus”: null,  
“qrBuyertStatus”: null  
}

Environment: Simulation  
Link: [https://gw-fatoora.zatca.gov.sa/e-invoicing/simulation/precompliance/invoices](https://gw-fatoora.zatca.gov.sa/e-invoicing/simulation/precompliance/invoices)

SignResult signedResult = eInvoiceSigner.SignDocument(eInvoice, cer, privateKey);

- eInvoice: Standard\_Invoice.xml (uploaded in this email)
- cer: Decoded from base64 for binarySecurityToken
- privateKey:“MHQCAQEEID6mGxPXV6jTrkeKrYHeTNtFAEzy3Kqd/dIU99Xmt80xoAcGBSuBBAAKoUQDQgANJFcTJu0msyQvS5n9z7NpLO0TopSeCAFYpM4gIYCh+aisKxd7iRYzdQyBF7bFkclWJSaGb0D0RsZ6YOA==”

Notice:  
When I use the following commands, everything works well:

```auto
fatoora -sign -qr -invoice Standard_Invoice.xml -signedinvoice signedinvoice.xml
fatoora -generateHash -invoice Standard_Invoice.xml

```

---

<div class="post-metadata">

**Author:** ![idaoud](https://avatars.discourse-cdn.com/v4/letter/i/f9ae1b/32.png) [@idaoud](https://zatca1.discourse.group/u/idaoud)\
**Post date:** [August 7, 2024, 9:16am UTC](https://zatca1.discourse.group/t/the-invoice-hash-api-body-does-not-match-the-calculated-hash-of-the-xml/2301/2 "2024-08-07T09:16:32Z")

</div>

Dear @mohmed58264

Thanks for reaching out.

Please refer to the Fatoora Simulation Portal and find the tab for API documentation to locate the correct endpoint for each step in the onboarding process.

It seems that you are still not integrated with ZATCA successfully. Could you kindly answer the following questions:

1. Are you using our SDK tool? If yes, are you using Java or .Net?
2. Have you reviewed all the materials in the educational library provided on the ZATCA site?

Thank you,  
Ibrahem Daoud.

---

<div class="post-metadata">

**Author:** ![muhammad](https://avatars.discourse-cdn.com/v4/letter/m/b487fb/32.png) [@muhammad](https://zatca1.discourse.group/u/muhammad)\
**Post date:** [September 2, 2024, 8:24am UTC](https://zatca1.discourse.group/t/the-invoice-hash-api-body-does-not-match-the-calculated-hash-of-the-xml/2301/3 "2024-09-02T08:24:25Z")

</div>

hi IDaoud.  
i am having the same issue, with .net SDK,  
Fatoora command and .net SDK generate different HASH,  
clearene api get clear the fatoora command generated HASH only

---

<div class="post-metadata">

**Author:** ![Eng.Osama](https://avatars.discourse-cdn.com/v4/letter/e/3ab097/32.png) [@Eng.Osama](https://zatca1.discourse.group/u/Eng.Osama)\
**Post date:** [November 6, 2024, 12:26pm UTC](https://zatca1.discourse.group/t/the-invoice-hash-api-body-does-not-match-the-calculated-hash-of-the-xml/2301/4 "2024-11-06T12:26:40Z")

</div>

If you still didn’t fix this problem send me your contact by mail  
[Eng.Osama@topex-solutions.com](mailto:Eng.Osama@topex-solutions.com)
