Skip to content

A Step-by-Step Guide to Generate an E-Invoice and IRN

step by step guide to generate an e invoice irn

Many taxpayers often inquire about the process of generating e-invoices and irn. An e-invoice is a specific type applicable to B2B, B2G, and export transactions, which certain GST- registered businesses must report through the e-invoice portal (GSTN). These invoices must adhere to the standard format prescribed by the CBIC. This article provides a step-by-step guide on generating an Invoice Reference Number (IRN) for e-invoices and understanding the associated workflow.

Step 1: Creating the Invoice on the Taxpayer’s ERP:

To generate an e-invoice, the taxpayer must create it in their ERP system. However, ensuring that the invoice complies with the e-invoice schema and includes the mandatory parameters is important. The following fields are mandatory for an invoice related to the supply of goods:

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: 100 Legal name of the supplier must be as per the PAN card
3Supplier_GSTINMax length: 15  Must be alphanumeric GSTIN of the supplier raising the e-invoice
4Supplier_AddressMax length: 100 Building/Flat no., Road/Street, Locality, etc. of the supplier raising the e-invoice
5Supplier_PlaceMax length: 50 Supplier’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 taxpayer can generate a JSON file of the final invoice in one of the following ways:

  • Using an accounting and billing system that supports e-invoicing.
  • Utilizing a utility or ERP tool, such as an Excel/word document or a mobile app, to interact with the accounting/billing system
  • Utilizing an offline tool to generate e-invoices by manually entering the invoice data.

By following these steps, taxpayers can generate an e-invoice and ensure compliance with the e-invoicing requirements.

Step 2: Generation of the Unique IRN

Once the invoice has been created in the taxpayer’s ERP system, the next step is to generate the Invoice Reference Number (IRN) by reporting it to the Invoice Registration Portal (IRP). The IRN, also known as a hash, is a unique 64-character number generated by the e-invoice system using a hash generation algorithm.

There are two modes available for generating the IRN: offline and API. Taxpayers who need to generate e-invoices can choose from the following options:

1. Using the Offline Tool:

If you prefer generating e-invoices manually, you can upload invoices in the standard format using a spreadsheet. The IRN can then be generated in a single go. To initiate this process, visit the e-invoice portal and follow the procedure for preparing a bulk upload request for IRNs. Once the bulk upload request file is ready, upload it to generate the IRNs. After generation, the IRN form containing all the details can be downloaded.

2. Using API through GSP Integration:

The API integration can be done with the help of registered GST Suvidha Providers (GSPs). Before using this mode, test the API integration with the identified GSP in a sandbox environment. After successful testing, the GSP must submit the test summary report on the sandbox portal. If the GSP is already registered on the e-invoice portal, there is no need to register again. Use the same login credentials. Create an API user by entering a username and password. With these credentials, you can generate a token and request the IRN.

3. Using API through Direct Integration:

Taxpayers can directly integrate their systems using the API. Like GSP integration, API integration must be tested in a sandbox environment. After testing, submit the test summary report on the sandbox portal. Complete the registration process if you still need to register on the e-invoice portal. You can use the same API credentials if already integrated with API on the e-way bill system. Otherwise, get API registration done by whitelisting the IP address.

4. Using API through an Enabled Sister Concern’s GSTIN:

If a sister concern with the same PAN is already registered for API and has IP whitelisting, you can integrate your systems using their API. Test the API integration in a sandbox environment and submit the test summary report. The IP address used by the sister concern and the taxpayer should be the same when accessing the e-way bill and e-invoice production APIs. Register on the e-invoice portal if you still need to do so. If registered on the e-way bill portal, use the same login credentials or create a new API user.

5. E-way Bill API-Enabled Taxpayers:

For e-way bill-enabled taxpayers, API integration can be done using the existing credentials. Test the API integration in a sandbox environment and submit the test summary report. No additional steps are required if you are already API-enabled on the e-way bill system.

By following these steps, taxpayers can successfully generate an e-invoice and obtain the unique IRN required for compliance with the e-invoicing system.

Step 3: Generation of the QR Code

After generating the Invoice Reference Number (IRN), the e-invoice system digitally signs the e-invoice and generates the QR code (quick response code). The QR code is a convenient way to view, validate, and access invoices from handheld devices. It contains several important parameters for easy identification and retrieval of invoice information. These parameters include:

  • GSTIN of the supplier: The Goods and Services Tax Identification Number of the supplier.
  • GSTIN of the recipient: The Goods and Services Tax Identification Number of the recipient/customer.
  • Invoice number: The unique number assigned to the invoice by the supplier.
  • Date of invoice generation: The date when the invoice is generated.
  • Invoice value: The total value of the invoice, including the taxable value and the gross tax amount.
  • Number of line items: The total count of line items present in the invoice.
  • HSN code: The Harmonized System of Nomenclature code for the main items in the invoice. This refers to the line item with the highest taxable value.
  • Unique IRN (hash): The Invoice Reference Number, represented by a unique 64-character hash.

The digitally signed QR code contains the unique IRN (hash), which can be verified on the central portal and through offline applications. This feature proves particularly useful for tax officers who need to validate invoices in locations where an internet connection may not be readily available, such as on highways or in remote areas.

By including all these relevant details in the digitally signed QR code, the e-invoice system ensures quick and efficient access to invoice information while maintaining its authenticity and integrity.

Back-end Processing of a Valid e-Invoice

Once the e-invoice has been digitally signed and generated, it undergoes further processing in the GST system. The following steps outline the back-end processing of a valid e-invoice:

  • Update GSTR-1 of the Supplier: The details entered in the e-invoice will be used to update the supplier’s GSTR-1 (outward supplies). This ensures the invoice information is accurately reflected in the supplier’s GST return.
  • Update GSTR-2B/2A of the Buyer: The buyer’s GSTR-2B (auto-drafted ITC statement) or GSTR-2A (auto-populated purchase statement) will be updated with the relevant details from the e-invoice. This enables the buyer to reconcile and claim an input tax credit (ITC) based on the e-invoice information.
  • Update Part A of the E-Way Bill: If applicable, the details from the e-invoice will be used to update “Part A” of the E-Way Bill. The E-Way Bill is a document required to move goods exceeding a certain value. Using the e-invoice information, most of the required fields in “Part A” of the E-Way Bill can be pre-filled, simplifying the process of generating the E-Way Bill.
  • Vehicle Number Entry in Part B of the E-Way Bill: After the e-invoice details have been updated in “Part A” of the E-Way Bill, only the vehicle number needs to be entered in “Part B” of the E-Way Bill system. This completes the process of creating an E-Way Bill, allowing for the authorized transportation of goods.

By automating the integration of e-invoice data with the GST system and E-Way Bill system, the back-end processing ensures seamless compliance. It reduces the manual effort required for data entry. It enables accurate reporting in GSTR-1, facilitates the reconciliation of input tax credits, and streamlines the generation of E-Way Bills.

Businesses need to ensure that the e-invoice details are accurately captured and processed in the back-end systems to maintain compliance with GST regulations and facilitate the smooth movement of goods.

Share this post on social

About us

WhiteBooks smart solutions enable owners to manage their businesses on a feature-rich automated software accounting platform. Hassle-free, easy-to-use, secure, affordable, and accurate – We have simplified business accounting for you!

The content on this website is for educational and informational purposes only. We strive to provide up-to-date information but make no warranties regarding the accuracy of our information.