Meta Pixel
LIMITED OFFERSave upto 65% today on SuperBiller Pro EditionExplore Now
Back to All Articles
Software & Guides 5 November 2026• 9 min read

Invoice Reference Number (IRN): Structure, 64-Hex Code & QR Rules

Comprehensive guide to Invoice Reference Number (IRN) in GST e-invoicing. Learn the SHA-256 generation algorithm, 64-character hash formula, and IRP rules.

S
SuperBiller Editorial Team
Verified GST & SaaS Guide
Cryptographic hash code and Invoice Reference Number IRN visualization for GST e-invoicing
Cryptographic hash code and Invoice Reference Number IRN visualization for GST e-invoicing
Quick Takeaway (BLUF)

Comprehensive guide to Invoice Reference Number (IRN) in GST e-invoicing. Learn the SHA-256 generation algorithm, 64-character hash formula, and IRP rules.

Under India's Goods and Services Tax (GST) e-invoicing mandate, the traditional concept of an invoice number has undergone a fundamental technological transformation. While every business still prints a human-readable invoice serial number (e.g., INV/2026-27/0101), the GST system identifies, tracks, and validates each transaction using a cryptographically unique identifier known as the Invoice Reference Number (IRN).

Without a government-validated IRN and its corresponding digitally signed QR code, a B2B invoice issued by a business covered under the e-invoicing turnover threshold is legally invalid under Rule 48(4) and Rule 48(5) of the CGST Rules. The buyer cannot claim Input Tax Credit (ITC), and transport vehicles moving the consignment face detention and penalties under Section 129.

In this technical and compliance guide, we break down the mathematical anatomy of the 64-character IRN, the SHA-256 concatenation formula, how Invoice Registration Portals (IRP) validate transactions, and how to verify B2B invoices using SuperBiller.


What is an Invoice Reference Number (IRN)? (Direct Answer)

Quick Answer (AEO): The Invoice Reference Number (IRN) is a unique 64-character hexadecimal string generated by the government's Invoice Registration Portal (IRP) using the SHA-256 cryptographic hashing algorithm. It is computed by concatenating four data points: Supplier GSTIN, Financial Year (YYYY-YY), Document Type (INV/CRN/DBN), and Document Number. An IRN uniquely identifies a B2B invoice on the national GST system and is digitally embedded within a signed QR code printed on the invoice.

┌────────────────────────────────────────────────────────────────────────┐
│                   IRN MATHEMATICAL GENERATION FORMULA                  │
├────────────────────────────────────────────────────────────────────────┤
│  Input String = [Supplier GSTIN] + [Financial Year] +                  │
│                 [Document Type]  + [Document Number]                   │
│                                                                        │
│  Example:                                                              │
│  "29AAFCC9980M1ZR" + "2026-27" + "INV" + "SB-26-001"                  │
│       │                                                                │
│       ▼                                                                │
│  Raw Concatenation: "29AAFCC9980M1ZR2026-27INVSB-26-001"              │
│       │                                                                │
│       ▼ Processed through SHA-256 Hashing Algorithm                    │
│  Output: 64-Character Hex String (e.g. 4b84a9e27...c58df1)             │
└────────────────────────────────────────────────────────────────────────┘

4 Core Components of the IRN Hash String

The raw input string fed into the SHA-256 algorithm must follow an unbending structural order without spaces, delimiters, or punctuation between the fields:

1. Supplier GSTIN (15 Characters)

The 15-digit Goods and Services Tax Identification Number of the entity issuing the document (e.g., 27AAPFU0939F1ZV).

2. Financial Year (Formatted as YYYY-YY)

The Indian financial year in which the document was issued, strictly formatted with the 4-digit start year and 2-digit end year (e.g., 2026-27 or 2025-26).

3. Document Type Code (3 Characters)

The statutory document classification recognized by the GST schema:

  • INV — Tax Invoice
  • CRN — Credit Note
  • DBN — Debit Note

4. Document Number (Up to 16 Characters)

The supplier's internal serial number for the bill (e.g., SB/001 or INV-1092).

Why SHA-256 Produces Exactly 64 Hexadecimal Characters

The Secure Hash Algorithm (SHA-256) outputs a 256-bit binary digest. In hexadecimal representation, each 4 bits correspond to 1 hexadecimal character ($256 \div 4 = 64$). Thus, regardless of whether your invoice number is 3 characters or 16 characters long, the resulting IRN is always exactly 64 hexadecimal characters (using characters 0–9 and a–f).


Step-by-Step: The e-Invoice Validation & IRN Lifecycle

[Step 1] ERP / Billing Tool generates standard JSON payload (INV-01 schema)
   │
   ▼
[Step 2] JSON uploaded to Government IRP (einvoice1.gst.gov.in or GSP API)
   │
   ▼
