GST e-Invoice QR Code Mechanics: B2B IRN Verification & NIC Portal Guide

An engineering breakdown of India's GST e-invoicing system. Understand 64-character SHA-256 IRN hashing, digitally signed JWT QR codes, National Informatics Centre (NIC) APIs, and offline cryptographic verification.

TAX INVOICE • GST COMPLIANT e-INVOICED INVOICE REFERENCE NUMBER (IRN): 3a8f9c1e7d2b5046a18d99c30... (64-Character SHA-256 Hash) SELLER GSTIN: 27AABCT3819A1Z5 BUYER GSTIN: 07AAACG9218F1Z2 INV NO: INV/2026/0491 | DATE: 18/10/2026 TOTAL: ₹ 4,89,200.00 HSN: 8471 | ITEMS: 12 NIC SIGNED E-WAY BILL NO: 2810-4821-9920 VEHICLE NO: MH-04-AB-1234 | VALID TILL: 20/10/2026 ✓ ITC CLAIMS AUTHORIZED • SECTION 16 COMPLIANT 64-Character SHA-256 IRN Hash Generated from Supplier GSTIN + Doc No + FY + Doc Type. Deterministic, unforgeable, and globally unique in India. Digitally Signed JWT QR Code Issued exclusively by government IRP (NIC / Clear / TaxPro). Asymmetric RSA signature allows 100% offline officer verification. Rule 48(4) Input Tax Credit (ITC) Lock Invoices missing signed QR codes are legally null & void. Buyer cannot claim ITC; goods face transit detention under Sec 129.

Article Table of Contents

1. The GST e-Invoicing Legal Mandate: Turnover Thresholds

Under Rule 48(4) of the Central Goods and Services Tax (CGST) Rules, 2017, the Government of India made electronic invoicing (e-invoicing) mandatory for all registered businesses exceeding specific aggregate annual turnover thresholds. Beginning initially with enterprises over ₹500 Crore, the mandate has progressively expanded to include all taxpayers with turnover exceeding ₹5 Crore.

The primary statutory objective is eradicating the fake invoice menace, automating Input Tax Credit (ITC) reconciliation in GSTR-2B, and integrating highway transit tracking with the national E-Way Bill system.

2. 64-Character IRN Architecture: SHA-256 Hashing Mechanics

The core digital anchor of an e-invoice is the Invoice Reference Number (IRN). Rather than an arbitrary serial number, the IRN is a deterministic 64-character hexadecimal string generated using the Secure Hash Algorithm 256 (SHA-256).

The hash is calculated by concatenating four key business parameters with colon separators:

IRN = SHA256(Supplier_GSTIN + Financial_Year + Document_Type + Document_Number)

For example, if Supplier GSTIN is 27AABCT3819A1Z5, FY is 2026-27, Doc Type is INV, and Doc Number is INV/0491:

  • Concatenated String: 27AABCT3819A1Z5:2026-27:INV:INV/0491
  • Resulting SHA-256 Hash: 3a8f9c1e7d2b5046a18d99c30f4e2a10b88c4d29e31a7c5b6e0f2d4a8b1c9e3f

Because SHA-256 is mathematically irreversible and collision-resistant, a seller cannot generate duplicate invoices or alter invoice numbers without changing the resulting IRN.

Invoice Registration Portal (IRP) Real-Time Generation & Auto-Populate Pipeline 1. Seller ERP / Billing SAP / Tally / Zoho Generates JSON Schema Standard INV-01 format Calculates SHA-256 IRN JSON POST TO IRP 2. IRP Engine (NIC) Validates JSON & IRN Checks de-duplication Signs payload with NIC Private RSA Key ISSUES SIGNED QR 3. Automated Sync GSTR-1 & GSTR-2B Auto-population E-Way Bill generated Auto Part-A creation SYNCED TO PORTAL 4. Final Verification MOBILE OFFLINE SCAN Verifies digital NIC signature ✓ VALID INVOICE
Figure 51.2: End-to-end IRP e-invoicing architecture. The seller ERP posts standardized JSON to the IRP, which returns the digitally signed QR code and synchronizes tax data across GSTR-1, GSTR-2B, and E-Way Bill systems.

3. Anatomy of the B2B Dynamic QR Code: Signed JWT Payload

The QR code printed on the final PDF invoice is not a simple website URL; it is a compact, high-density JSON Web Token (JWT) digitally signed by the IRP using asymmetric cryptography (RSA 2048-bit private key). The payload encapsulates:

  • sellerGstin: Supplier's 15-character GSTIN.
  • buyerGstin: Buyer's 15-character GSTIN.
  • docNo: Supplier invoice number.
  • docTyp: Document code (INV, CRN, DBN).
  • docDt: Date of invoice generation (DD/MM/YYYY).
  • totInvVal: Total invoice monetary value inclusive of GST.
  • itemCnt: Total count of distinct line items.
  • mainHsnCode: 4 to 8 digit HSN code of highest value item.
  • irn: 64-character SHA-256 hash.

