WFYI logo

The Complete Guide to Generating and Processing E-invoices and IRNs

This article provides a comprehensive guide to generating and processing e-invoices and their unique Invoice Reference Numbers (IRNs) under GST in India. It outlines the crucial steps, from initial invoice creation in an ERP system to IRN generation via offline tools or API, and the subsequent generation of QR codes. The piece also details the backend processing of valid e-invoices, explaining how they impact GST returns and e-way bills, along with recent regulatory updates.

📖 10 min read read🏷️ E-invoicing

E-invoicing has become a significant area of inquiry for many taxpayers. An electronic invoice, applicable to B2B, B2G, and export transactions, involves reporting invoices to the e-invoice portal (GSTN) by specific GST-registered businesses, adhering to a standard format issued by the CBIC. This article details the procedure for generating an Invoice Reference Number (IRN) for e-invoices and outlines its overall workflow.Latest Updates on E-invoicing* April 4, 2025: Effective June 1, 2025, Invoice Registration Portals (IRPs) will treat invoice numbers as case-insensitive for IRN generation. All invoice numbers will be converted to uppercase to prevent duplication and ensure consistency, as per an advisory.* May 10, 2023: The CBIC announced the sixth phase of e-invoicing implementation. Businesses with an annual turnover exceeding Rs 5 crore in any financial year from 2017-18 must issue e-invoices starting August 1, 2023.* May 6, 2023: The GST department has postponed the 7-day time limit for reporting older e-invoices on IRP portals by three months, with a new implementation date yet to be announced.* April 13, 2023: GSTN advised on April 12th and 13th, 2023, that taxpayers with an annual turnover of Rs. 100 crore or more must report tax invoices and credit/debit notes to the IRP within seven days of their issue date, effective May 1, 2023.* January 30, 2023: The NIC's e-invoice portal received several updates:* Users can now select '96-Other Country' as the POS state code for items with HSN codes 9965 and 9968 (services related to goods transportation, including mail or courier).* Only documents dated October 1, 2021, or later will be processed on the portal.* A new error code, 2295, has been introduced for duplicate requests, supplementing code 2150, indicating that an IRN is already generated and registered.

Steps to Generate an E-invoice

The following outlines the e-invoice generation process for applicable businesses.

Step 1: Creating the Invoice in the Taxpayer's ERP System

Businesses should continue to generate invoices in their regular course of business. However, electronic reporting of these invoices requires adherence to the e-invoice schema, including all mandatory parameters. This initial step is fundamental for e-invoice generation. The essential fields required for an invoice concerning the supply of goods are listed below:

