ERPNext Guides

GST E-Invoicing in ERPNext: A Step-by-Step Setup Guide (2026)

gst e-invoicing erpnext — configure India Compliance, connect to the IRP, generate IRNs and signed QR codes, and handle e-way bills from a single ERPNext setup.

MManojJune 7, 202613 min read

GST e-invoicing in ERPNext is fully supported through the official Frappe "India Compliance" app, which lets you generate IRNs, fetch signed QR codes from the Invoice Registration Portal, and push e-way bills — all without leaving your ERP.

For Indian businesses that have crossed the applicable aggregate annual turnover threshold (verify current GST rules for your category), e-invoicing is not optional. Every B2B sales invoice must carry a valid IRN and a signed QR code issued by the IRP before it leaves your premises. Non-compliance attracts penalties and, critically, blocks your buyer's input tax credit — which means unhappy customers and audit risk at both ends of the supply chain.

The good news is that ERPNext, backed by the open-source India Compliance app from Resilient Tech, handles this end to end. This guide walks you through the complete setup: enabling GST settings, configuring your GSTIN, connecting to the IRP via API credentials, testing IRN generation, handling e-way bills, and pulling GSTR-1/GSTR-3B data — with a section on common errors and how to fix them.

Quick answer

Install the India Compliance app on your ERPNext instance, enter your GSTIN and IRP API credentials in GST Settings, enable e-invoicing for the relevant companies, and ERPNext will auto-generate IRNs and signed QR codes on submission of eligible Sales Invoices. E-way bills can be generated from the same screen.

Prerequisites and app installation

Before touching GST settings you need two things in place: a working ERPNext instance (v14 or v15 recommended) and the India Compliance app installed.

Install the India Compliance app

  1. SSH into your ERPNext server (or open the Frappe Cloud dashboard if you are on managed hosting).
  2. Run the following bench command from your frappe-bench directory:
bench get-app india_compliance
bench --site your-site-name install-app india_compliance
bench --site your-site-name migrate
bench restart
  1. After migration, log into ERPNext and navigate to India Compliance Settings. You will see a new set of GST-specific fields that were not there before.

If you are on Frappe Cloud, India Compliance can be added from the Apps tab of your site dashboard without any SSH access.

Use the latest stable release

Pin your India Compliance app to the latest stable branch matching your ERPNext version (version-14 or version-15). The app receives frequent updates for GST schema changes, and running an outdated branch is the single most common reason for mysterious IRN failures.

Configure your GSTIN and company details

GST e-invoicing lives and dies by exact GSTIN data. A single character mismatch will cause the IRP to reject the request.

Step 1 — Set up the company GSTIN

  1. Go to Accounting > Masters > Company and open your company record.
  2. Scroll to the GST Details section (added by India Compliance).
  3. Enter your 15-digit GSTIN. Double-check it against your GST certificate — letter case matters.
  4. Set Tax ID to the same GSTIN. ERPNext uses the Tax ID field in several print formats and e-invoice payloads.
  5. Save the record.

Step 2 — Configure address GSTINs

Every address linked to a Sales Invoice must carry its own GSTIN where applicable.

  1. Go to CRM > Masters > Address (or search "Address" in the search bar).
  2. Open each company address and fill in the GSTIN field.
  3. For customer addresses, fill in the customer's GSTIN on the Customer master under Tax Information, or on the individual Address record. The India Compliance app reads the address-level GSTIN first when building the e-invoice payload.

Step 3 — Configure HSN codes on items