4. The IRP Generation Pipeline: NIC Portal & GSP Webhooks

Enterprise ERPs (SAP S/4HANA, Oracle ERP Cloud, Microsoft Dynamics, Tally Prime) integrate with the Invoice Registration Portal via authorized GST Suvidha Providers (GSPs):

  1. JSON Payload Assembly: The billing system formats line items into the standard einv-schema-v1.03 JSON format.
  2. Authentication: Client requests a short-lived Bearer Auth Token using encrypted client credentials.
  3. Payload Transmission: The JSON is submitted via HTTPS REST API to endpoints operated by NIC (einvoice1.gst.gov.in).
  4. IRP Signing: The IRP computes the IRN, writes it to the central database, appends its digital cryptographic signature, and returns the signed JWT QR string in under 300 milliseconds.
  5. PDF Rendering: The billing engine generates the printable 2D QR code (minimum 25 mm x 25 mm) on the physical and PDF invoice.
Highway Checkpost Inspection: Offline Cryptographic Public Key Audit HIGHWAY MOBILE CHECKPOINT (OFFLINE) • Commercial truck intercepted on highway • Driver presents printed paper invoice • Tax Officer opens official GST QR App • Zero cellular network available (Remote highway) Smartphone Camera Scans 2D QR CRYPTOGRAPHIC SIGNATURE AUDIT ✓ Local NIC Public Key decodes RSA signature ✓ Verifies Seller GSTIN & Buyer GSTIN matches truck ✓ Verifies Invoice Value = ₹ 4,89,200 (No tampering) ✓ Digital seal intact: Invoice 100% genuine IMMEDIATE CLEARANCE GRANTED
Figure 51.3: Mobile inspection verification. GST officers use the local NIC public key stored within the verification app to mathematically prove the invoice's authenticity offline.

5. Mobile Field Verification: Cryptographic Public Key Audit

A key engineering achievement of India's GST e-invoicing architecture is Offline Asymmetric Verification:

  • Embedded Public Key: The official GST e-Invoice verification mobile app (available to tax officers and businesses) embeds the NIC's public RSA certificate.
  • Zero Latency: When the camera sweeps the QR code, the app decodes the base-64 JWT payload, runs the public key over the encrypted signature block, and compares the reconstructed hash with the payload parameters.
  • Tamper Proof: If a dishonest driver has edited the physical paper invoice (e.g., altered ₹4,89,200 to ₹48,920 to evade taxes), the mathematical hash immediately mismatches, triggering a bright red "INVALID OR TAMPERED INVOICE" warning on the officer's device.

6. Input Tax Credit (ITC) Ineligibility & Transit Detention Penalties

Failure to generate an approved IRP e-invoice carries severe commercial consequences:

  • Invalid Document Status: Under Rule 48(5), an invoice issued without an IRN by a mandated taxpayer is not considered an invoice under law.
  • Total Buyer ITC Loss: The recipient business cannot claim Input Tax Credit on the purchase under Section 16(2) of the CGST Act, leading to immediate commercial disputes.
  • Highway Consignment Seizure: Under Section 129, goods in transit accompanied by non-e-invoiced bills are subject to detention, with release conditional on paying a 200% penalty of the tax payable.

7. Frequently Asked Questions

What is an IRN in the Indian GST e-invoicing system?

An IRN (Invoice Reference Number) is a 64-character hexadecimal string generated using the SHA-256 cryptographic hashing algorithm. It is computed from four concatenated parameters: Supplier GSTIN, Document Type (INV/CRN/DBN), Document Number, and Financial Year. The IRN uniquely identifies every B2B tax invoice across India.

What data is encoded inside the mandatory GST B2B e-invoice QR code?

The GST e-invoice QR code encodes a digitally signed JSON Web Token (JWT) issued by the Invoice Registration Portal (IRP). The payload contains: (1) Supplier GSTIN, (2) Buyer GSTIN, (3) Invoice Number, (4) Invoice Date, (5) Total Invoice Value, (6) Number of Line Items, (7) Primary HSN Code, (8) 64-character IRN, and (9) the IRP digital signature.

Can an e-invoice QR code be verified offline without an active internet connection?

Yes. The official GST e-Invoice QR code verification mobile application stores the public cryptographic key of the National Informatics Centre (NIC). When a tax officer or business scans the QR code, the app mathematically validates the digital signature using the local public key, confirming the invoice was genuine and unmodified without needing internet access.

What happens if a B2B tax invoice is issued without a valid IRP QR code?

Under GST Rule 48(4), any B2B invoice issued by a taxpayer subject to e-invoicing that lacks an IRN and IRP-signed QR code is legally deemed invalid. The buyer is legally barred from claiming Input Tax Credit (ITC), the supplier faces penalties up to ₹10,000 or 100% of tax evaded, and goods in transit are liable to detention under Section 129.