GST and e-invoicing integration in custom business software
What should you know about GST e-invoicing integration when building custom business software?
GST compliance means e-invoice generation via the IRP, e-way bills and returns data, built into the finance module. The integration is a small amount of API work and a large amount of data discipline: every invoice must carry the fields the schema demands, and the IRN and QR code must be stored, printed and reconciled.
GST e-invoicing integration is the part of a custom ERP, CRM or billing system that Indian buyers ask about first, and it is less mysterious than it sounds. A registered business above the turnover threshold must report each B2B invoice to an Invoice Registration Portal, receive an Invoice Reference Number and a signed QR code, and print both on the invoice. E-way bills cover the movement of goods. Returns are filed from data the same invoices produce. This article sets out how the integration is built into a finance module, what goes wrong, and how to keep the system compliant as rules change.
What GST compliant software actually has to do
Three obligations drive the design. First, e-invoicing: for businesses above the notified turnover threshold, which has been lowered several times, every B2B invoice, credit note and debit note must be registered with the IRP before it is valid. The portal validates the document against the e-invoice schema, generates the IRN, signs the payload and returns a QR code. Second, e-way bills: goods movements above the value limit need an e-way bill, which can be generated from the e-invoice data. Third, returns: outward supplies reported through e-invoicing flow into the return filings, so the numbers in your system and the numbers on the portal must reconcile.
The rules are set by the GST Council and published on the official portals; software must follow them, not interpret them. The GST e-invoice portal is the primary source for the schema and API specification, and any build should be checked against it rather than against a summary.
IRP integration: the two routes
| Approach | How it works | Suits | Watch for |
|---|---|---|---|
| Direct IRP API | Your software registers as an API user and calls the IRP directly for authentication, IRN generation, cancellation and e-way bill | Larger taxpayers who meet the eligibility criteria and have engineering capacity | Credential management, IP whitelisting, sandbox testing, keeping up with schema versions |
| Through a GSP or ASP | Your software calls a GST Suvidha Provider's API, which wraps the IRP and often adds validation, retries and returns filing | Most mid-sized businesses; faster to integrate, one vendor for e-invoice, e-way bill and returns | Per-invoice or subscription pricing, vendor dependency, data passing through a third party |
| Manual upload | Export JSON from the system and upload through the portal's bulk tool | Very low volumes or a fallback during outages | Not automation; error-prone and slow at scale |
For most clients we recommend a GSP or ASP route in phase one, with the integration built behind an interface in our code so the provider can be swapped or replaced with direct API access later. That decision is the same abstraction discipline we apply to any API integration.
Building e-invoicing into the finance module
The integration sits at the point where an invoice is finalised. The sequence is: the user posts the invoice; the system validates every mandatory field locally against the schema; the payload is sent to the IRP or provider; the IRN, acknowledgement number, date and signed QR code are stored against the invoice; the printed or emailed invoice carries the IRN and QR code. Only then is the invoice marked as issued. If registration fails, the invoice stays in a pending state with the error shown to the user, and nothing is sent to the customer.
Data discipline is most of the work
The IRP rejects invoices for reasons that have nothing to do with APIs: a buyer's GSTIN that does not match their state code, an HSN code with the wrong number of digits, a unit of measure not in the permitted list, a tax rate that does not match the HSN, rounding that does not reconcile. Every one of those is a master-data problem. The build therefore includes validation on the customer, item and tax masters, so the error is caught when the record is created rather than when the invoice is posted at 6pm on the last day of the month.
Cancellation and amendments
An e-invoice can be cancelled on the IRP only within a short window after generation; after that, corrections are made through credit or debit notes, which themselves need registration. The software must enforce this: no editing of a registered invoice, a cancel action that calls the portal and records the result, and a credit-note flow that references the original IRN. Businesses used to editing invoices freely find this the biggest change, and the screens need to make the right path obvious.
E-way bill integration
For goods, the e-way bill is generated from the e-invoice data plus transport details: transporter ID or vehicle number, distance and mode. In a logistics or manufacturing ERP the transport details come from the dispatch module, so the e-way bill can be generated when the vehicle is assigned rather than typed in separately. Validity depends on distance, vehicle changes mid-journey need an update, and expiry needs an alert. We covered the dispatch side in logistics ERP: fleet, dispatch, settlements and reconciliation.
Returns data and reconciliation
Registered e-invoices are reflected in the outward-supply return on the portal. The problem is not filing; it is reconciliation. Invoices cancelled in the system but not on the portal, credit notes raised late, invoices registered by a provider but not saved locally after a timeout: each creates a mismatch that the accountant discovers at filing time. The build includes a reconciliation report comparing the system's registered invoices with the provider's or portal's data for the period, run weekly rather than monthly. The same discipline applies to purchase-side reconciliation, where supplier e-invoices are matched against your purchase records to support input tax credit claims.
Keeping the integration compliant over time
Schema versions change, thresholds change, and provider APIs change. The integration therefore needs a sandbox environment, a regression test that generates sample invoices of each type against it, and a Care Plan that includes monitoring of registration failures. When a change is announced, the test suite is updated and run before the effective date. Clients own the code and the provider account, so a change of partner does not put compliance at risk.
A worked example
A distributor building a custom billing and inventory system on top of its existing accounting package needed e-invoicing from day one, with several hundred B2B invoices a day across three branches. The build validated customer GSTINs and HSN codes at master-data entry, routed invoice registration through a GSP behind a swappable interface, and stored the IRN and QR code against each invoice with the printed format updated. A pending queue showed failures with plain-language reasons, and a cancel action enforced the portal's window. Weekly reconciliation compared system invoices with the provider's records and flagged the handful that had timed out mid-registration. The accounting package remained the statutory ledger, receiving posted invoices by integration, and the accountant's month-end reconciliation shrank to reviewing the exception list. The KYC document intelligence build shows a comparable approach to regulated data validation in a different sector.
Team and timeline
E-invoicing integration is usually a component of a wider build rather than a project on its own. It needs one engineer who has integrated with the IRP or a GSP before, a finance owner on the client side who knows the invoice types and edge cases, and the client's chartered accountant for sign-off on formats and reconciliation. Within an ERP and CRM development engagement, which starts at $28,000 / ₹18.4L, the finance module including e-invoice, e-way bill and reconciliation typically takes three to five weeks. As a standalone integration into existing software it is scoped as API development and integrations work from $7,000 / ₹4.4L. The pricing page lists Care Plans; the Essential plan is enough for monitoring registration failures and applying schema updates.
Before you start: a checklist
- Confirm whether your turnover brings you under e-invoicing, and from which date
- Decide between direct IRP access and a GSP or ASP, and open the sandbox account
- Audit customer GSTINs, HSN codes, units of measure and tax rates in the masters
- List every document type you issue: invoices, credit notes, debit notes, exports, SEZ supplies
- Agree the invoice print format with the IRN and QR code placement
- Define the pending-queue owner and the cancellation process
- Map where transport details for e-way bills come from
- Plan the weekly reconciliation report and who reviews it
Glossary
- IRP: Invoice Registration Portal, the government system that validates and registers e-invoices
- IRN: Invoice Reference Number, the unique identifier returned by the IRP for a registered invoice
- GSP / ASP: GST Suvidha Provider and Application Service Provider, authorised intermediaries offering API access
- HSN code: the classification code for goods, and SAC for services, mandatory on invoices
- E-way bill: the document required for the movement of goods above the value limit
- Input tax credit: GST paid on purchases that can be offset against GST collected on sales
Related reading
See custom ERP for manufacturing, subscription billing for SaaS in India and our modernisation services. The GST portal is the primary source for returns and thresholds.
Treat e-invoicing as a data-quality problem with a small API on the end, and build reconciliation in from the first invoice.
Frequently asked questions
Should we integrate directly with the IRP or use a GSP?
▾
Most mid-sized businesses should start with a GSP or ASP behind a swappable interface: faster to integrate, with e-way bill and returns support included. Direct access suits larger taxpayers with engineering capacity.
Can a registered e-invoice be edited?
▾
No. It can be cancelled on the portal only within a short window after generation; after that, corrections are made through credit or debit notes that reference the original IRN and are themselves registered.
How long does GST e-invoicing integration take?
▾
Three to five weeks as part of a finance module in an ERP and CRM build, or a similar period as a standalone integration into existing software, most of it spent on master-data validation and testing.