Skip to content
Code Colonies

Solutions · Guide

Connecting your software to GST e-invoicing and e-way bills

If your invoices come from an ERP, a billing app or a custom system, it must talk to the IRP and the e-way bill portal reliably. How the integration works and what to watch.

Code Colonies Technology Division · · 4 min read

Key takeaways

  • Most businesses should integrate through a GSP or IRP API
  • Validate invoices in your own system before they reach the IRP
  • Design for failures, cancellations and portal downtime from the start

Once your turnover crosses the notified threshold, every B2B invoice needs an Invoice Reference Number from an Invoice Registration Portal before it is valid. If you also move goods above the e-way bill limit, each consignment needs an e-way bill. For a business raising a few invoices a day, the free web tools are enough. For anyone billing from an ERP, a dealer system or a custom application, the integration needs to be built properly.

What your billing system must do

Your billing system should send each invoice to an IRP through an API, receive the IRN and signed QR code back, print them on the invoice, and generate the e-way bill from the same data where goods move. Most businesses do this through a GST Suvidha Provider or directly with one of the authorised IRPs. The hard parts are data quality, error handling and cancellations. The API call itself is simple.

How the flow works

  1. Your system creates the invoice and converts it to the e-invoice JSON schema.
  2. It sends the JSON to an IRP, authenticated with credentials linked to your GSTIN.
  3. The IRP validates it, checks for duplicates, generates the IRN and returns a digitally signed invoice and QR code.
  4. Your system stores the IRN, acknowledgement number and date, and prints the QR code on the invoice.
  5. If goods are moving, your system requests an e-way bill using the IRN, adding the transport details for Part B.
  6. The invoice details flow on to the GST portal and populate the relevant part of your GSTR-1.

There are several authorised IRPs, including the NIC portal and a number of private ones. They follow the same schema, and you can register with more than one as a fallback.

Direct, through a GSP, or through your ERP

Through your ERP's built-in connector. TallyPrime, SAP Business One, Odoo with Indian localisation and most billing apps offer this, often through a partner GSP. If your invoices all come from one standard system, start here.

Through a GSP. Providers such as ClearTax, IRIS, Cygnet, Masters India and others offer APIs that sit between your software and the IRP and e-way bill system. They add useful things: retries, bulk operations, dashboards and a single integration for e-invoice, e-way bill and returns. This suits custom systems and multi-GSTIN businesses.

Direct API access. Possible for larger taxpayers who meet the eligibility conditions. It removes the middle layer but makes you responsible for security, certificates and changes to the specification.

Validate before you send

Most IRP rejections are avoidable data errors. Build checks into your own system so problems are caught when the invoice is created, well before the truck is waiting.

  • Buyer GSTIN format and status. An inactive or cancelled GSTIN will fail.
  • HSN codes at the right number of digits for your turnover.
  • State codes and place of supply consistent with IGST versus CGST and SGST.
  • Totals that match line items within the allowed rounding.
  • Pincodes valid for distance calculation on the e-way bill.
  • Document numbers unique within the financial year. The IRP rejects duplicates.

Design for things going wrong

Portal or GSP downtime. It happens. Decide in advance what your dispatch team does: queue and retry automatically, switch to a second IRP, or hold dispatch. Do not let staff work around it by printing invoices without an IRN.

Cancellations. An IRN can be cancelled only within a short window after generation, and not if an active e-way bill exists against it. After that window, corrections go through credit and debit notes. Your software should block a cancellation that is no longer possible and offer the right document instead.

Time limits. Larger taxpayers face a deadline for reporting invoices to the IRP after the invoice date. Check the current rule for your turnover band and add an alert for invoices that have not been registered.

E-way bill validity. Validity depends on distance and is extended through the portal if the vehicle is delayed. Transporters need a way to update vehicle numbers, so give them access or a process.

Security and access

E-invoice API credentials can create legal tax documents in your name. Store them in a secrets manager. Restrict which users can trigger cancellations. Keep a log of every request and response, with the user who triggered it, for audits and for reconciling with GSTR-1 and the Invoice Management System.

A realistic plan

For a custom billing system connecting through a GSP, a typical sequence is one week to map data and build validations, one week to integrate and test in the sandbox, and a week of parallel running with a small set of real invoices. Multi-GSTIN businesses and those with complex transport arrangements take longer. Test cancellations, credit notes, exports and reverse charge invoices as well as the simple domestic sale.

Have a question about this guide? Write to us or ask Colony, our AI guide.

Start a conversation

Tell us what you are trying to build.

Share the problem in a short call. You leave with a clear view of the approach, the team and the cost.

Or get a ballpark proposal in two minutes

A specialist replies within one working day. The first conversation is free.

Chat with the Code Colonies team on WhatsApp