E-Invoicing

QR Code Requirements for ZATCA E-Invoices: TLV Format Guide

Feb 28, 2026 280 views
QR Code Requirements for ZATCA E-Invoices: TLV Format Guide

QR Code Requirements for ZATCA E-Invoices: TLV Format Guide

The Kingdom of Saudi Arabia is undergoing a significant digital transformation with the implementation of e-invoicing regulations mandated by the Zakat, Tax and Customs Authority (ZATCA). A crucial aspect of these regulations is the inclusion of a QR code on all compliant e-invoices. Understanding the specific QR code requirements, especially the TLV (Tag-Length-Value) format, is paramount for businesses operating in Saudi Arabia. This guide provides a comprehensive overview of ZATCA's QR code specifications, demystifying the TLV format and helping you ensure compliance.

Understanding ZATCA E-Invoicing and QR Codes

ZATCA's e-invoicing initiative aims to streamline tax processes, increase transparency, and combat tax evasion. The regulations mandate the generation and storage of invoices in a structured electronic format. The QR code serves as a machine-readable summary of the invoice, enabling quick verification by ZATCA inspectors and facilitating efficient processing. Phase one, the generation phase, has been in effect for several years. Businesses must now ensure full integration and meet all wave deadlines.

For the second phase, known as the integration phase, ZATCA is implementing a phased rollout based on taxpayers' revenue. Several waves have already passed, and the upcoming waves in 2026 will impact even more businesses. Ensure your system is prepared well in advance to avoid penalties.

What is the TLV Format?

The TLV format is a method of encoding data where each piece of information is represented by three components:

  • Tag (T): A numeric identifier that represents the type of data being stored.
  • Length (L): Specifies the length (in bytes) of the value component.
  • Value (V): The actual data itself.

ZATCA specifies that the QR code for e-invoices must be generated using a specific TLV structure to ensure consistency and ease of parsing. This structure provides a standardized way for ZATCA to extract key information from the invoice. Ignoring this format can lead to rejection of your invoices and potential penalties.

ZATCA QR Code TLV Structure: A Detailed Breakdown

The ZATCA QR code TLV structure comprises a set of mandatory tags, each representing a specific piece of invoice data. Here's a breakdown of the essential tags and their corresponding data:

  • Tag 1 (Seller Name): The name of the seller issuing the invoice.
  • Tag 2 (VAT Registration Number of Seller): The VAT registration number of the seller.
  • Tag 3 (Timestamp): The date and time when the invoice was generated (in UTC).
  • Tag 4 (Invoice Total Amount): The total amount of the invoice, including VAT.
  • Tag 5 (VAT Amount): The total VAT amount on the invoice.
  • Tag 6 (Invoice Total Amount Without VAT (Optional)): The invoice amount excluding VAT (only required for certain invoice types).
  • Tag 7 (Invoice Type Code (Optional)): Indicates the type of invoice (e.g., standard, simplified, debit, credit). Note, this tag may be required depending on the invoice type and future ZATCA updates.

Important Considerations:

  • Encoding: All data must be encoded using UTF-8.
  • Data Types: Ensure the correct data type is used for each field (e.g., numbers for amount fields, text for names).
  • Length Calculation: The length value (L) must accurately reflect the length of the encoded value (V) in bytes.
  • Order: The TLV tags must be in the order specified above (Tag 1, Tag 2, Tag 3, etc.).

Generating the QR Code in TLV Format: A Step-by-Step Guide

Generating a ZATCA-compliant QR code involves several steps:

  1. Gather Invoice Data: Collect all the required data points for the mandatory TLV tags.
  2. Encode Data: Encode each data element using UTF-8.
  3. Calculate Length: Determine the length (in bytes) of each encoded data element.
  4. Construct TLV Strings: Create the TLV string for each data element by concatenating the tag number, length, and encoded value. For example: [Tag][Length][Value].
  5. Concatenate TLV Strings: Combine all the TLV strings in the specified order.
  6. Generate QR Code: Use a QR code generator to create the QR code using the concatenated TLV string as the data. The QR code should be generated as a Data Matrix ECC 200 symbol.

Example (Illustrative):

Let's say we have the following data:

  • Seller Name: "Acme Corp"
  • VAT Registration Number: "123456789012345"
  • Timestamp: "2024-01-26T10:00:00Z"
  • Invoice Total Amount: 100.00
  • VAT Amount: 15.00

The resulting (simplified) TLV data (after encoding and length calculation) might look like this:

  • Tag 1 (Seller Name): 010941636D6520436F7270 (Hex encoded "Acme Corp" with length 09)
  • Tag 2 (VAT Registration Number): 020F313233343536373839303132333435 (Hex encoded "123456789012345" with length 0F)
  • Tag 3 (Timestamp): 0314323032342D30312D32365431303A30303A30305A (Hex encoded "2024-01-26T10:00:00Z" with length 14)
  • Tag 4 (Invoice Total Amount): 04063130302E3030 (Hex encoded "100.00" with length 06)
  • Tag 5 (VAT Amount): 050531352E3030 (Hex encoded "15.00" with length 05)

These hex representations would then be concatenated and used as the data for generating the QR code. Note: This is a simplified illustration. Actual implementation requires careful attention to encoding and data type handling.

Common Challenges and How to Overcome Them

Implementing the ZATCA QR code requirements can present several challenges:

  • Encoding Issues: Incorrect UTF-8 encoding can lead to parsing errors. Ensure you are using the correct encoding library and handling special characters appropriately.
  • Length Calculation Errors: Inaccurate length calculations will result in invalid TLV strings. Double-check your length calculation logic.
  • Data Type Mismatches: Using the wrong data type for a field (e.g., treating a number as text) can cause issues. Verify your data types.
  • Staying Updated: ZATCA regulations may evolve. Keep abreast of any updates and adjust your systems accordingly. Failure to keep up to date can be costly, especially with the 2026 wave deadlines looming.

FatooraPlus: Your Partner for ZATCA E-Invoicing Compliance

Navigating the complexities of ZATCA e-invoicing, especially the intricate TLV format for QR codes, can be daunting. That's where FatooraPlus comes in. Our comprehensive e-invoicing solution is specifically designed to ensure seamless compliance with ZATCA regulations. We handle all the technical complexities, including QR code generation in the correct TLV format, allowing you to focus on your core business.

FatooraPlus provides:

  • Automated QR code generation with accurate TLV formatting.
  • Real-time validation to ensure compliance before invoice submission.
  • Secure data storage and transmission.
  • Regular updates to reflect the latest ZATCA requirements.
  • User-friendly interface for easy invoice management.

With the upcoming 2026 wave deadlines, now is the time to ensure your e-invoicing system is fully compliant. Don't risk penalties or disruptions to your business.

Conclusion

Mastering the QR code requirements, particularly the TLV format, is essential for ZATCA e-invoicing compliance. While the process can seem complex, understanding the fundamentals and utilizing a reliable solution like FatooraPlus can simplify the process. By staying informed and proactive, businesses in Saudi Arabia can seamlessly integrate e-invoicing into their operations and contribute to a more transparent and efficient economic ecosystem.

Ready to simplify your ZATCA e-invoicing and ensure compliance? Start your free trial at FatooraPlus.com today!

Share this article