[Step 3] IRP validates schema, checks deduplication registry against 64-hex hash
   │
   ▼
[Step 4] IRP generates IRN, appends Digital Signature & creates Signed B2B QR Code
   │
   ▼
[Step 5] Payload returns to Billing Software ──► Prints invoice with QR code
   │
   ▼
[Step 6] Auto-Sync: IRP pushes invoice data to GSTR-1 and E-Way Bill System
  1. Deduplication Check: The IRP compares the newly generated hash against its central database. If the same supplier GSTIN issues the same invoice number in the same financial year, the IRP instantly rejects the submission with error code 2150: Duplicate IRN.
  2. Digital Signing: The IRP signs the payload with the government's private cryptographic key, guaranteeing that no party can alter the invoice amount or tax split after issuance.
  3. Automated Return Pre-population: The invoice data is mirrored automatically to the supplier's GSTR-1 (Table 4A/4B) and the buyer's GSTR-2B, eliminating manual data entry at month-end.

IRN vs Signed QR Code: What Must Appear on the Printed Invoice?

Under CBIC circulars and Rule 48(4):

  • Is the 64-character IRN required to be printed as text? Printing the 64-character alphanumeric string in plaintext is optional, though highly recommended for CA audits.
  • Is the Signed QR Code mandatory? Yes. Printing the digitally signed B2B QR code on the invoice copy handed to the recipient or transporter is 100% legally compulsory. A tax invoice without the QR code is treated by law as an unissued invoice under Rule 48(5).

Rules for Amending and Cancelling an IRN

Unlike standard invoices in accounting software, an IRN-registered e-invoice has strict cancellation boundaries:

Action / EventOfficial GST Regulation WindowProcedure / Workaround
IRN Cancellation on IRPWithin 24 Hours Only1-Click cancellation on IRP (Reason: Data entry error or duplicate).
After 24 Hours WindowIRP portal locks transactionCannot cancel on IRP. Must issue a Credit Note (CRN) with its own IRN.
Partial Modification of IRNStrictly ProhibitedYou cannot edit line items or amounts. You must cancel and re-issue or issue a debit/credit note.
Re-using the Same Invoice NumberPermanently BlockedIf invoice INV-01 is cancelled on the IRP, you cannot re-use INV-01 in the same financial year.

Free SuperBiller Productivity Suite for Indian MSMEs

SuperBiller provides a comprehensive ecosystem of free digital tools to keep your business running smoothly:



Related In-Depth Guides & Recommended Reading

Expand your tax compliance and store management knowledge with these related guides from our topic cluster:

Frequently Asked Questions (FAQs)

What is the full form of IRN in GST?

IRN stands for Invoice Reference Number. It is a 64-character cryptographic hash assigned to each validated B2B invoice, credit note, and debit note by the government's Invoice Registration Portal (IRP).

Does a taxpayer compute the 64-character IRN manually?

No. While the mathematical formula is based on SHA-256, taxpayers cannot generate the official legal IRN independently. The invoice JSON payload must be submitted to an authorized IRP (e.g., NIC, Clear, Cygnet), which validates the data and issues the digitally signed IRN and QR code.

What happens if a supplier required to generate an IRN fails to do so?

Under Rule 48(5) of the CGST Rules, any invoice issued without an IRN by a mandated taxpayer is legally deemed null and void. The buyer will be denied Input Tax Credit (ITC), the supplier faces penalties of up to ₹10,000 per invoice under Section 122, and goods in transit can be seized under Section 129.

Can an IRN be generated for B2C invoices?

No. Under current CBIC regulations, the e-invoicing system and IRN generation apply exclusively to B2B supplies, supplies to SEZ developers/units, and export transactions. B2C retail invoices do not generate an IRN (though entities with turnover over ₹500 Crore must print a dynamic self-generated B2C UPI QR code).


Regulatory References & Official Software Standards

For business accounting mandates, digital security standards, and statutory audit compliance, refer to the following official resources:

Tags:#IRN GST#Invoice Reference Number#SHA-256 Hash#e-Invoice QR Code#GST Compliance
Editorial Integrity & Statutory ComplianceCBIC & GST Council Validated

This guide is authored by the SuperBiller Tax & Retail Operations Desk and fact-checked against official Central Board of Indirect Taxes and Customs (CBIC) circulars, the CGST Act 2017 (Rule 46 & Section 31), and latest GST Council threshold updates. SuperBiller provides MSMEs with compliant billing technology, 80mm thermal printing, and automated tax workflows.

Related Free Indian MSME Tools100% Free
SuperBiller ERP Software

Ready to automate your GST Billing & 80mm POS?

Generate your first tax invoice in under 30 seconds. 100% offline-ready.

Get Started Free