Skip to content
DipanshuTechBuilding Digital. Driving Growth.
Software & Enterprise Technology

GST e-invoicing and e-way bill in your ERP: how it works

How an ERP gets an IRN and signed QR code from the IRP, when an e-way bill is needed, and what to check before you trust any vendor's GST integration.

DipanshuTech TeamEngineering & Strategy
Published
Updated
Reading time
6 min

Your ERP builds each B2B invoice as JSON in the government's e-invoice schema and sends it to an Invoice Registration Portal (IRP), either directly or through a GST Suvidha Provider (GSP). The IRP returns a 64-character Invoice Reference Number (IRN), a digitally signed QR code and an acknowledgement number, which must appear on the invoice. Add vehicle details and the same call can create the e-way bill.

The concept is simple. The trouble is in the edges: an invoice edited after it got its IRN, a portal timeout at month-end, a godown transfer nobody realised needed an e-way bill. This guide walks through how the integration works inside an ERP, where it breaks, and what to ask a vendor before you rely on it.

Who has to generate e-invoices?

E-invoicing applies to businesses whose aggregate annual turnover crossed ₹5 crore in any financial year from 2017-18 onwards. That threshold has been lowered in stages since 2020, so check the current GSTN notification before relying on any number, including this one.

It covers B2B invoices, credit and debit notes, exports and supplies to SEZs. Plain B2C invoices are not e-invoiced. Some sectors are exempt, including banks, insurers and NBFCs, goods transport agencies, passenger transport services, multiplex cinemas and SEZ units.

A newer rule on reporting time limits catches businesses out. Taxpayers above a turnover threshold must report invoices to the IRP within 30 days of the invoice date, and the portal rejects older ones. When the rule began, the threshold was ₹10 crore; confirm the current figure with your CA.

How does the ERP talk to the IRP?

There are three practical routes:

  • Manual upload. The ERP exports invoice JSON, someone uploads it on the portal, and downloads the IRN and QR. Workable for a few invoices a week, painful beyond that.
  • Direct API with the IRP. Available to taxpayers who meet the IRP's eligibility criteria for direct access. Your ERP calls the IRP's API with credentials you create on the portal.
  • Through a GSP. The common route for SMEs. The GSP holds the connection to the IRP; your ERP calls the GSP's API with your credentials. GSPs charge their own fees, usually per invoice or per year.

Whichever route you use, the call itself follows the same pattern: authenticate and receive a session token that expires after a few hours, encrypt the invoice payload, send it, and decrypt the response.

What happens to one invoice, step by step?

  • Save. A billing clerk saves the invoice in the ERP.
  • Validate. Before sending, the ERP checks the buyer's GSTIN format and state code, HSN codes, place of supply, tax type (IGST versus CGST plus SGST), and totals that round the way the IRP expects.
  • Build. It creates the JSON in the schema version the IRP currently accepts.
  • Send. It posts the request and receives the IRN, acknowledgement number and date, the signed invoice and the signed QR code.
  • Store and lock. It saves all of that against the invoice, prints the QR on the PDF, and blocks further edits.
  • Report. The IRP passes the invoice data to the GST system, where it appears in your GSTR-1 for review.

The IRN is generated from your GSTIN, the financial year, the document type and the invoice number. That means a given invoice number can only be registered once in a financial year. If your ERP lets someone reuse a number, the IRP will reject it.

Never let users edit an invoice after its IRN is issued. The printed QR would no longer match the data the government holds. An IRN can be cancelled on the IRP within 24 hours, after which a correction has to go through a credit note or an amendment in GSTR-1. Partial cancellation is not allowed.

What goes wrong, and how should the ERP handle it?

  • The IRP or GSP is slow or down. The ERP should queue the request and retry automatically, show the invoice as "IRN pending", and stop it from being printed as final. Staff should never retype invoices on the portal while the ERP keeps trying.
  • Validation errors. A wrong GSTIN or an HSN code the IRP does not accept should be caught before sending, with a message a billing clerk understands.
  • Duplicate submission. If a timeout hides a successful call, the retry will be told the IRN already exists. The ERP should fetch the existing IRN by document number rather than fail.
  • Token expiry. The ERP should refresh the session token on its own, not ask the user to log in again.

In ERPSetu's wholesale pack, invoices are converted to the IRP schema and every attempt is logged in an IRN record with retries. The last hop needs a GSP account in the client's own name, which is why it is a per-client step and not something that comes switched on. More on how the platform is put together in the ERPSetu case study.

When do you need an e-way bill?

An e-way bill is generally needed when goods worth more than ₹50,000 move by road, whether on a sale, a return, a stock transfer or a job-work dispatch. Some states set different limits for movement within the state, so check yours.

It has two parts. Part A holds invoice and consignment details; Part B holds the vehicle number or transporter ID. For e-invoiced businesses, the e-way bill can be generated from the IRN, either in the same request (when you send transport details along) or later once the vehicle is known.

Validity depends on distance: for normal cargo, one day for every 200 km or part of it. If the vehicle changes on the way, Part B must be updated. An e-way bill can be cancelled within 24 hours if the goods did not move.

Situations an ERP should flag automatically:

  • Godown transfers. A Noida distributor moving stock between its three godowns under a delivery challan still needs an e-way bill above the threshold, even though no sale took place.
  • Job work. A Surat textile unit sending fabric to a dyeing house in another state needs an e-way bill for that movement even below ₹50,000.
  • Multiple invoices on one truck. A consolidated e-way bill groups them for the transporter.

What should you ask your ERP vendor?

  • Which IRP route does the integration use (direct or GSP), and who holds the credentials?
  • Which schema version does it send, and who updates it when the IRP changes?
  • Does it validate GSTIN, HSN and place of supply before sending?
  • What happens when the IRP is down at 6 pm on the last day of the month?
  • Is the invoice locked after the IRN is issued?
  • Can it generate e-way bills from the IRN, and for stock transfers and job work?
  • Can it show me a log of every IRP request and response for an invoice?

Our GST billing product, AccVora, shows how a billing tool for Indian SMEs handles GST invoices, returns and godown transfers day to day.

Frequently asked questions

Is e-invoicing required for B2C invoices?

No, ordinary B2C invoices are not e-invoiced. Very large businesses have a separate dynamic QR code requirement for B2C invoices.

Do I still have to file GSTR-1 if I e-invoice?

Yes. E-invoice data flows into GSTR-1 automatically, but you still review it, add anything not covered (such as B2C sales) and file.

Can I cancel an e-invoice after a week?

Not on the IRP. Cancellation is possible only within 24 hours. After that, issue a credit note or amend the details in GSTR-1.

Do I need a GSP?

Not if you qualify for direct API access or generate few enough invoices to upload them manually. Most SMEs that want e-invoicing inside their ERP use a GSP.

Can my billing software generate the IRN offline?

No. An IRN only exists once the IRP issues it. Offline billing software can queue the request and complete it when the connection returns, but the invoice is not valid as an e-invoice until then.

What should you do now?

Pull last month's B2B invoices, stock transfers and job-work challans, and check which needed an IRN or an e-way bill. That list is the specification your ERP has to meet. If you want it built into your system properly, start with our ERP development service.

Key takeaways

  • Your ERP sends invoice JSON to an IRP and must store the IRN, signed QR and acknowledgement it returns.
  • Lock an invoice once its IRN is issued; corrections go through cancellation within 24 hours or a credit note.
  • Queue and retry failed IRP calls instead of letting staff re-enter invoices by hand.
  • Stock transfers and job-work movements can need e-way bills even inside one GSTIN.

Ready to put this into practice?

Let’s build the solution that gets you there.

Talk to Our Experts