# Invalid QR Code

**URL:** <https://zatca1.discourse.group/t/invalid-qr-code/8899>\
**Category:** QR code\
**Created:** [October 27, 2025, 8:36am UTC](https://zatca1.discourse.group/t/invalid-qr-code/8899 "2025-10-27T08:36:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![api\_pioneers](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@api\_pioneers](https://zatca1.discourse.group/u/api_pioneers)\
**Post date:** [October 27, 2025, 8:36am UTC](https://zatca1.discourse.group/t/invalid-qr-code/8899/1 "2025-10-27T08:36:52Z")

</div>

steps i do is

1- generate basic invoice  
2-GenerateInvoiceHash(xmlInvoice);

3-AddUBLExtensions(xmlInvoice, \_hash.Hash, );

4- SignGeneratedInvoiceHash(updatedXml.OuterXml);

5-add hash to invoice

XmlNamespaceManager nsmgr = new XmlNamespaceManager(updatedXml.NameTable);  
nsmgr.AddNamespace(“ext”, “urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2”);  
nsmgr.AddNamespace(“sig”, “urn:oasis:names:specification:ubl:schema:xsd:CommonSignatureComponents-2”);  
nsmgr.AddNamespace(“sac”, “urn:oasis:names:specification:ubl:schema:xsd:SignatureAggregateComponents-2”);  
nsmgr.AddNamespace(“ds”, “[XML-Signature Syntax and Processing](http://www.w3.org/2000/09/xmldsig#%E2%80%9D));  
XmlNodeList lst = updatedXml.SelectNodes(“//ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/sig:UBLDocumentSignatures/sac:SignatureInformation/ds:Signature/ds:SignedInfo/ds:Reference[@URI=‘#xadesSignedProperties’]/ds:DigestValue”, nsmgr);

XmlNode dig = lst[0];  
dig.InnerText = \_Fsign.Steps.Where(x=\>x.StepName== “Populate Signed Signature Properties”).FirstOrDefault().ResultedValue;

XmlNode SignatureValue = updatedXml.GetElementsByTagName(“ds:SignatureValue”).Item(0);

SignatureValue.InnerText= \_Fsign.Steps.Where(x =\> x.StepName == “Generate Signature”).FirstOrDefault().ResultedValue;

XmlNode KeyInfo = updatedXml.GetElementsByTagName(“ds:X509Certificate”).Item(0);

KeyInfo.InnerText = \_Fsign.Steps.Where(x =\> x.StepName == “Parse Certificate”).FirstOrDefault().ResultedValue;

6- CreateAdditionalDocumentReferences(updatedXml.OuterXml,bill, \_hash.Hash) which contain the QR Generation

When try to validate the QR Code with TLV it pring thid data to me === TLV Validation ===  
Tag: 1, Length: 31, Value: Tadawi Hospital Tadawi Hospital  
Seller Name: ‘Tadawi Hospital Tadawi Hospital’ (Length: 31)  
Tag: 2, Length: 15, Value: 399999999900003  
VAT Number: ‘399999999900003’ (Should be 15 digits)  
_**Tag: 3, Length: 0, Value:  
Timestamp: ‘’  
WARNING: Timestamp format may be invalid**_  
Tag: 4, Length: 6, Value: 460.00  
Invoice Total: ‘460.00’  
Tag: 5, Length: 5, Value: 60.00  
VAT Total: ‘60.00’  
Tag: 6, Length: 44, Value: 5S+WPF8GNIqSc33l0eWZBrfLtCMl+TyG8ifnf+6d3RM=  
Invoice Hash: ‘5S+WPF8GNIqSc33l0eWZBrfLtCMl+TyG8ifnf+6d3RM=’ (Length: 44)  
Tag: 7, Length: 96, Value: MEUCIQCOjK+eJMaP9/0aeuzlE8KLwueVj1NZh1tlzSLuhAUO/AIgGB3Dxqz3Tly3xSYEr7LbryILZO306ng1AsiBgAtUcs4=  
Tag: 8, Length: 88, Value: 0V0►:spade\_suit:\*?H?=:slight\_smile:☺♠♣+?♦  
❤B​:diamond\_suit:?`?kD??R♦?3???$♂UH)|T?s??k?⌂??1????6\??♫???'h?j?j‼???<? ??{u)?Tx "??♣???w(q?↕?0>?☻?, Value: 0E☻ ??6?D??pl?e?t???▲????JI SUCCESS: All required TLV tags present UTF-8 decoded: ☺▼Tadawi Hospital Tadawi Hospital☻☼399999999900003♥♦♠460.00♣♣60.00♠,5S+WPF8GNIqSc33l0eWZBrfLtCMl+TyG8ifnf+6d3RM=`MEUCIQCOjK+eJMaP9/0aeuzlE8KLwueVj1NZh1tlzSLuhAUO/AIgGB3Dxqz3Tly3xSYEr7LbryILZO306ng1AsiBgAtUcs4X0V0►:spade\_suit:\*?H?=:slight\_smile:☺♠♣+:diamond\_suit:  
"??♣???w(q?↕?0\>?🙂?♂UH)|T?s??k?⌂??1???6??♫???'h?j?j​:double\_exclamation\_mark:???\<? ??{u)?Tx G0E​:slight\_smile: ??6?D??pl?e?t???▲???JI  
Why i got the Time Stamp Empty i validate on the Issue Date and Issue time and it returned with valid values ? Please can you help in This

---

<div class="post-metadata">

**Author:** ![api\_pioneers](https://avatars.discourse-cdn.com/v4/letter/a/eb9ed0/32.png) [@api\_pioneers](https://zatca1.discourse.group/u/api_pioneers)\
**Post date:** [October 29, 2025, 7:58am UTC](https://zatca1.discourse.group/t/invalid-qr-code/8899/2 "2025-10-29T07:58:41Z")

</div>

now the timestamp returned successfully when i update to sdk einvoicing-sdk-DotNet-238-R3.4.5 but still the QR Code is Invalid
