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.
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 field | List of Choices/ Specifications/Sample Inputs | Remarks |
|---|---|---|---|
| 1 | Document Type Code | Enumerated List such as INV/CRN/DBN | Type of document must be specified |
| 2 | Supplier_Legal Name | String Max length: 100 | Legal name of the supplier must be as per the PAN card |
| 3 | Supplier_GSTIN | Max length: 15 Must be alphanumeric | GSTIN of the supplier raising the e-invoice |
| 4 | Supplier_Address | Max length: 100 | Building/Flat no., Road/Street, Locality, etc. of the supplier raising the e-invoice |
| 5 | Supplier_Place | Max length: 50 | Supplier’s location such as city/town/village must be mentioned |
| 6 | Supplier_State_Code | Enumerated list of states | The state must be selected from the latest list given by GSTN |
| 7 | Supplier Pincode | Six digit code | The place (locality/district/state) of the supplier’s locality |
| 8 | Document Number | Max 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 |
| 9 | Preceeding_Invoice_Reference and date | Max 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 |
| 10 | Document Date | String (DD/MM/YYYY) as per the technical field specification | The 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. |
| 11 | Recipient_ Legal Name | Max length: 100 | The name of the buyer as per the PAN |
| 12 | Recipient’s GSTIN | Max length: 15 | The GSTIN of the buyer to be declared here |
| 13 | Recipient’s Address | Max length: 100 | Building/Flat no., Road/Street, Locality, etc. of the supplier raising the e-invoice |
| 14 | Recipient’s State Code | Enumerated list | The place of supply state code to be selected here |
| 15 | Place_Of_Supply_State_ Code | Enumerated list of states | The state must be selected from the latest list given by GSTN |
| 16 | Pincode | Six digit code | The place (locality/district/state) of the buyer on whom the invoice is raised/ billed to must be declared here if any |
| 17 | Recipient Place | Max length: 100 | Recipient’s location (City/Town/Village) |
| 18 | IRN- Invoice Reference Number | Max 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. |
| 19 | ShippingTo_GSTIN | Max length: 15 | GSTIN of the buyer himself or the person to whom the particular item is being delivered to |
| 20 | Shipping To_State, Pincode and State code | Max length: 100 for state, 6 digit pincode and enumerated list for code | State pertaining to the place to which the goods and services invoiced were or are delivered |
| 21 | Dispatch From_ Name, Address, Place and Pincode | Max length: 100 each and 6 digit for pincode | Entity’s details (name, and city/town/village) from where goods are dispatched |
| 22 | Is_Service | String (Length: 1) by selecting Y/N | Whether or not supply of service must be mentioned |
| 23 | Supply Type Code | Enumerated list of codes Sample values can be either of B2B/B2C/ SEZWP/S EZWOP/E XP WP/EXP WOP/DE XP | Code 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. |
| 24 | Item Description | Max 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 |
| 25 | HSN Code | Max length: 8 | The applicable HSN code for particular goods/service must be entered |
| 26 | Item_Price | Decimal (12,3) Sample value is ‘50’ | The unit price, exclusive of GST, before subtracting item price discount, can not be negative |
| 27 | Assessable Value | Decimal (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 |
| 28 | GST Rate | Decimal (3,2) Sample value is ‘5’ | The GST rate represented as a percentage that is applicable to the item being invoiced |
| 29 | IGST Value, CGST Value and SGST Value Separately | Decimal (11,2) Sample value is ‘650.00’ | For each individual item, IGST, CGST and SGST amounts have to be specified |
| 30 | Total Invoice Value | Decimal (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.