GST & Tax12 min read

Understanding e-Invoicing in India: IRN, QR Codes, and NIC Integration

ThynkBooks Editorial|

India's e-invoicing mandate has transformed how businesses generate and share tax invoices. Understanding the system's mechanics - from Invoice Reference Numbers to QR code requirements - is essential for every GST-registered business above the applicability threshold.

What is e-Invoicing?

E-invoicing in India does not mean sending invoices electronically. It refers to a system where B2B invoices are reported to the Invoice Registration Portal (IRP) managed by the National Informatics Centre (NIC). The IRP validates the invoice schema, generates a unique Invoice Reference Number (IRN), digitally signs the invoice, and returns a QR code.

The key distinction: you still generate invoices in your accounting system. E-invoicing adds a validation and registration layer that ensures every invoice is standardized and reported to the GST network.

The IRN Generation Process

When you create a B2B invoice, your accounting system generates the invoice JSON in the prescribed schema. This JSON is transmitted to the NIC IRP via API. The portal validates the data - checking GSTIN validity, HSN codes, tax computations, and schema compliance.

If validation succeeds, the IRP generates a unique IRN (a hash of supplier GSTIN, document type, document number, and financial year), digitally signs the invoice, generates a QR code containing key invoice details, and returns the signed JSON with IRN and QR code to your system.

The entire process takes under two seconds when integrated properly. ThynkBooks handles this automatically - when you save an invoice, the system generates and registers it with NIC in the background, embedding the IRN and QR code on the printed invoice.

QR Code Requirements

The QR code embedded on e-invoices must contain specific data points: supplier GSTIN, receiver GSTIN, invoice number, date of generation, invoice value, number of line items, HSN code of the main item, and the unique IRN.

For businesses issuing invoices to consumers (B2C), a dynamic QR code is required on invoices above the threshold. This QR code allows the consumer to verify the invoice against the GST portal.

Integration Approaches

There are three ways to integrate with the NIC portal. Direct API integration requires your software to manage authentication tokens, handle rate limits, and process responses. This is suitable for large businesses with dedicated IT teams.

GSP (GST Supabase Provider) integration routes your invoices through a registered intermediary that handles the NIC communication. This adds a layer of reliability and support.

ERP-embedded integration - the approach used by modern accounting platforms - handles everything within the software. You create an invoice, the system does the rest. No separate portal login, no manual JSON generation, no copy-pasting of IRN numbers.

Common Issues and Resolutions

The most frequent e-invoicing errors include schema validation failures (usually due to incorrect HSN codes or missing mandatory fields), duplicate IRN errors (when the same invoice is submitted twice), and GSTIN validation failures (when a customer's GSTIN has been cancelled or suspended).

Build validation into your invoice creation workflow. Check HSN codes against the master, validate GSTINs before invoice generation, and implement idempotency to prevent duplicate submissions.

Compliance Timeline

The e-invoicing threshold has been progressively lowered. As of 2026, businesses with aggregate turnover above 5 crore must comply. The expectation is that this threshold will continue to decrease, eventually covering all GST-registered businesses.

Preparing your systems now - regardless of your current turnover - ensures a smooth transition when the mandate reaches your business.

The IRN Lifecycle, End to End

An Invoice Reference Number is a 64-character hash computed from your GSTIN, the document type and number, and the financial year — which is why the same invoice can never register twice. The lifecycle has five stops: you generate the invoice in your accounting system; the system pushes the INV-01 schema payload to the Invoice Registration Portal; the IRP validates (GSTIN status, duplicate check, schema rules) and returns the IRN, a signed QR payload and the digitally signed invoice JSON; your system embeds the QR and IRN on the PDF the customer receives; and the IRP forwards the data to the GST system (auto-populating your GSTR-1) and, where applicable, the e-way bill system. The legal document is the registered one — a beautiful PDF without an IRN is, for a covered business, just paper.

The 30-Day Reporting Window

Since November 2023, taxpayers above the notified threshold must report invoices to the IRP within 30 days of the invoice date — the portal hard-rejects older documents. This converts e-invoicing from a "same week" discipline to a hard systems requirement: any invoice that fails IRN generation must surface in an exception queue the same day, because a document that quietly ages past 30 days cannot be registered at all, and issuing a fresh invoice in its place creates the GSTR-1 vs books mismatch your auditor will find.

Cancellation, Credit Notes and Amendments

An IRN can be cancelled within **24 hours** of generation, provided no active e-way bill rides on it. After 24 hours, the registered invoice is permanent — corrections happen through credit or debit notes, which themselves require IRNs when issued by a covered business. There is no concept of "editing" a registered invoice. Practically: build your order-to-invoice flow so invoices are issued when commercially final, and treat the 24-hour window as an emergency hatch, not a workflow step.

B2C, Exports and the QR Code Confusion

E-invoicing applies to B2B supplies, exports and credit/debit notes — not to B2C invoices. Separately (and frequently confused with it), businesses above ₹500 crore must print a dynamic UPI QR code on B2C invoices to enable digital payment. Two different mandates, two different QR codes. Exports are covered by e-invoicing with their own document type and, where LUT applies, zero-rated treatment — the IRN requirement still stands.

Failure Modes Worth Engineering For

Real-world IRP rejections cluster predictably: recipient GSTIN cancelled or suspended (validate at order entry, not invoice time); duplicate document number (never reuse numbers across cancelled drafts); schema violations from free-text creeping into structured fields; HSN codes below the mandated digit count for your turnover; and IRP downtime, which the rules accommodate but your retry queue must actually handle — generate, fail, retry with backoff, alert after N failures, never silently drop. The audit-grade property is simple to state: every B2B invoice in your books either has an IRN or sits in a visible exception queue with an owner.

GSTR-1 Auto-Population Is a Reconciliation, Not a Guarantee

Registered invoices flow into GSTR-1 automatically, but cancellations within the window, credit notes, and any manual additions mean the auto-populated return still needs a books-vs-return diff before filing. The win is that the diff should be empty: when it isn't, you have a same-month signal of a process break — an invoice raised outside the system, a cancellation not mirrored in books — instead of a year-end forensic exercise.

Related Articles

Automate your accounting with ThynkBooks

AI-powered bookkeeping, GST compliance, bank reconciliation, and multi-entity consolidation - all in one platform.

Start Free Trial