# Invoice xml hash does not match with qr code invoice xml hash

**URL:** <https://zatca1.discourse.group/t/invoice-xml-hash-does-not-match-with-qr-code-invoice-xml-hash/3653>\
**Category:** General\
**Created:** [October 14, 2024, 12:17pm UTC](https://zatca1.discourse.group/t/invoice-xml-hash-does-not-match-with-qr-code-invoice-xml-hash/3653 "2024-10-14T12:17:03Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abderrahmen](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@Abderrahmen](https://zatca1.discourse.group/u/Abderrahmen)\
**Post date:** [October 14, 2024, 12:17pm UTC](https://zatca1.discourse.group/t/invoice-xml-hash-does-not-match-with-qr-code-invoice-xml-hash/3653/1 "2024-10-14T12:17:03Z")

</div>

We are encountering an issue with specific invoices that we have been unable to resolve. We have not been able to pinpoint what is wrong with them. After thoroughly reviewing the invoice details, invoice lines, journals, and other related data, everything appears to be correct.

Error message:  
{

```auto

   "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"
         },
         {
            "type":"ERROR",
            "code":"invoiceHash_QRCODE_INVALID",
            "category":"QRCODE_VALIDATION",
            "message":"Invoice XML hash does not match with QR code invoice XML hash",
            "status":"ERROR"
         }
      ],
      "status":"ERROR"
   },
   "reportingStatus":"NOT_REPORTED"
}

```

The message doesn’t appear anywhere else in the web and it was not reported. we are using Odoo 15 and the standard zatca module.

Please find bellow a link to the invoice XML hash, and the request data.  
I already send an email to the support team and got no response for over a month now.

[https://we.tl/t-B5T7fqnmSG](https://we.tl/t-B5T7fqnmSG)

Any help would be appreciated.  
Thank you so much.  
Regards

---

<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:** [October 14, 2024, 12:41pm UTC](https://zatca1.discourse.group/t/invoice-xml-hash-does-not-match-with-qr-code-invoice-xml-hash/3653/2 "2024-10-14T12:41:31Z")

</div>

Dear @Abderrahmen

Thanks for reaching out,

Can I kindly ask you to answer the below questions to ensure comprehensive support as usual:

1- Are you using our SDK tool? if yes, JAVA or .Net  
2- Are you using the latest version of SDK?  
3- Did you successfully onboard new device? If yes, what are the steps you followed.  
4- Before sending the simplified invoice, what are the steps you following?

Thanks,  
Ibrahem Daoud.

---

<div class="post-metadata">

**Author:** ![Ather](https://dub1.discourse-cdn.com/flex013/user_avatar/zatca1.discourse.group/ather/32/848_2.png) [@Ather](https://zatca1.discourse.group/u/Ather)\
**Post date:** [October 16, 2024, 7:39am UTC](https://zatca1.discourse.group/t/invoice-xml-hash-does-not-match-with-qr-code-invoice-xml-hash/3653/3 "2024-10-16T07:39:33Z")

</div>

@Abderrahmen

**Check the QR Code value.**  
Schema validation failed; XML does not comply with UBL 2.1 standards in line with ZATCA specifications. ERROR: org.xml.sax.SAXParseException; lineNumber: 84; columnNumber: 155; cvc-datatype-valid.1.2.1: ‘غير منطبق’ is not a valid value for ‘base64Binary’.

```auto
<cbc:EmbeddedDocumentBinaryObject mimeCode="text/plain">&#1594;&#1610;&#1585; &#1605;&#1606;&#1591;&#1576;&#1602;</cbc:EmbeddedDocumentBinaryObject>

```

---

<div class="post-metadata">

**Author:** ![Abderrahmen](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@Abderrahmen](https://zatca1.discourse.group/u/Abderrahmen)\
**Post date:** [October 16, 2024, 7:44am UTC](https://zatca1.discourse.group/t/invoice-xml-hash-does-not-match-with-qr-code-invoice-xml-hash/3653/4 "2024-10-16T07:44:03Z")

</div>

Hello @idaoud,

Thank you for your response.  
1- No, we are using the official zatca module from Odoo. it is a customized solution in python (It is working just fine, the problem only occurs on few invoices).  
2- Everything is up to date we update our production regularly to the latest Odoo version.  
3- It is not a new device, as i said, we used the same configurations to process invoices just fine (it is still working and we are processing invoices daily).  
4- We just create an invoice, confirm it , and process normally. (Odoo uses the Zatca standard for signing, simplified invoices).

As i explained, 99% of the invoices are processed without any problems. But for some reasons, 16 invoices are just blocked due to the error mentioned above. I could not find any documentation on the QR Code error in the official Zatca documentation.

I hope my answers are clear and could help for further assistance.  
Thank you.

Best regards,

---

<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:** [October 16, 2024, 7:56am UTC](https://zatca1.discourse.group/t/invoice-xml-hash-does-not-match-with-qr-code-invoice-xml-hash/3653/5 "2024-10-16T07:56:35Z")

</div>

Dear @Abderrahmen

Thanks for reaching out,

Can I kindly ask you to share the invoices after being signed and rejected with the full request body via the below email to do our investigate and get back to you ASAP?

SP email: [sp\_support@zatca.gov.sa](mailto:sp_support@zatca.gov.sa)

Thanks,  
Ibrahem Daoud.

---

<div class="post-metadata">

**Author:** ![Abderrahmen](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@Abderrahmen](https://zatca1.discourse.group/u/Abderrahmen)\
**Post date:** [October 20, 2024, 7:57am UTC](https://zatca1.discourse.group/t/invoice-xml-hash-does-not-match-with-qr-code-invoice-xml-hash/3653/6 "2024-10-20T07:57:16Z")

</div>

Dear @idaoud ,

Yes, i’ll be sending the full request body via email in few mintues, but i’am hoping for an answer as I’ve been sending email for the past 30 days with no actual response.

Thank you for your collaboration dear @idaoud, have a great day.

---

<div class="post-metadata">

**Author:** ![Ather](https://dub1.discourse-cdn.com/flex013/user_avatar/zatca1.discourse.group/ather/32/848_2.png) [@Ather](https://zatca1.discourse.group/u/Ather)\
**Post date:** [October 20, 2024, 8:00am UTC](https://zatca1.discourse.group/t/invoice-xml-hash-does-not-match-with-qr-code-invoice-xml-hash/3653/7 "2024-10-20T08:00:37Z")

</div>

@Abderrahmen Seems your QR Code value is wrong, its some encoded Arabic Text. you can compare the CLEARED XML with the one you uploaded here.

---

<div class="post-metadata">

**Author:** ![Abderrahmen](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@Abderrahmen](https://zatca1.discourse.group/u/Abderrahmen)\
**Post date:** [October 20, 2024, 8:00am UTC](https://zatca1.discourse.group/t/invoice-xml-hash-does-not-match-with-qr-code-invoice-xml-hash/3653/8 "2024-10-20T08:00:59Z")

</div>

@Ather  
Thanks for your response man.  
Can you please validate the XML of the following invoice also?

> **[WeTransfer | Send Large Files Fast - Up To 2GB Free](https://wetransfer.com/downloads/cdec4d96df7e7102a93b5a914ea527f820241016075551/0c02dd?t_exp=1729324551&t_lsid=912f956d-8f25-41a3-9eaf-aa388e9d6fd8&t_network=link&t_s=download_link&t_ts=1729065351)**
>
> The simple, quick and secure way to send your files around the world without an account. Share your files, photos, and videos today for free.

Have a good day !

---

<div class="post-metadata">

**Author:** ![Ather](https://dub1.discourse-cdn.com/flex013/user_avatar/zatca1.discourse.group/ather/32/848_2.png) [@Ather](https://zatca1.discourse.group/u/Ather)\
**Post date:** [October 23, 2024, 7:52am UTC](https://zatca1.discourse.group/t/invoice-xml-hash-does-not-match-with-qr-code-invoice-xml-hash/3653/9 "2024-10-23T07:52:43Z")

</div>

@Abderrahmen Please upload file here, or copy paste. Link is Expired

---

<div class="post-metadata">

**Author:** ![Abderrahmen](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@Abderrahmen](https://zatca1.discourse.group/u/Abderrahmen)\
**Post date:** [October 24, 2024, 7:41am UTC](https://zatca1.discourse.group/t/invoice-xml-hash-does-not-match-with-qr-code-invoice-xml-hash/3653/12 "2024-10-24T07:41:19Z")

</div>

Good day @Ather ,

Please find below the link for the invoices as requested

> **[17629.xml](https://wetransfer.com/downloads/fcfcf179bda3089069d7f50d6f97fb2a20241023102933/762a0b?t_exp=1729938573&t_lsid=912f956d-8f25-41a3-9eaf-aa388e9d6fd8&t_network=link&t_rid=Z29vZ2xlLW9hdXRoMnwxMDQxNzUyODU2NDU0OTE0MDg4MDA=&t_s=download_link&t_ts=1729679373)**
>
> 2 files sent via WeTransfer, the simplest way to send your files around the world

Best,

---

<div class="post-metadata">

**Author:** ![Abderrahmen](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@Abderrahmen](https://zatca1.discourse.group/u/Abderrahmen)\
**Post date:** [October 27, 2024, 9:08am UTC](https://zatca1.discourse.group/t/invoice-xml-hash-does-not-match-with-qr-code-invoice-xml-hash/3653/13 "2024-10-27T09:08:18Z")

</div>

Dear @Ather

Please find bellow attached invoices

> **[Invoices XML](https://wetransfer.com/downloads/818f3427ab1471098e7ce403af2ce3d820241025074439/ed6ebf?t_exp=1730447079&t_lsid=912f956d-8f25-41a3-9eaf-aa388e9d6fd8&t_network=link&t_rid=Z29vZ2xlLW9hdXRoMnwxMDQxNzUyODU2NDU0OTE0MDg4MDA=&t_s=download_link&t_ts=1729842279)**
>
> 2 files sent via WeTransfer, the simplest way to send your files around the world

Best,

---

<div class="post-metadata">

**Author:** ![Ather](https://dub1.discourse-cdn.com/flex013/user_avatar/zatca1.discourse.group/ather/32/848_2.png) [@Ather](https://zatca1.discourse.group/u/Ather)\
**Post date:** [October 27, 2024, 9:09am UTC](https://zatca1.discourse.group/t/invoice-xml-hash-does-not-match-with-qr-code-invoice-xml-hash/3653/14 "2024-10-27T09:09:24Z")

</div>

@Abderrahmen  
your XML missing this line at top, add this line and check again

```auto
<?xml version="1.0" encoding="UTF-8"?>

```
