Common IRN and e-invoice API errors
1 min read
Updated 03 Oct 2026
3 views
AI summary
What each common IRP validation and API error means and how to fix it.
2 sections
Validation errors (the data is wrong)
| Error meaning | Usual fix |
|---|---|
| Duplicate IRN (2150) | Fetch the existing IRN, or use a new number |
| Cancellation time limit crossed (2270) | Issue a credit note instead |
| Buyer or supplier GSTIN invalid / not active / cancelled | Check GSTIN status on the portal; correct the master |
| Document date is in the future, or older than the allowed limit | Correct the date; report within 30 days if AATO ≥ ₹10 crore |
| Invalid HSN code | Use a valid 4/6/8-digit HSN from the GST master |
| Tax rate not as notified | Use a valid GST rate (0, 0.1, 0.25, 1.5, 3, 5, 12, 18, 28, 40 etc.) |
| Place of supply / state code mismatch with CGST-SGST or IGST | Same state = CGST+SGST; other state, SEZ or export = IGST |
| Item or invoice totals don't add up | Round each line to 2 decimals; total = sum of lines ± round-off |
| Buyer PIN does not match the buyer's state | Correct the PIN; exports use 999999 |
API / connection errors (the call is wrong)
- Invalid credentials / user not authorised: API user must be created on the IRP and linked to your GSP or ERP.
- Auth token expired: tokens are valid for a few hours; request a new one and retry.
- Decryption failed / invalid SEK: the session key has changed; authenticate again.
- JSON schema validation failed: a mandatory field is missing or has the wrong type or length.
- IP not whitelisted (direct API users): register your server IP on the IRP.
- Timeout: don't blindly regenerate; first fetch the IRN by document number to avoid duplicates.
Save the full error text with the invoice. Most errors repeat, so a one-line fix note saves hours next month.
Sources
PreviousInvoice number rules and duplicate IRN Next in E-Invoice Forgot to generate an e-invoice? Consequences and how to fix it
Was this guide helpful?