Figment Global Solutions
API

e-Invoice API Errors and Fixes: Common IRP Error Codes Explained

Common e-invoice API errors explained: IRP error codes 2150, 2172, 2176, 2189, 2240, 3028 and more, with causes, fixes and a checklist to prevent rejections.

Figment Global Solutions logoFigment Global Solutions 7 min read
Sample tax invoice rejected by the IRP with e-invoice API errors 2265 state code mismatch, 2176 invalid HSN code and 2172 IGST on an intra-state supply

e-Invoice API errors stop an invoice from getting its Invoice Reference Number (IRN). Without an IRN, a B2B invoice from a business under e-invoicing is not a valid tax invoice, the e-way bill cannot be generated from it, and the goods may have to wait at the dock. Most rejections come from a small set of causes: wrong HSN codes, tax-type mismatches, totals that do not add up, GSTIN problems and duplicate submissions.

This guide lists the most common IRP error codes, what causes them and how to fix them, plus the process controls that stop them from recurring.

How IRP validation works

When your ERP or GSP sends an invoice to an Invoice Registration Portal (IRP), the IRP checks it against the e-invoice schema (FORM GST INV-01) and a set of business rules before generating the IRN. If any check fails, the IRP returns an error code and message instead of the IRN. Validations and error codes are common across all six IRPs (NIC IRP-1, NIC IRP-2, Cygnet, Clear, EY and IRIS), so the same fix works whichever IRP your provider uses.

Errors fall into four groups:

  • Duplicate and registration errors: the document already has an IRN
  • Tax and value errors: tax type, rate or totals are wrong
  • Party errors: GSTIN, state code or status problems
  • Technical errors: authentication, sessions or malformed data

Common e-invoice API error codes and fixes

CodeMessage (as returned by the IRP)Usual causeFix
2150 Duplicate IRN The same invoice was sent again after an IRN was already generated, often after a timeout Do not re-post. Fetch the existing IRN with the get-IRN-details API and store it against the invoice
2295 IRN is already generated and registered with GSTN Lookup Portal by other IRP The same invoice was sent to two different IRPs Use one IRP per document. Fetch the existing IRN
2172 For intra-state transactions, IGST amounts are not applicable, only CGST and SGST amounts are applicable IGST charged where supplier and place of supply are in the same state Apply CGST and SGST, unless the supply is one where IGST applies by law (such as SEZ supplies)
2176 Invalid HSN code(s) HSN code not in the IRP's master, or wrong number of digits Correct the HSN in the item master. Check it on the e-invoice portal's HSN search
2240 Invalid GST rate for HSN Rate does not match the HSN, or the rate list in the ERP is out of date Update the item master. Rates changed for many goods from 22 September 2025, so check older masters
2182 The taxable value of all items must be equal to the total taxable value Sum of line taxable values differs from the invoice-level taxable value Recalculate totals from line items before posting. Check rounding
2189 Invalid total invoice value Invoice total does not equal items plus other charges, less discount Recalculate. The IRP allows only a small rounding tolerance
2211 Supplier and recipient GSTIN should not be the same Same GSTIN entered for both parties Correct the recipient. A GSTIN cannot issue an e-invoice to itself
2212 The recipient GSTIN cannot be URP for supply type B2B "URP" (unregistered person) used on a B2B invoice Enter the buyer's actual GSTIN, or treat it as a B2C invoice
2265 Recipient GSTIN state code should be the same as the state code passed in recipient details First two digits of the buyer's GSTIN do not match the state code in the address Correct the state code in the customer master
3028 GSTIN is not present in invoice system Recipient GSTIN not found in the e-invoice system, often a new registration Verify the GSTIN. Use the sync-GSTIN API or the e-invoice portal to update it, then resubmit
3029 GSTIN is not active Recipient GSTIN is cancelled or suspended Confirm status with the buyer. Do not invoice a cancelled GSTIN as B2B
5002 Validation Error – Invalid Reference Data Bad or incomplete reference data in the payload Check optional reference fields and master data; update the software if it sends old field formats