Sl. no.Name of the fieldList of Choices/ Specifications/Sample InputsRemarks
1Document Type CodeEnumerated List such as INV/CRN/DBNType of document must be specified
2Supplier_Legal NameString Max length: 100Legal name of the supplier must be as per the PAN card
3Supplier_GSTINMax length: 15 Must be alphanumericGSTIN of the supplier raising the e-invoice
4Supplier_AddressMax length: 100Building/Flat no., Road/Street, Locality, etc. of the supplier raising the e-invoice
5Supplier_PlaceMax length: 50Supplier’s location such as city/town/village must be mentioned
6Supplier_State_CodeEnumerated list of statesThe state must be selected from the latest list given by GSTN
7Supplier PincodeSix digit codeThe place (locality/district/state) of the supplier’s locality
8Document NumberMax length: 16 Sample can be “ Sa/1/2019”For unique identification of the invoice, a sequential number is required within the business context, time-frame, operating systems and records of the supplier. No identification scheme is to be used
9Preceeding_Invoice_Reference and dateMax length:16 Sample input is “ Sa/1/2019” and “16/11/2020”Detail of original invoice which is being amended by a subsequent document such as a debit and credit note. It is required to keep future expansion of e-versions of credit notes, debit notes and other documents required under GST
10Document DateString (DD/MM/YYYY) as per the technical field specificationThe date when the invoice was issued. However, the format under explanatory notes refers to ‘YYYY-MM-DD’. Further clarity will be required. Document period start and end date must also be specified if selected.
11Recipient_ Legal NameMax length: 100The name of the buyer as per the PAN
12Recipient’s GSTINMax length: 15The GSTIN of the buyer to be declared here
13Recipient’s AddressMax length: 100Building/Flat no., Road/Street, Locality, etc. of the supplier raising the e-invoice
14Recipient’s State CodeEnumerated listThe place of supply state code to be selected here
15Place_Of_Supply_State_ CodeEnumerated list of statesThe state must be selected from the latest list given by GSTN
16PincodeSix digit codeThe place (locality/district/state) of the buyer on whom the invoice is raised/ billed to must be declared here if any
17Recipient PlaceMax length: 100Recipient’s location (City/Town/Village)
18IRN- Invoice Reference NumberMax length: 64 Sample is ‘a5c12dca8 0e7433217…ba4013 750f2046f229’At the time of registration request, this field is left empty by the supplier. Later on, a unique number will be generated by GSTN after uploading of the e-invoice on the GSTN portal. An acknowledgement will be sent back to the supplier after the successful acceptance of the e-invoice by the portal. IRN should then be displayed on e-invoice before use.
19ShippingTo_GSTINMax length: 15GSTIN of the buyer himself or the person to whom the particular item is being delivered to
20Shipping To_State, Pincode and State codeMax length: 100 for state, 6 digit pincode and enumerated list for codeState pertaining to the place to which the goods and services invoiced were or are delivered
21Dispatch From_ Name, Address, Place and PincodeMax length: 100 each and 6 digit for pincodeEntity’s details (name, and city/town/village) from where goods are dispatched
22Is_ServiceString (Length: 1) by selecting Y/NWhether or not supply of service must be mentioned
23Supply Type CodeEnumerated list of codes Sample values can be either of B2B/B2C/ SEZWP/S EZWOP/E XP WP/EXP WOP/DE XPCode will be used to identify type of supply such as business to business, business to consumer, supply to SEZ/Exports with or without payment, and deemed export.
24Item DescriptionMax length: 300 The sample value is ‘Mobile’ The schema document refers to this as the ‘identification scheme identifier of the Item classification identifier’Simply put, the relevant description generally used for the item in the trade. However, more clarity is needed on how it needs to be described for every two or more items belonging to the same HSN code
25HSN CodeMax length: 8The applicable HSN code for particular goods/service must be entered
26Item_PriceDecimal (12,3) Sample value is ‘50’The unit price, exclusive of GST, before subtracting item price discount, can not be negative
27Assessable ValueDecimal (13,2) Sample value is ‘5000’The price of an item, exclusive of GST, after subtracting item price discount. Hence, Gross price (-) Discount = Net price item, if any cash discount is provided at the time of sale
28GST RateDecimal (3,2) Sample value is ‘5’The GST rate represented as a percentage that is applicable to the item being invoiced
29IGST Value, CGST Value and SGST Value SeparatelyDecimal (11,2) Sample value is ‘650.00’For each individual item, IGST, CGST and SGST amounts have to be specified
30Total Invoice ValueDecimal (11,2)The total amount of the Invoice with GST. Must be rounded to a maximum of 2 decimals

The seller must ensure their accounting or billing software can generate a JSON file of the final invoice. This JSON file should comply with the e-invoice schema and mandatory parameters. Sellers can achieve this using various methods:

  • An accounting and billing system that offers this capability.
  • A utility that interacts with the accounting/billing system or ERP, such as an Excel or Word document, or a mobile application.
  • An offline tool for generating e-invoices by manually entering invoice data.

Step 2: Generating the Unique IRN

The subsequent step in e-invoice generation involves reporting to the Invoice Registration Portal (IRP). The IRN, also referred to as a hash, is a unique 64-character number produced by the e-invoice system through a hash generation algorithm for each submitted document. Currently, the e-invoice system offers two modes for generating the IRN: offline and API. Notified taxpayers can generate e-invoices using these options:

Using the Offline Tool

For manual e-invoice generation, taxpayers can upload invoices in a standard spreadsheet format to generate IRNs in bulk. Users can access the e-invoice portal and find instructions for preparing a bulk upload request for IRNs under Help -> Tools -> Bulk Generation tools. After preparing the bulk upload file, it needs to be uploaded to generate the IRNs. Once generated, the IRN form, complete with all details, can be downloaded.

Using API (Through GSPs Integration)