Every line item in a B2B invoice must carry a valid HSN/SAC code.

  1. Open each Item master and scroll to GST Details.
  2. Set HSN/SAC Code (6-digit for goods, 4-digit for services is the baseline — verify current rules for the correct digit requirement in your category).
  3. Set the correct GST Rate (via the item's linked Tax template or the HSN Code master).

Connect ERPNext to the IRP via India Compliance Settings

This is where most setups stall. The IRP connection requires API credentials, and sourcing them correctly saves hours of debugging.

Step 4 — Obtain IRP API credentials

The NIC (National Informatics Centre) operates the IRP. You can access it either directly through the NIC e-invoice portal or via a GSP (GST Suvidha Provider). India Compliance supports both paths.

  1. Log in to einvoice1.gst.gov.in with your GST credentials.
  2. Under API Access, register your ERP as a sub-user and generate a Client ID and Client Secret. Keep these secure — treat them like passwords.
  3. If you prefer a GSP route (useful when your internet IP is dynamic or you need SLA guarantees), obtain credentials from your GSP and note whether they issue NIC-format or GSP-format tokens; the India Compliance settings screen has a GSP dropdown for this.

Step 5 — Enter credentials in India Compliance Settings

  1. In ERPNext, search for India Compliance Settings or go to Accounting > India Compliance > India Compliance Settings.
  2. Under E-Invoicing, toggle Enable E-Invoicing to On.
  3. Select the applicable Companies (if you run multiple legal entities in one ERPNext instance, you configure credentials per GSTIN).
  4. Enter Client ID, Client Secret, and the GSP if applicable.
  5. Set E-Invoicing Applicable From to the date from which you want automatic IRN generation. Invoices dated before this date will be skipped.
  6. Click Save, then Test Connection. A success message confirms ERPNext can reach the IRP.

Sandbox vs production credentials

The IRP provides a sandbox environment for testing. Sandbox credentials will not work against the production endpoint and vice versa. Ensure you switch to production credentials before going live, and update the Environment toggle in India Compliance Settings from "Sandbox" to "Production" at the same time.

Generate IRNs and signed QR codes on Sales Invoices

With credentials in place, IRN generation becomes part of the normal invoice submission flow.

Step 6 — Submit a Sales Invoice and generate the IRN

  1. Create a Sales Invoice for a registered buyer (GSTIN required on the customer address).
  2. Fill all mandatory fields: item HSN codes, tax amounts, place of supply, customer GSTIN.
  3. Click Submit. India Compliance will automatically push the invoice payload to the IRP and fetch back the IRN (64-character hash) and Signed QR Code.
  4. Both fields appear in the e-Invoice section of the submitted invoice. The QR code is also embedded in the standard India Compliance print format.

If the auto-fetch does not trigger (for example, you submitted the invoice before enabling e-invoicing), you can manually click Generate IRN from the invoice's action menu.

Step 7 — Cancel an IRN when needed

Cancellation must happen within 24 hours of generation on the IRP side.

  1. Open the submitted Sales Invoice.
  2. Click Cancel IRN from the action menu.
  3. Select a Cancellation Reason from the dropdown (as defined by the IRP schema).
  4. After the IRP confirms cancellation, amend or recreate the invoice as needed.

After 24 hours you cannot cancel an IRN on the portal; you must issue a Credit Note instead and report it correctly in GSTR-1.

E-way bill generation for goods movement

If your invoice covers the movement of goods above the applicable consignment value threshold (verify current e-way bill rules for your goods category and distance), an e-way bill is mandatory.

Step 8 — Generate an e-way bill from the Sales Invoice

  1. On a submitted Sales Invoice that has a valid IRN, click Generate E-Way Bill from the action menu.
  2. Fill in the Transporter GSTIN, Vehicle Number, Mode of Transport, and Distance (in km).
  3. Submit. India Compliance calls the e-way bill API and returns the E-Way Bill Number and validity date, which are stored on the invoice and included in print formats.
  4. For multi-vehicle or part-B updates (vehicle change en route), use Update E-Way Bill Part B from the same action menu.

GSTR-1 and GSTR-3B reporting

IRN generation is only one half of GST compliance. You still need to file monthly/quarterly returns.

Step 9 — Export GSTR-1 data

  1. Go to Accounting > India Compliance > GSTR-1.
  2. Select the Company, GSTIN, and the Return Period (month or quarter depending on your filing frequency).
  3. Click Fetch Data. ERPNext aggregates all submitted Sales Invoices, credit notes, debit notes, and export invoices into the GSTR-1 format.
  4. Review each section (B2B, B2C Large, CDNR, etc.) for accuracy before exporting.
  5. Click Download JSON to get the file for upload to the GST portal, or use the File GSTR-1 button if your instance is set up for direct API filing.

Step 10 — Reconcile before GSTR-3B

GSTR-3B is a summary return. India Compliance provides a GSTR-3B Summary report that aggregates outward supplies and ITC from Purchase Invoices. Always cross-check this against your GSTR-2B (auto-drafted ITC statement) on the GST portal before submitting, because mismatches in ITC are a common trigger for GST notices.

Common errors and fixes

Error messageLikely causeFix
GSTIN is invalid or not foundCustomer GSTIN not entered or mis-typedVerify GSTIN on the Customer/Address master against GST portal
HSN code is mandatoryItem missing HSN/SAC codeAdd correct HSN code to Item master
Duplicate IRNInvoice already has an IRN (e.g. resubmit attempt)Open existing IRN from the e-Invoice section; do not regenerate
E-invoice schema validation failedPayload field length or format violationCheck item description length (max 300 chars), address pincode format (6 digits), and state codes
Invalid credentials / token expiredAPI credentials wrong or session token staleRe-enter Client ID/Secret in India Compliance Settings; use Refresh Token if available
E-way bill: distance cannot be zeroDistance field left blankEnter the approximate road distance in km; consult the e-way bill portal distance tool

Integration with the rest of ERPNext

Because India Compliance is a first-party Frappe app, IRN data flows naturally into the broader ERPNext ecosystem. Your signed QR code appears on PDF invoices automatically. IRN status is visible in the Sales Invoice list view so your accounts team can spot uninvoiced submissions at a glance. Payments, credit notes, and debit notes all link back to the originating IRN for audit purposes.

For businesses running distribution operations, the India Compliance e-invoicing layer works alongside the warehouse-per-distributor structure described in our distributor secondary-sales tracking guide. All inter-company stock transfers with a taxable value above the threshold also need IRNs — configure a separate GSTIN-linked company address for each branch if you operate across states.

If you are evaluating ERPNext as your primary ERP and want to understand total implementation cost, see our ERPNext implementation cost guide for India. For a broader look at what the Frappe stack covers, visit the Frappe solutions overview or the ERPNext product page.

Need help setting up GST e-invoicing in ERPNext?

Mith Tech implements and configures ERPNext for Indian SMEs, including full India Compliance and GST e-invoicing setup, typically completed within two to four weeks.

Talk to our team

Frequently asked questions

Which businesses need GST e-invoicing in India?

E-invoicing is mandatory for B2B invoices issued by businesses whose aggregate annual turnover exceeds the notified threshold. The threshold has been progressively lowered since 2020. Verify the current applicable limit on the official GST portal or with your CA, as it can change through government notifications.

Can ERPNext generate e-invoices without a GSP?

Yes. The India Compliance app can connect directly to the NIC IRP using credentials issued from the e-invoice portal, with no GSP intermediary required. A GSP is useful if you need a managed SLA, a static IP is impractical, or you want consolidated API management across multiple GSTINs.

What happens if an IRN is not generated at the time of invoice?

You can manually trigger IRN generation from the Sales Invoice action menu at any time before the invoice is more than 30 days old (verify current IRP rules on the back-dating window). After that window, the IRP will reject the request. Always generate IRNs on the date of supply to stay compliant.

Does India Compliance support multi-GSTIN or multi-branch setups?

Yes. India Compliance Settings allows you to configure separate IRP credentials per GSTIN. In ERPNext you model each legal entity or branch GSTIN as a separate Company or as a separate address with its own GSTIN field, and the app picks the correct credentials automatically when generating the IRN.

How do I handle e-invoicing for credit notes and debit notes?

India Compliance generates IRNs for credit notes (return invoices) and debit notes linked to the original invoice. Ensure the original IRN is recorded on the Sales Invoice before creating the amendment; the app includes it automatically in the credit/debit note payload sent to the IRP.

Is the India Compliance app free to use?

The India Compliance app is open source and free to use under its licence terms. There is no per-user or per-invoice fee from Frappe. You may incur costs from your cloud or hosting provider and from implementation services. Some GSPs charge a per-API-call fee if you route through them, but direct NIC access has no transaction charges.

M

Written by

Manoj

Founder of Mith Tech, an open-source ERP & automation studio. Hands-on ERPNext/Frappe implementation across multi-branch, multi-warehouse Indian operations — GST/TDS/PT compliance, branch-level permissions, and custom Frappe apps that give management real-time visibility.

Keep reading

Get real-time secondary sales visibility in ERPNext

Book a free distribution & secondary-sales consultation. We deploy ERPNext on infrastructure you own — no per-user licence fees.

Book a consultation
0 0
Published on 7 June 2026

Manoj

Comments

No comments yet. Start a new discussion

Ctrl+Enter to add comment