Messages are shown in plain form. The exact wording can vary slightly between IRPs and providers, and some messages include the item serial number or HSN code.

Errors that are not code-specific but cause most delays

The 30-day reporting limit

From 1 April 2025, taxpayers with an aggregate annual turnover (AATO) of ₹10 crore and above cannot report a document to the IRP more than 30 days after its date. This applies to invoices, credit notes and debit notes. GSTN announced it in an advisory dated 5 November 2024. An invoice that is rejected and left unfixed for weeks may become impossible to register, so every rejection needs an owner and a deadline.

Cancellation after 24 hours

An IRN can be cancelled on the IRP only within 24 hours of generation, and only in full. Partial cancellation is not allowed, and the same document number cannot be used again for a new IRN. If an e-way bill has been generated for the IRN, the IRN cannot be cancelled while it is active. After 24 hours, issue a credit note or amend the details in GSTR-1.

Expired tokens and sessions

API calls are authenticated with a time-limited token. If your connector does not refresh it, every call fails at once, usually in the middle of a billing run. The fix belongs in the connector, not with the billing team: refresh the token automatically before expiry.

Case-sensitive invoice numbers

From 1 June 2025, the IRP treats invoice numbers as case-insensitive. "inv/001" and "INV/001" count as the same number, so a re-used number in a different case triggers a duplicate.

RCM self-invoices from 1 January 2027

New supply types RCMDOM and RCMIMP come into force for e-invoicing of RCM self-invoices on 1 January 2027. Test them before then to avoid supply-type errors. See our guide on e-invoicing for RCM self-invoices.

Prevention checklist

#ControlStops
1 Validate HSN codes and rates in the item master after every rate change 2176, 2240
2 Derive tax type (IGST or CGST/SGST) from supplier state and place of supply, not by hand 2172
3 Calculate totals from line items, with consistent rounding 2182, 2189
4 Verify customer GSTIN, status and state code at onboarding and before invoicing 2211, 2212, 2265, 3028, 3029
5 On timeout, fetch the IRN status before retrying 2150, 2295
6 Keep invoice numbering unique regardless of upper or lower case 2150
7 Assign every rejected invoice to an owner, with a fix deadline well within 30 days 30-day limit
8 Refresh API tokens automatically Authentication failures

How Figment's e-Invoice API handles errors

Figment's e-Invoice API is provided by Figment Global Solutions as a GSTN-authorised GSP. It covers IRN generation, bulk IRN generation, IRN cancellation, e-invoice lookup, rejected IRN, IRP GSTIN details, e-way bill by IRN and B2C dynamic QR. Two design points reduce the errors above:

  • Queued retries with no duplicates: timed-out calls are retried without registering the same invoice twice
  • Multi-IRP routing: e-invoices are routed across two or more IRPs, so a slow IRP does not hold up invoicing

To catch party errors before invoicing, the GSTIN verification API checks a customer's GSTIN and status. The API works with SAP ECC and S/4HANA, Oracle, Microsoft Dynamics 365, Tally Prime and in-house ERPs, with sandbox access for testing error cases before go-live. See the GST API integration page to request a sandbox, or the GSP APIs page for the full list.

Key takeaways

  • Most e-invoice API errors come from HSN codes, tax type, totals, GSTIN data and duplicate submissions.
  • Never re-post after a timeout. Fetch the IRN status first.
  • Fix rejections quickly: businesses with AATO of ₹10 crore and above cannot report documents older than 30 days.
  • IRN cancellation is full only and within 24 hours. After that, use a credit note or GSTR-1 amendment.
  • Most errors are prevented by clean masters and controls in the connector.

Frequently Asked Questions

An IRN has already been generated for the document. Do not resubmit it. Fetch the existing IRN and attach it to the invoice.

Share this article

Compliance support

Need Help with Compliance?

Tell us which returns are hurting.

Our team will walk through it with you...