How-to 7 min read

E-Invoice QR Code: What It Holds and How to Verify It

What the signed QR code on an e-invoice contains, why an ordinary scanner cannot prove it is genuine, and how to verify it with the official app or in code.

Written and reviewed by the GSTIN API team Last reviewed

Every B2B e-invoice carries a QR code returned by the Invoice Registration Portal. It is not decoration: it is a digitally signed summary of the invoice, and anyone holding a copy can check that the invoice was genuinely registered. But the check has to be done properly. Point a phone camera at it and you learn almost nothing. This guide explains what the QR contains, how to verify it with the official tools, how to verify it in code, and the one thing even a valid QR cannot tell you.

What the e-invoice QR code is

When a supplier reports an invoice to the IRP, the portal validates it, generates the IRN, and returns two signed artefacts: the signed invoice and the signed QR code. The QR code is a JSON Web Token: a small JSON payload of key invoice details, signed with the IRP's private key. The supplier must print it on the invoice. The background is in who must e-invoice and e-way bill vs e-invoice.

What the QR code contains

FieldMeaning
SellerGstinSupplier's GSTIN
BuyerGstinRecipient's GSTIN (or URP for unregistered, e.g. exports)
DocNoInvoice or note number
DocTypINV, CRN or DBN
DocDtDocument date
TotInvValTotal invoice value
ItemCntNumber of line items
MainHsnCodeHSN of the highest-value item
IrnInvoice Reference Number
IrnDtDate and time the IRN was generated
Fields in the signed e-invoice QR code payload.

Because the full invoice is not in the QR, verifying it confirms the headline facts — who, to whom, which document, how much — not every line and rate.

Why an ordinary scanner proves nothing

Scan an e-invoice QR with a phone camera and you get a long string of characters in three dot-separated parts. That is the token. A forger can produce a QR code containing a token that looks identical in form. What they cannot produce is a token whose signature checks out against the IRP's public key, because they do not have the private key. Verification means checking that signature. Reading the text is not verification.

Verifying with the official app

NIC publishes a mobile app for verifying e-invoice QR codes. It holds the IRP's public keys, scans the QR, checks the signature, and shows the decoded details with a clear valid or invalid result. Compare the details it shows — especially the GSTINs, the document number and the value — with the printed invoice. A valid signature over different details means the printed invoice has been altered.

Verifying on the e-invoice portal

The e-invoice portal also offers verification of a signed invoice: upload the signed JSON you received from the supplier, and it confirms whether it was issued by the IRP. This suits accounts teams who receive e-invoice JSON rather than printed copies. Access is described in e-invoice portal login.

Reading and verifying the QR in code

For accounts payable automation, the QR can be decoded and checked when the invoice is scanned in. Reading the payload needs nothing more than base64:

import base64, json

def read_einvoice_qr(token: str) -> dict:
    header, payload, signature = token.split('.')
    payload += '=' * (-len(payload) % 4)          # restore base64 padding
    claims = json.loads(base64.urlsafe_b64decode(payload))
    return json.loads(claims['data'])              # the invoice fields are a JSON string

fields = read_einvoice_qr(scanned_text)
print(fields['SellerGstin'], fields['DocNo'], fields['TotInvVal'], fields['Irn'])

That reads the fields; it does not verify them. To verify, check the token's RSA signature against the IRP's public signing key with any standard JWT library, rejecting the token if the check fails. Obtain the key from the IRP's official documentation, and note that each IRP signs with its own key, so a system that accepts invoices from suppliers using different IRPs needs each one. If you already call the e-invoice API, the developer portal guide covers where the keys and documentation live.

What a valid QR does not prove

A valid signature proves the invoice was registered on the IRP on the IRN date. It says nothing about what happened afterwards:

  • the IRN may have been cancelled within 24 hours — check its status. See cancelling an e-invoice;
  • the supplier's registration may since have been suspended or cancelled;
  • the supplier may not have filed its returns or paid the tax, which is what your credit ultimately depends on.

So the QR check belongs alongside two others: the supplier's GSTIN status, and its filing record. Both are covered in vendor GST verification in accounts payable.

B2C invoices: a different QR

Consumer invoices are not e-invoices and have no IRN. Businesses above a much higher turnover limit must instead print a dynamic QR code on B2C invoices, which carries payment details such as the UPI ID and amount so the customer can pay by scanning. It is a payment convenience, not a signed proof of registration, and cannot be verified the same way. If a consumer bill makes you doubt the GST on it, see is the GST on my bill real?.

Frequently asked questions

Scan it with the e-invoice QR code verification app published by NIC, or use the verification option on the e-invoice portal. Both check the digital signature on the QR code against the Invoice Registration Portal's public key and show the invoice details it carries. A match means the invoice was registered on the IRP and the QR code has not been altered.
The supplier's GSTIN, the recipient's GSTIN, the document number, type and date, the total invoice value, the number of line items, the HSN code of the main item, the IRN and the IRN generation date. It does not contain every line of the invoice.
You can read it, but that proves nothing. A generic scanner shows the raw signed token as text, and anyone can generate a QR code containing text that looks similar. Only verifying the signature, with the official app, the portal or in code, shows that the IRP issued it.
Yes. A business within e-invoicing must print the QR code returned by the IRP on the invoice. An invoice from such a business without a valid IRN and QR code is not a valid tax invoice, and the buyer's input tax credit on it is at risk.
Usually because the QR on the printed invoice is not the signed one returned by the IRP — some software prints its own QR with invoice details — or because the image is too low-resolution to scan fully. Ask the supplier for the signed QR code or the IRN, and check the IRN's status. If it still fails, treat the invoice as unregistered until the supplier shows otherwise.

A note on accuracy. GST rules change often. This article reflects our understanding as of 30 September 2026 and is general information, not tax or legal advice. For the authoritative position, check gst.gov.in and cbic-gst.gov.in, or speak to a qualified tax professional about your specific situation.

Check a GSTIN right now, free

Five lookups a day, no account required. Status, filing history, e-invoicing and jurisdiction.

Free GST search tool

Build it into your product

One REST call, JSON back. Get an API key and 20 free verification credits in under a minute.

Start free