ERPNext E-Invoicing IRN Flow Made Simple
How to set up, generate, cancel, and reconcile GST e-invoices and IRN in ERPNext under the latest India GST rules. Written for ERPNext users, finance teams, and GST compliance officers, with screenshots from the official India Compliance app.
Key facts at a glance (2026)
| Mandatory e-invoicing threshold (AATO) | Rs. 5 crore in any FY since 2017-18 |
|---|---|
| 30-day IRN reporting window applies to | Businesses with AATO above Rs. 10 crore |
| Reporting deadline from invoice date | 30 days |
| IRN cancellation window | 24 hours from generation |
| ERPNext app used | India Compliance app (open source) |
| GST portal | einvoice1.gst.gov.in |
| Required HSN code length | Minimum 6 digits for AATO above Rs. 5 crore |
1. What is E-Invoicing Under GST and Why ERPNext?
E-invoicing under India's Goods and Services Tax (GST) is the real-time reporting of Business to Business (B2B) tax invoices to the government's Invoice Registration Portal (IRP) before they are issued to customers. The IRP validates each invoice, assigns a unique 64-character Invoice Reference Number (IRN), returns a digitally signed QR code, and pushes the invoice data into the auto-populated GSTR-1 return and the e-Way Bill system.
ERPNext, the open-source ERP from Frappe, supports the entire e-invoicing lifecycle natively through its India Compliance app. Indian businesses use ERPNext to handle IRN generation, e-Way Bill creation, cancellation, and GSTR-1 reconciliation from a single Sales Invoice screen, without logging into the e-invoice portal manually.
Why finance teams choose ERPNext for GST e-invoicing
- Single-click IRN generation directly from the Sales Invoice.
- Automatic QR code embedding into the GST e-invoice print format.
- Bulk processing for high-volume invoicing operations.
- Combined IRN and e-Way Bill generation in a single API call.
- Built-in IRN cancellation, e-invoice logs, and exception reporting.
- Automatic data flow into GSTR-1 reconciliation reports.
- Open-source with no per-invoice fee on the application layer.
2. Who Must Generate IRN in ERPNext (Applicability 2026)
E-invoicing applicability in India is defined by Aggregate Annual Turnover (AATO). The threshold has been progressively reduced since the system was introduced in October 2020. As of 2026, every GST-registered business that crossed the threshold in any financial year from 2017-18 onwards must report its B2B invoices to the IRP and generate an IRN.
E-invoicing applicability thresholds (current as of 2026)
| AATO band | E-invoicing requirement | Reporting window |
|---|---|---|
| Above Rs. 500 crore | Mandatory since October 2020 | 30 days from invoice date |
| Above Rs. 100 crore | Mandatory since January 2021 | 30 days from invoice date |
| Above Rs. 50 crore | Mandatory since April 2021 | 30 days from invoice date |
| Above Rs. 20 crore | Mandatory since April 2022 | 30 days from invoice date |
| Above Rs. 10 crore | Mandatory since October 2022 | 30 days, effective April 2025 |
| Above Rs. 5 crore | Mandatory since August 2023 | No fixed window currently |
| Below Rs. 5 crore | Not mandatory | Not applicable |
Who is exempt from e-invoicing
Even if turnover crosses the threshold, the following are exempt under current GST notifications:
- Special Economic Zone (SEZ) units, though SEZ developers are covered.
- Insurers and banking companies, including financial institutions.
- Non-Banking Financial Companies (NBFCs).
- Goods Transport Agencies (GTAs).
- Passenger transport service providers.
- Multiplex cinema admission ticket suppliers.
- Government departments and local authorities.
3. Prerequisites and Setup for ERPNext E-Invoicing
Before ERPNext can generate IRNs through the India Compliance app, three categories of prerequisites must be in place: master data readiness, IRP and GSP credentials, and ERPNext configuration.
3.1 Master data readiness in ERPNext
Most IRN failures originate in poor master data. Before enabling e-invoicing, validate the following:
- Active GSTIN for the supplier company, configured under the Company master.
- Customer GSTINs validated and updated, with correct State codes.
- Item master HSN or SAC codes mapped with minimum 6 digits for AATO above Rs. 5 crore.
- Place of Supply rules reviewed for inter-state, intra-state, export, and SEZ scenarios.
- Unit of Measurement (UQC) codes aligned with the GST UQC list.
- Sales Invoice naming series within 16 characters, alphanumeric only.
3.2 IRP and GSP credentials for ERPNext
ERPNext communicates with the IRP either directly through the National Informatics Centre (NIC) endpoints or through a GST Suvidha Provider (GSP). The India Compliance app supports both. Adaequare is currently the most commonly used GSP for ERPNext deployments. Other authorised options include IRIS, Cygnet, ClearTax, and Taxilla.
How to add GSP credentials in ERPNext GST Settings
Once you have created a GSP user on the e-Waybill portal (Registration menu, choose Adaequare as the GSP, set username and password), add the same credentials in ERPNext under GST Settings › Credentials tab.

