Mon – Sat: 9:00 AM – 7:00 PM IST
GST & Compliance

What is an IRN (Invoice Reference Number)?

The 64-character hash that makes a GST invoice valid — where it comes from and what you can still change afterwards.

In short

An IRN is a 64-character hash returned by the Invoice Registration Portal when a B2B invoice is successfully registered. It is derived from the supplier's GSTIN, the document number, the document type and the financial year, which means the same invoice cannot be registered twice. Alongside it the portal returns a digitally signed QR code that must be printed on the invoice.

Why It Matters

Why this matters in practice

The IRN is what turns a document your system produced into a tax invoice the government recognises. For the issuer it is a compliance obligation; for the recipient it is the basis of input tax credit. The derivation from your own GSTIN and document number is deliberate: it makes duplicate registration impossible and ties the document to your numbering series.

Uniquely identifies a registered invoice across the GST system
Derived from your GSTIN, document number, type and financial year
Accompanied by a digitally signed QR code for verification
Required before the invoice can validly be issued to the customer
How It Works

How it works in practice

Build the payload

The invoice data is assembled in the prescribed JSON schema, including line-level HSN, rates and values.

Submit to the IRP

Directly or via a GSP. The portal validates the structure and the GSTIN details.

Receive the IRN

Along with the acknowledgement number, acknowledgement date and the signed QR code.

Store it against the invoice

The IRN belongs on the invoice record in your ERP, not in a spreadsheet. It will be needed for reconciliation and for any cancellation.

Print the QR code

The signed QR code must appear on the issued document so it can be verified independently.

Worked example

A worked example: a duplicate IRN that was not a duplicate

A business running three dispatch locations starts getting duplicate IRN errors a few weeks after go-live. The invoices are plainly different — different customers, different values, different dates.

The cause is in the numbering. Each location was configured with its own document sequence, and all three sequences were started at 1 under the same GSTIN. The IRN is computed from supplier GSTIN, financial year, document type and document number — so location A's invoice 247 and location B's invoice 247 are, as far as the portal is concerned, the same document submitted twice. The portal is right and the configuration is wrong.

The fix is a numbering scheme that is unique across the whole GSTIN: a location prefix, or non-overlapping ranges per site. It is a five-minute configuration change and a painful one to make three weeks in, because the invoices already issued have to be reconciled and the sequence restarted cleanly. This is the kind of decision that costs nothing before go-live and real time afterwards, which is the argument for walking through numbering before the first submission rather than after the first error.

Key terms

The vocabulary, briefly

Term What it means
Hash A fixed-length value computed from the invoice contents. Change any input and the hash changes, which is what makes it tamper-evident.
Supplier GSTIN One of the inputs to the IRN, along with financial year, document type and document number.
Document type Invoice, credit note or debit note. Part of what makes the IRN unique.
Duplicate IRN The error returned when the same supplier, year, type and number are submitted twice. Usually a numbering problem.
Ack number and date The acknowledgement the portal returns alongside the IRN, recorded as proof of registration.
What Goes Wrong

Common mistakes worth avoiding

Reusing a document number

The IRN derivation includes your document number. Reusing one within the same financial year will be rejected as a duplicate.

Missing the cancellation window

An IRN can be cancelled only within a limited period after generation. After that, the correction has to be made through a credit note.

Storing the IRN outside the ERP

Reconciling registered invoices against issued invoices is impossible if the IRN is not on the invoice record.

Assuming amendment is possible

A registered invoice cannot be edited. Changes are made through credit or debit notes, which are themselves registered.

What to measure

Numbers worth tracking

Metric What it tells you What distorts it
Duplicate IRN errors Almost always a document numbering problem, and usually a structural one. Treating them as transient and retrying, which never resolves the cause.
IRN-to-invoice reconciliation gaps Invoices in your ledger with no IRN, or IRNs with no matching invoice. Reconciling only on count rather than on value and number.
Cancellation rate How often invoices are raised wrongly and withdrawn inside the window. Cancellations replaced by a fresh invoice with no record of the original.
Average registration latency Whether registration is keeping pace with invoicing or queueing up. Measuring only successful calls, which excludes the slow ones that timed out.
FAQ

Questions we are asked about this

Within the window permitted by the portal, and only in full — partial cancellation is not possible. After the window closes, use a credit note instead.
Registration has to succeed before the invoice is validly issued, so an outage delays issuance. This is why automated retry handling inside the ERP matters more than it first appears.
No. The IRN is returned by the Invoice Registration Portal after it validates your submission — that is the entire point of the mechanism. Software that claims to generate one locally is either computing the hash for its own reference or misdescribing what it does. Only the portal's response carries legal standing, and only the signed QR it returns can be printed as proof.
The IRN and the signed QR code returned by the portal, alongside the normal particulars a tax invoice requires. The QR must be the signed one from the portal, not a code your system generates from the invoice data — a locally generated code looks identical to a human and fails any verification scan, which is exactly the situation you do not want discovered at a checkpoint.
Store the IRN, acknowledgement number, acknowledgement date and the signed QR payload against the invoice record itself, and retain them for the same period as your other GST records. Keeping them in the ERP against the document is far more useful than keeping them in a separate log, because the question you will eventually be asked is about a specific invoice, not about a day's submissions.
It feeds it. Where goods movement requires an e-way bill, registered invoice data can be used to generate it without re-entering the details, which removes a whole class of mismatch between the two documents. The practical benefit is that the invoice and the e-way bill cannot disagree about value, parties or HSN, because they came from the same submission.
Related

Where to read next

What is GST e-invoicing?

Read more

What is an e-way bill?

Read more

GST e-invoicing inside iDempiere

Read more

Need this applied to your own systems?

We build and support the systems this page describes. Start with a free working proof of concept — no cost, no commitment.