# issue when validating the signed invoice with the compliance API

**URL:** <https://zatca1.discourse.group/t/issue-when-validating-the-signed-invoice-with-the-compliance-api/8010>\
**Category:** Signing process\
**Created:** [August 13, 2025, 3:22pm UTC](https://zatca1.discourse.group/t/issue-when-validating-the-signed-invoice-with-the-compliance-api/8010 "2025-08-13T15:22:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marwa2081997](https://avatars.discourse-cdn.com/v4/letter/m/6de8d8/32.png) [@Marwa2081997](https://zatca1.discourse.group/u/Marwa2081997)\
**Post date:** [August 13, 2025, 3:22pm UTC](https://zatca1.discourse.group/t/issue-when-validating-the-signed-invoice-with-the-compliance-api/8010/1 "2025-08-13T15:22:22Z")

</div>

Hello,  
I’m facing an issue when validating the signed invoice with the compliance API.  
The error returned is:  
The invoice hash API body does not match the (calculated) Hash of the XML  
**Details:**

- The XML invoice is generated and signed according to ZATCA Phase 2 requirements.

- After signing, I calculate the invoice hash and send it in the API body.

- However, the compliance check returns the above error, meaning the API’s calculated hash doesn’t match mine.  
HERE IS MY CODE .NET