| Credential | Source | Owner |
|---|---|---|
| E-invoice portal username and password | einvoice1.gst.gov.in | Finance |
| API username and password | API Registration on the e-invoice portal | Finance with IT support |
| Client ID and Client Secret | Issued by the chosen GSP, or by NIC | IT with Finance |
| Whitelisted public IP address | Provided by IT, registered on the portal | IT |
| GSP API package | Purchased by the ERPNext implementation partner | ERPNext partner |
3.3 ERPNext configuration: India Compliance app setup
The India Compliance app is the official open-source application for GST compliance in ERPNext. It comes pre-installed on Frappe Cloud and can be installed manually on self-hosted deployments. Configuration takes place across three documents: GST Settings, Company master, and E-Invoice Settings.
e-Waybill settings in ERPNext
Under GST Settings, configure the e-Waybill section to enable features like generation from Sales Invoice or Delivery Note, set the invoice value threshold (default Rs. 50,000), and decide whether to auto-generate e-Waybill on submission of Sales Invoice.

e-Invoice settings in ERPNext
Below the e-Waybill section, the e-Invoice Settings section turns on e-invoicing, controls auto-generation on Sales Invoice submission, and lets you generate e-Waybill together with the e-Invoice in a single API call.

Selective company-level e-Invoice settings
For multi-company ERPNext setups, you can apply e-Invoicing only to selected companies and configure an Applicable From date for each one. The retry option is recommended for production environments to handle gateway timeouts gracefully.

ERPNext e-invoicing setup steps
- Install the India Compliance app: bench get-app india_compliance, then bench install-app india_compliance.
- Open GST Settings: enable Auto Generate E-Invoice, set the e-Invoice Threshold to match your AATO, enable HSN validation.
- Open the Company master: confirm GSTIN and GST Category (Regular, SEZ, Composition).
- Open E-Invoice Settings: enter API username, password, Client ID, and Client Secret for each GSTIN.
- Enable Sandbox Mode for testing and run minimum 10 test invoices end-to-end.
- Switch off Sandbox Mode and run a single live invoice as a final validation before go-live.
- Update the GST E-Invoice Print Format to display IRN, Ack No, Ack Date, and the signed QR code.
- Configure user roles: only authorised users should have permission to generate or cancel IRN.
4. Step-by-Step IRN Generation Flow in ERPNext
Once setup is complete, the IRN generation flow runs alongside the normal sales cycle. ERPNext supports three modes: automatic generation on submission, manual generation, and bulk generation. The underlying API flow is identical across all three.
4.1 The end-to-end IRN flow
| Step | Action in ERPNext | What happens behind the scenes |
|---|---|---|
| 1 | User creates and saves a Sales Invoice | ERPNext validates GST fields, HSN, GSTIN, and place of supply |
| 2 | User submits the Sales Invoice | If Auto Generate is enabled, IRN request fires automatically |
| 3 | ERPNext builds JSON payload in IRP schema | India Compliance app constructs and signs the request |
| 4 | Request goes to IRP via the GSP API | IRP validates duplicate hash, GSTIN status, and turnover |
| 5 | IRP returns IRN, Ack No, Ack Date, signed QR | ERPNext stores all four against the Sales Invoice |
| 6 | Print format updates automatically | Invoice now carries IRN and signed QR as required by law |
| 7 | Invoice flows to GSTR-1 and EWB Part A | Government auto-populates the invoice for return filing |
4.2 How to generate IRN in ERPNext (manual mode)
- Open the submitted Sales Invoice. The e-Invoice section appears in the form.
- Click the e-Invoice menu and select Generate IRN.
- ERPNext shows a confirmation dialog summarising the invoice value and customer GSTIN.
- Click Confirm. Within a few seconds the IRN, Ack No, Ack Date, and QR code populate.
- On failure, an error message appears with the IRP error code and explanation. See Section 7 for fixes.
- Print or email the invoice. The PDF carries the IRN and signed QR code automatically.
4.3 Automatic IRN generation on submit
If Auto Generate E-Invoice is enabled in GST Settings, ERPNext fires the IRN request the moment the Sales Invoice is submitted. The user sees a brief loading indicator, after which the IRN appears on the invoice. This is the recommended mode for production use because it eliminates the risk of users forgetting to generate IRN.
4.4 Bulk IRN generation in ERPNext
For organisations issuing many invoices per day, ERPNext supports bulk IRN generation. Navigate to E-Invoice List, filter for invoices in Pending status, select the relevant rows, and click Generate IRN. The India Compliance app processes them sequentially and reports successes and failures in a downloadable log.
4.5 Time limits you must respect
Reporting window: From 1 April 2025, businesses with AATO above Rs. 10 crore must report invoices to the IRP within 30 days from the invoice date. Beyond that window, the IRP rejects the IRN request.
Cancellation window: An IRN can be cancelled on the IRP within 24 hours of generation. After 24 hours, cancellation can only be reflected through a credit note.
5. ERPNext E-Way Bill Integration with IRN
An e-Way Bill (EWB) is required for movement of goods above a notified value, generally Rs. 50,000. ERPNext can generate the EWB in the same call as the IRN, or as a separate step.
5.1 When is an e-Way Bill required
| Scenario | EWB needed | Note |
|---|---|---|
| Goods invoice above Rs. 50,000, inter-state | Yes | Mandatory in almost all states |
| Goods invoice above Rs. 50,000, intra-state | Yes, in most states | Threshold varies by state |
| Services invoice | No | EWB does not apply to pure services |
| Goods returned by customer | Yes, if value above threshold | Generated against the credit note |
| Stock transfer between own branches | Yes, if value above threshold | Issued against delivery note |
5.2 Combined IRN and e-Way Bill generation
ERPNext exposes a single action that requests both the IRN and the EWB. On the Sales Invoice, scroll to the Transporter Info section and enter transporter GSTIN, vehicle number, distance, and mode of transport. From the e-Invoice menu, click Generate IRN and E-Way Bill. The IRP returns the IRN, signed QR, EWB number, and EWB validity date in a single response.
e-Way Bill print formats in ERPNext
Once the e-Way Bill is generated, ERPNext provides two print formats: Simplified and Detailed. The Simplified format is suitable for vehicle drivers and field staff. The Detailed format includes Part A and Part B fields, useful for the back office and for audits.


