Invoice Compliance

Invoice Compliance

Overview

When a cashier closes a sale at an iVendNext POS terminal, several things happen in the background without any action from store staff. The invoice is digitally signed using a cryptographic key. It is formatted in ZATCA-mandated UBL 2.1 XML. A QR code is generated and attached. The document is submitted to the ZATCA FATOORAH platform in real time. And the hash of that invoice is recorded so the next invoice can be correctly chained to it.


Notes

This is what ZATCA Phase 2 e-invoicing compliance looks like in practice — and iVendNext handles all of it automatically, for every transaction, across every store. This article explains each element of that compliance process: what it does, why it exists, and what it means for your finance and operations teams.



B2B and B2C: Two Compliance Paths

ZATCA distinguishes between two invoice types with meaningfully different compliance flows — not just different labels.



Info
B2B invoices — Standard Tax Invoices — are issued to other VAT-registered businesses. These must be cleared by ZATCA before the buyer can receive them. Clearance means ZATCA acts as an active intermediary: the invoice is submitted, validated by the platform, and returned with a CLEARED status and an embedded clearance stamp. The buyer does not receive the invoice until clearance is confirmed. This is a blocking step — the document is not legally deliverable until ZATCA approves it. iVendNext holds the invoice in a pending state during this process and finalises it automatically once the CLEARED response arrives.


B2C invoices — Simplified Tax Invoices — work differently. The customer receives their receipt at the point of sale, as normal. There is no blocking clearance step. Instead, ZATCA requires the invoice to be reported — submitted to the platform — within 24 hours of issuance. The invoice is valid and the transaction complete before reporting happens; reporting is a post-issuance obligation, not a pre-delivery gate. iVendNext handles this automatically, submitting the invoice to ZATCA immediately upon creation and confirming a REPORTED status without any action from store staff.


The practical distinction matters for operations teams: B2B transactions involve a short wait for clearance before the invoice can be dispatched to the buyer, while B2C transactions proceed without interruption and reporting happens in the background.



Notes
iVendNext determines which path to apply automatically based on the customer type on each invoice.



Cryptographic Invoice Signing

Every invoice submitted to ZATCA must carry a valid digital signature — generated using an Elliptic Curve (EC) private key issued during ZATCA device registration. The signature is embedded directly in the UBL 2.1 XML document.



Notes
It serves two purposes: it proves to ZATCA that the invoice was produced by an authorised device, and it makes the document tamper-evident — any modification after signing invalidates the signature. For finance teams, this means every submitted invoice carries a legally binding digital stamp that cannot be forged or altered.



UBL 2.1 XML and Signed XML Attachment

iVendNext generates each invoice as a UBL 2.1 XML document — the format mandated by ZATCA's technical specifications — including all required fields: seller and buyer details, line items, VAT amounts, totals, timestamps, and the cryptographic signature.



Notes
Once submitted, the signed (or cleared) XML document is automatically attached to the invoice record inside iVendNext. iVendNext protects this attachment from deletion or modification to preserve the integrity of the compliance record. For businesses subject to ZATCA audit, these XML attachments serve as primary evidence of compliance. Finance teams can access the XML directly from the invoice form, and IT teams can retrieve full API response logs from the same record.






TLV QR Code Generation

Every ZATCA-compliant invoice must include a QR code encoding key invoice details in ZATCA's TLV (Tag-Length-Value) format. The QR code contains the seller's name, VAT registration number, invoice timestamp, total amount (including VAT), and VAT amount.



Info
iVendNext generates this QR code automatically for every invoice, attaches it as a PNG, and includes it on the printed customer receipt. The TLV format is specific to ZATCA and differs from standard QR codes — iVendNext generates codes that fully comply with ZATCA's encoding specification, ensuring they pass automated submission verification and manual audit scanning.



PDF/A-3 Invoice Documents

iVendNext renders submitted invoices as PDF/A-3 documents — the archive-grade format recommended by ZATCA for long-term invoice storage. PDF/A-3 supports inline file attachments, meaning the signed XML is embedded within the PDF itself. The result is a single document that is both human-readable as a formatted invoice and machine-readable as a standards-compliant XML record — fully self-contained for compliance and archiving purposes.



Invoice Hash Chaining (PIH)

Each invoice submitted to ZATCA must include a hash of the previous invoice — the Previous Invoice Hash (PIH) — creating a cryptographic chain that makes it impossible to delete, insert, or alter an invoice in the sequence without detection.



Info
iVendNext manages the PIH automatically. After each successful submission, the system updates the PIH stored in the company's ZATCA settings. The next invoice incorporates this updated value automatically. In multi-device environments, each registered POS terminal maintains its own independent hash chain, consistent with ZATCA's architecture for separate EGS devices.



Immutable Submitted Invoices

Once an invoice reaches REPORTED or CLEARED status, iVendNext locks it against editing, cancellation, or re-saving, displaying a clear error message if such an action is attempted. This is iVendNext's enforcement of a ZATCA principle: submitted invoices should not be silently altered after the fact. Where a correction is needed, the appropriate mechanism is a Credit Note or Debit Note issued against the original — both of which iVendNext supports as first-class ZATCA documents with their own signed XML, QR code, and PIH integration.




Summary

iVendNext handles the full e-invoicing compliance lifecycle automatically for every transaction. Cashiers close sales as normal. Behind the scenes, iVendNext generates signed UBL 2.1 XML, produces TLV QR codes, routes invoices through the correct B2B or B2C compliance path, maintains the PIH hash chain, attaches signed XML and PDF/A-3 documents to every record, and locks submitted invoices against modification — creating a continuous, auditable compliance record for every invoice your business issues under ZATCA.




    • Related Articles

    • Tax Reporting and Compliance

      Overview Accurate tax reporting is vital to avoid penalties and stay compliant. iVendNext simplifies this with tools for local and global tax rules, including Sales/Purchase Registers and GSTR-1/GSTR-2 for India. This article explains key features ...
    • Invoice Discounting

      What is Invoice Discounting? Invoice Discounting allows retailers to use unpaid invoices to get quick loans, boosting cash flow for daily operations or growth. In iVendNext, this feature helps retailers manage discounted invoices, track loans, and ...
    • Tax and Compliance

      Overview This article will guide you through the key components of tax and compliance management in iVendNext, including GST and Tax Management, Tax Withholding, Shipping Rules, and Compliance Reporting. 1. Key Components of Tax and Compliance ...
    • Creating a POS Invoice

      Overview This guide walks you through creating, modifying, and finalizing invoices in iVendNext. Prerequisites Before creating an invoice: ✔ POS Profile configured (with payment methods, warehouse) ✔ Items added with selling prices ✔ Customer ...
    • Invoice Booking and Payment Entry

      Overview This article will guide you through how to book invoices and record payment entries in iVendNext. 1. What is Invoice Booking? Invoice Booking is the process of recording invoices from suppliers (for purchases) or customers (for sales). It ...