# QR code invalid error

**URL:** <https://zatca1.discourse.group/t/qr-code-invalid-error/3548>\
**Category:** QR code\
**Created:** [October 7, 2024, 3:30pm UTC](https://zatca1.discourse.group/t/qr-code-invalid-error/3548 "2024-10-07T15:30:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yashdxr](https://avatars.discourse-cdn.com/v4/letter/y/4da419/32.png) [@yashdxr](https://zatca1.discourse.group/u/yashdxr)\
**Post date:** [October 7, 2024, 3:30pm UTC](https://zatca1.discourse.group/t/qr-code-invalid-error/3548/1 "2024-10-07T15:30:45Z")

</div>

I am trying to generate a qr code for a simplified invoice.  
I am very confused as in what all fields are required to generate PHASE 2 qr code.  
I am using these fields  
seller\_name, VAT\_number, datetime, invoice\_total, VAT\_total, invoice\_hash\_value, ecdsa\_signature, ecdsa\_public\_key, ecdsa\_signature\_zatca

I have converted every field to string first then sent in this function

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/zatca1/original/1X/9df3a1503fb433ab0435a672a53a97f7fd3fca63.png)

and then this method is called for every field  
remember i’m sending Tag in string format, as well as value in string format

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/zatca1/original/1X/76e3a3b89657f32d32ed04965602471a3bef7d4f.png)

I then convert the final output into base64 string.  
This creates a error of qr code length excceded as well as invalid qr code format.

Also where do i find these values  
invoice\_hash\_value,  
ecdsa\_signature,  
ecdsa\_public\_key,  
ecdsa\_signature\_zatca

And what data type should they be before sending as a value in the TLV function.

Please can anyone explain me this!!
