Skip to main content

Microtec

E-Invoice Reader and Checker

A 5-tag or 9-tag code, or an XML file: see its data and a check of its format and amounts.

This is a format and field check in your browser, not an official verification by the Zakat, Tax and Customs Authority and not a check of the digital signature. No file is uploaded to a server.

The image is read in your browser if it supports code reading, and it is not uploaded.

—

Paste the code text or open an XML file to see the result

    This e-invoice reader decodes the QR code printed on invoices issued in Saudi Arabia, or the XML file a supplier sends, and lays out the invoice data as cards: seller, VAT number, date, total and VAT. It then checks each field: the VAT number format, that the total equals the amount before VAT plus the VAT, that the VAT comes to about 15%, and that the date is valid. It is built for the purchasing accountant who receives a supplier invoice and wants to be sure of its figures before booking it.

    Short answerThe reader shows what is inside the code or the file and catches format and amount errors. Whether the digital signature is valid, and whether the invoice is registered with ZATCA, only the ZATCA app or a compliant e-invoicing solution can tell.

    How reading an e-invoice QR code works

    The QR code on an invoice holds Base64 text. Decoded, it becomes a TLV sequence: for each field, one byte for the tag, one for the length of the value, then the value. Tags 1 to 5 are the seller name, the seller VAT number, the date and time, the total including VAT and the VAT, according to the ZATCA FAQ. From the total and the VAT the reader works out the amount before VAT and the rate:

    Net = Total − VAT  ·  Rate = VAT ÷ Net

    Valid example: a code with a total of SAR 287.50 and VAT of SAR 37.50. The amount before VAT is 250.00, the VAT is exactly 15% of it, and the VAT number 399999999900003 has 15 digits starting and ending with 3. The Valid example button loads it.
    Example with errors: a code with a total of SAR 230.00 and VAT of SAR 20.00, so the amount before VAT is 210.00 and the VAT is 9.52% of it, and the VAT number has only 14 digits. Both problems show in the checks when you press Example with errors.

    Checking a tax invoice: what the reader tests

    CheckIn the QR codeIn an XML file
    Base64 format, TLV structure and field lengthsYesFor the embedded code
    VAT number has 15 digits starting and ending with 3YesYes
    Date is valid and not after todayYesYes
    Total = amount before VAT + VATVAT smaller than totalYes, plus the line total
    VAT is 15% of the amount before itYesYes
    Phase: 5 tags, or 9 with signatureYesSignature present
    Embedded code matches the file's amounts—Yes
    Digital signature and stamp, and registration with ZATCANot checked here

    The standard VAT rate in Saudi Arabia is 15%, but a rate that differs from it does not always mean the invoice is wrong: it may include an exempt or zero-rated line. That is why the result says Review rather than Error.

    Reading an e-invoice from an XML file

    A phase 2 invoice is an XML file in UBL 2.1 format, and the PDF copy the buyer sees is rendered from it. Open the file in the XML file tab or paste its content, and the reader pulls out the invoice number, its unique identifier (UUID), its type from the name attribute of InvoiceTypeCode (01 standard, 02 simplified), the seller name and VAT number, the amounts from LegalMonetaryTotal and TaxTotal, and the invoice lines. It then adds up the line nets and compares them with the totals, and decodes the QR code embedded in the file to match it against the amounts. The element paths follow the ZATCA XML implementation standard.

    E-invoice QR code scanner from an image or a phone

    The Read the code from an image button reads the code from a photo or screenshot if your browser supports code reading, as Chrome on Android and most recent desktop browsers do. If it does not, scan the code with your phone camera or any QR reader, copy the text it shows and paste it into the field. The image never leaves your device either way. The reader does not open PDF files directly, so take a screenshot of the code in the PDF.

    Errors that reading an invoice QR code reveals

    • A VAT number one digit short, or one that does not start and end with 3.
    • The total in the code is before VAT instead of after it, so the VAT rate shows far above 15%.
    • The code holds a web link instead of Base64, so no data can be read from it.
    • The seller name length was counted in characters rather than bytes, so the name appears cut off or the fields run into each other.
    • An XML file whose embedded code no longer matches the file's own amounts after the invoice was edited.

    What to do after the check

    If every check passes, book the invoice in your purchases. If the VAT number or the amounts show Error, send the invoice back to the supplier and ask for a corrected one before you claim its VAT on your return. Download the report as a PDF to file with the invoice or send to the supplier, and you can check the supplier's VAT number with ZATCA's verification service.

    When supplier invoices run into the dozens each month

    Checking an invoice by hand works while there are only a few. Once supplier invoices arrive every day, what matters is that each one is booked once across purchasing, inventory and the accounts, and that its VAT matches your return. At Microtec we offer businesses in the Kingdom an ERP accounting system that brings purchasing, sales, inventory and finance together, and our solutions are approved by the Zakat, Tax and Customs Authority. Book supplier invoices in it as they arrive during the trial.

    Frequently asked questions

    How do I check a tax invoice?

    Paste the QR code text or open the XML file in the reader above to see the invoice data and the results of the VAT number, amount and date checks. This is a format and field check; the official signature check is done in the ZATCA app or a compliant solution.

    Does the reader confirm the invoice is registered with ZATCA?

    No. The reader does not connect to ZATCA and does not verify the digital signature. It catches format and calculation errors only; whether the invoice was reported or cleared is known from the seller's compliant e-invoicing solution.

    How do I read an e-invoice QR code with my phone?

    Scan the code with your phone camera or a QR reader app, copy the long text it shows, and paste it into the Code text field. Or photograph the code and open the photo with Read the code from an image if your browser supports it.

    What is the difference between a phase 1 and a phase 2 QR code?

    A phase 1 code has five tags: seller, VAT number, date, total and VAT. A phase 2 code has nine, adding the invoice hash, the digital signature, the public key and the certificate signature.

    Why does the VAT rate show below 15%?

    Usually because the invoice includes exempt or zero-rated lines, so 15% applies to only part of the amount. It can also mean one of the two amounts is wrong, so go over the invoice with the supplier.

    Is my invoice uploaded to any server?

    No. The text, file and image are read in your browser only. The report is built on your device, and a short form asks for your name and email once, the first time you download.

    ↑