Information the dispatch team must capture
- Transporter GSTIN or transporter ID issued by the EWB portal.
- Vehicle registration number, mandatory for road mode.
- Mode of transport: Road, Rail, Air, or Ship.
- Approximate distance in kilometres between dispatch and delivery PIN codes.
- Sub-supply type: Supply, Export, Job Work, Sales Return, and similar.
5.3 e-Waybill log: tracking the audit trail
Every e-Waybill generated through the API creates an entry in the e-Waybill Log doctype in ERPNext. This log records the EWB number, generation date, validity, and any subsequent updates such as vehicle changes or extensions. It is the primary audit trail for finance and tax teams.

Updates to e-Waybill log
When you update transporter details, change the vehicle number, or extend the validity, ERPNext appends a comment to the e-Waybill Log capturing what changed and when. This timeline is invaluable during goods detention queries or GST audits.

5.4 EWB extension and vehicle update
ERPNext allows extending the validity of an EWB if goods are stuck in transit, and updating the vehicle number if there is a transhipment. Both actions create an audit trail on the Sales Invoice. EWB cancellation is supported within validity, but if validity has expired, cancel on the EWB portal and update the status manually in ERPNext.
6. IRN Cancellation and Amendment in ERPNext
The IRP does not allow editing of an IRN once generated. The only options are cancellation within 24 hours, or correction through a credit or debit note thereafter. ERPNext mirrors this behaviour with appropriate controls.
6.1 How to cancel an IRN in ERPNext (within 24 hours)
- Open the Sales Invoice that holds the IRN.
- From the e-Invoice menu, click Cancel IRN.
- ERPNext prompts for a cancellation reason: Duplicate, Data Entry Mistake, Order Cancelled, or Other.
- Confirm the action. ERPNext sends the cancellation request to the IRP and marks the IRN as Cancelled.
- Cancel the underlying Sales Invoice in ERPNext. An IRP-cancelled invoice should not remain as a Submitted Sales Invoice.
6.2 After 24 hours: corrections through credit and debit notes
| Situation | Correct treatment | Document in ERPNext |
|---|---|---|
| Wrong customer GSTIN | Issue a credit note, then a fresh invoice | Sales Invoice Return + new Sales Invoice |
| Quantity overstated | Issue a credit note for the excess | Sales Invoice Return |
| Rate incorrect, undervalued | Issue a debit note for the differential | Debit Note Sales Invoice |
| Customer returned goods | Issue a credit note linked to the original | Sales Invoice Return with reference |
6.3 Amendments through GSTR-1
Some corrections, such as a wrong invoice date, cannot be handled through credit or debit notes. These must be amended directly in the GSTR-1 return for the relevant period. ERPNext flags such cases in its e-invoice exception report so the GST team can pick them up during return filing.
7. Common ERPNext IRN Errors and How to Fix Them
Most IRN failures fall into a small set of recurring errors. The table below covers the most frequent ones, what they mean, and how to resolve them in ERPNext.
| Error code | What it means | Resolution in ERPNext |
|---|---|---|
| 2150 | Duplicate IRN. Same invoice already reported. | Refresh the Sales Invoice. Avoid re-submission. |
| 2172 | Invalid HSN code for the supplier turnover. | Update HSN to 6 digits or more in the Item master. |
| 2176 | Invalid Place of Supply. | Correct the State code or update Customer Address. |
| 2189 | Invalid GSTIN of recipient. | Verify customer GSTIN and update Customer master. |
| 2193 | AATO not eligible for e-invoicing. | Check with GST team. May indicate IRP data mismatch. |
| 3028 | GSTIN is cancelled or suspended. | Stop billing this customer until status resolved. |
| 3029 | GSTIN does not belong to a Regular taxpayer. | Treat the invoice as B2C, e-invoicing not required. |
| 4019 | Invalid token. Authentication failed. | Refresh API token in E-Invoice Settings. |
| No response from IRP | Connectivity issue or IRP downtime. | Wait and retry. ERPNext queues failed invoices. |
| Address line 1 must be a string | Customer Address Line 1 empty or numeric only. | Open Customer Address and add a meaningful line 1. |
7.1 When the IRP itself is down
The Invoice Registration Portal occasionally faces outages. During such windows, the law allows businesses to continue issuing invoices, with the IRN to be obtained once the portal is restored. ERPNext should be configured to queue failed invoices automatically and retry them at a defined interval.
7.2 Escalation matrix
| Issue type | First response | Escalate to |
|---|---|---|
| Master data errors (HSN, GSTIN, address) | Accounts user | Accounts Manager |
| API connectivity, token, IP whitelist | IT support | GSP account manager |
| IRP rejecting all invoices | Accounts Manager | GSP and tax consultant |
| Suspected non-compliance | Finance Head | External tax advisor |
8. Reports and GSTR-1 Reconciliation in ERPNext
ERPNext provides a suite of reports that together give finance a complete view of e-invoicing health. Running these reports on a defined cadence is the single most effective control a finance head can put in place.
8.1 ERPNext e-invoice reports your finance team should run
| Report | Purpose | Cadence |
|---|---|---|
| E-Invoice Summary | All invoices with IRN status | Daily |
| Pending IRN Report | Submitted Sales Invoices without IRN | Daily, end of day |
| IRN Cancellation Log | All IRNs cancelled, with reason and user | Weekly |
| E-Way Bill Expiry Report | EWBs expiring within 24 hours | Twice daily |
| GSTR-1 vs IRP Reconciliation | Mismatches between GSTR-1 and IRP data | Monthly, before filing |
| Exception Report | Invoices stuck due to errors | Daily |
8.2 Monthly GSTR-1 reconciliation
Before filing GSTR-1, the GST team should reconcile three data sets: the Sales Register from ERPNext, the e-invoice data downloaded from the IRP, and the auto-populated GSTR-1 on the GST portal. ERPNext provides a built-in reconciliation utility under the India Compliance app that highlights mismatches in invoice number, taxable value, tax amount, or customer GSTIN.
Common reconciliation differences
- Invoice issued but IRN never generated, often due to user oversight.
- IRN cancelled on the IRP but the underlying Sales Invoice not cancelled in ERPNext.
- Credit note issued in ERPNext but not reported on the IRP.
- Manual GSTR-1 edits not back-posted in ERPNext.
- Foreign currency rounding differences between IRP rate and ERPNext rate.
9. Frequently Asked Questions
Quick answers to the questions ERPNext users, finance heads, and GST consultants ask most often about e-invoicing.
What is IRN in ERPNext?
IRN stands for Invoice Reference Number. It is a unique 64-character hash generated by the GST Invoice Registration Portal (IRP) for every B2B invoice reported. ERPNext stores the IRN against the Sales Invoice along with the Acknowledgement Number, Acknowledgement Date, and signed QR code.
Is e-invoicing mandatory in ERPNext?
E-invoicing is mandatory for any GST-registered business in India whose Aggregate Annual Turnover exceeded Rs. 5 crore in any financial year from 2017-18 onwards. ERPNext supports e-invoicing through the India Compliance app and can be configured to comply with this requirement.
How long does it take to set up e-invoicing in ERPNext?
A typical ERPNext e-invoicing setup takes 5 to 10 working days. This includes obtaining API credentials from the e-invoice portal, signing up with a GSP, configuring E-Invoice Settings, running sandbox tests, and updating the print format. Master data clean-up may add additional time.
Which GSP does ERPNext use for e-invoicing?
The default integration in the India Compliance app uses Adaequare as the GSP. Other GSPs such as IRIS, Cygnet, ClearTax, and Taxilla can also be configured. Direct integration with NIC is also supported for businesses that prefer it.
Can I generate IRN automatically when I submit a Sales Invoice in ERPNext?
Yes. Enable Auto Generate E-Invoice in GST Settings. Once enabled, ERPNext fires the IRN request immediately on submission of the Sales Invoice. This is the recommended mode for production use.
How do I cancel an IRN in ERPNext?
Open the Sales Invoice, go to the e-Invoice menu, and click Cancel IRN. Provide a cancellation reason (Duplicate, Data Entry Mistake, Order Cancelled, or Other). ERPNext sends the request to the IRP and marks the IRN as Cancelled. Cancellation must be done within 24 hours of generation.
What happens if the 24-hour cancellation window is missed?
The IRN cannot be cancelled after 24 hours. The correction must be made through a credit note or debit note in ERPNext. If the original invoice had wrong details such as customer or amount, issue a credit note linked to the original and create a fresh invoice.
What is the 30-day rule for e-invoicing?
Effective 1 April 2025, businesses with Aggregate Annual Turnover above Rs. 10 crore must report invoices to the IRP within 30 days from the invoice date. Beyond 30 days, the IRP rejects the IRN request and the invoice becomes invalid for GST purposes.
Can ERPNext generate an e-Way Bill along with the IRN?
Yes. Enter transporter details on the Sales Invoice, then click Generate IRN and E-Way Bill from the e-Invoice menu. The IRP returns the IRN, signed QR, EWB number, and EWB validity date in a single response.
What HSN code length is required for e-invoicing in ERPNext?
Businesses with Aggregate Annual Turnover above Rs. 5 crore must use a minimum 6-digit HSN code. Below this threshold, 4-digit HSN is acceptable. ERPNext validates HSN length when Validate HSN Code is enabled in GST Settings.
10. Governance Checklist for Finance Heads
Use this checklist during quarterly reviews with the GST team and the ERPNext implementation partner.
Setup and access
- Sandbox sign-off documented before production go-live.
- API credentials stored securely, rotated annually, and restricted to ERPNext only.
- User roles for IRN generation, cancellation, and override clearly separated.
- Workflow approval enabled for IRN cancellation.
Operations
- Daily review of pending IRN and exception reports by the Accounts Manager.
- 30-day reporting window monitored, with a daily aging report of submitted invoices without IRN.
- EWB expiry monitored at least twice daily during business hours.
- Bulk generation used only for invoices that have completed internal review.
Compliance and audit
- Monthly reconciliation between Sales Register, IRP data, and GSTR-1 signed off in writing.
- All IRN cancellations reviewed monthly with reason analysis, repeat reasons addressed at root cause.
- Backup process documented for IRP downtime, including queue monitoring.
- Annual review of e-invoicing policy and threshold applicability with the tax advisor.
Need help with ERPNext e-invoicing implementation?
Finstein is a Chennai-based ERPNext implementation partner with deep experience in GST compliance, IRN integration, and finance transformation for Indian businesses.
About the Author
Praveen Kumar is the Founder and Managing Director of Finstein Advizory Service LLP, a Chennai-based consulting firm specialising in ERPNext implementation, GST compliance advisory, internal audit, cybersecurity, and AI advisory. Finstein serves clients across BFSI, healthcare, IT/ITeS, and manufacturing sectors in India and internationally.
About Finstein
Finstein Advizory Service LLP is an Indian consulting firm offering ERPNext implementation, SAP S/4HANA advisory, HRMS deployment, GST compliance, internal audit, VAPT cybersecurity assessments, and AI advisory. Based in T. Nagar, Chennai. Visit erpnext.finstein.ai.
Image and Source Credits
All ERPNext UI screenshots in this guide are sourced from the official India Compliance App documentation, maintained by Resilient Tech, and are used here under fair-use educational citation. Original copyright remains with Resilient Tech. Readers are encouraged to consult the official documentation for the latest screens and behaviour.
Disclaimer
This guide reflects ERPNext functionality and GST regulations as of 2026. It does not substitute for professional tax advice. Last updated: 7 May 2026.