System integration can be performed with the assistance of registered GST Suvidha Providers (GSPs) via API. Before utilizing this method, API integration with the chosen GSP must be tested in a sandbox environment. Following the test, the GSP needs to submit a test summary report on the sandbox portal. If not already registered, the GSP must register on the e-invoice portal.If the same GSP is used as for the e-way bill portal, re-registration is unnecessary, and existing login credentials can be used. An API user must be created by providing a username and password. These credentials can then be used to generate a token and request the IRN.

Using API (Through Direct Integration)

Taxpayers' systems can be integrated directly via API. This API integration must be tested in a sandbox environment. After the test, the taxpayer needs to submit a test summary report on the sandbox portal.The taxpayer must register on the e-invoice portal if not already registered. If registered on the e-way bill portal, the same login credentials can be used. If the taxpayer is already integrated with the API on the e-way bill system, those API credentials can be reused. Otherwise, API registration will need to be completed through IP whitelisting.If a sister concern under the same PAN has already registered for API and completed IP whitelisting, the same client-ID credentials can be used. However, a new API user will still need to be registered.

Using API (Through an Enabled Sister Concern’s GSTIN)

Systems can be integrated using API through a sister company of the taxpayer with the same PAN, provided that company is API-enabled. The API integration must be tested in a sandbox environment. After testing, the taxpayer needs to submit a test summary report on the sandbox portal. The IP address used by both the sister concern and the taxpayer should be identical when accessing the e-way bill and e-invoice production APIs.The taxpayer must register on the e-invoice portal if not already registered on the e-way bill portal. If registered on the e-way bill portal, the same login credentials can be used. If the taxpayer is already integrated with the API on the e-way bill system, existing API credentials can be reused. Otherwise, a new API user must be created.

E-way Bill API-enabled Taxpayers

System integration via API is also available for taxpayers already enabled for the e-way bill system. The taxpayer will need to test the API integration in a sandbox environment. After the test, the taxpayer must submit the test summary report on the sandbox portal. If the taxpayer is already API-enabled on the e-way bill system, existing credentials can be utilized, and no further steps are required.

Step 3: Generation of the QR Code

The e-invoice system generates the IRN, then digitally signs the e-invoice and produces a Quick Response (QR) code. This QR code allows for quick viewing, validation, and access to invoices using handheld devices.

The QR code will encapsulate the following data:

  • The GSTIN of the supplier.
  • The GSTIN of the recipient.
  • The invoice number assigned by the supplier.
  • The date on which the invoice was generated.
  • The total invoice value (comprising taxable value and gross tax amount).
  • The count of line items.
  • The HSN code for the primary items (i.e., the line item with the highest taxable value).
  • The unique IRN (hash).

The digitally signed QR code, containing a unique IRN (hash), can be verified on the central portal and via offline applications. This functionality is particularly useful for tax officers who may need to inspect invoices in areas without internet connectivity, such as on highways.

Back-end Processing of a Valid E-invoice

The digitally signed e-invoice data is transmitted to the GST system. Here, the supplier's GSTR-1 and the buyer's GSTR-2B/2A will be automatically updated based on the invoice details. Where applicable, invoice information will also populate 'Part A' of the E-Way Bill. Consequently, to generate an E-Way Bill, only the vehicle number needs to be entered in 'Part B' of the E-Way Bill system.

Frequently Asked Questions

Frequently Asked Questions

What is an E-invoice under GST?
An E-invoice, or electronic invoice, is a B2B, B2G, or export invoice that applicable GST-registered businesses must report to the e-invoice portal (GSTN) in a standardized format prescribed by the CBIC.
What is an IRN, and why is it important?
IRN stands for Invoice Reference Number. It is a unique 64-character hash generated by the e-invoice system for every document submitted. It's crucial for authenticating and uniquely identifying each e-invoice.
Which businesses are mandated to issue e-invoices?
The mandate for e-invoicing is rolled out in phases based on turnover. Currently, businesses with an aggregate annual turnover exceeding Rs 5 crore in any financial year from 2017-18 onwards are required to issue e-invoices.
How does e-invoicing affect GSTR-1 and GSTR-2B?
When an e-invoice is successfully processed and signed, the data is automatically transmitted to the GST system. This automatically updates the supplier's GSTR-1 and the buyer's GSTR-2B/2A, streamlining the return filing process.
Can I generate an IRN manually?
Yes, taxpayers can use the offline tool available on the e-invoice portal to prepare and upload invoice data in a standard spreadsheet format for bulk IRN generation. Alternatively, API integration methods are also available for automated generation.