FinchContext
Run with

Generate GST E-Invoice IRN JSON (NIC INV-01 Schema)

Skill: Convert invoice data into the IRP e-invoice JSON to obtain an IRN + signed QR

Region: India Category: E-Invoicing — GST e-invoicing Does: Takes ordinary B2B/export/SEZ invoice data and produces the NIC e-invoice JSON (the GST INV-01 schema) submitted to the Invoice Registration Portal (IRP), which returns a 64-character IRN (Invoice Reference Number), a digitally signed QR code, and an Ack No/Ack Date. Standard: GST e-invoice schema (Notification 60/2020-CT, GSTN/NIC INV-01)

E-invoicing is mandatory for registered taxpayers whose aggregate turnover crosses the notified threshold (currently ₹5 crore in any prior financial year) for B2B, exports, SEZ, and credit/debit notes — not for B2C. The IRP only registers the invoice and signs it; you still file GSTR-1 (e-invoices auto-populate it). Schema versions and master code lists change — always validate against the current GSTN/NIC INV-01 schema and the e-invoice sandbox before going live.


When this applies


Input data required

Group Fields
Transaction (TranDtls) tax scheme (GST), supply type code (B2B, SEZWP, SEZWOP, EXPWP, EXPWOP, DEXP), reverse charge flag
Document (DocDtls) type (INV/CRN/DBN), document number, document date (dd/mm/yyyy)
Seller (SellerDtls) GSTIN, legal name, address, location, PIN, state code
Buyer (BuyerDtls) GSTIN (URP for unregistered exports), legal name, place of supply (POS), address, PIN, state code
Item list (ItemList) per line: description, HSN/SAC code, quantity, unit (UQC), unit price, taxable value, GST rate, CGST/SGST/IGST/Cess amounts, total item value
Value details (ValDtls) assessable value, CGST/SGST/IGST/Cess totals, round-off, total invoice value

Document structure (INV-01 JSON)

{
  "Version": "1.1",
  "TranDtls":  { SupTyp, RegRev, IgstOnIntra },
  "DocDtls":   { Typ, No, Dt },
  "SellerDtls":{ Gstin, LglNm, Addr1, Loc, Pin, Stcd },
  "BuyerDtls": { Gstin, LglNm, Pos, Addr1, Loc, Pin, Stcd },
  "ItemList":  [ { SlNo, PrdDesc, IsServc, HsnCd, Qty, Unit, UnitPrice,
                   TotAmt, AssAmt, GstRt, IgstAmt, CgstAmt, SgstAmt, CesRt, CesAmt, TotItemVal } ],
  "ValDtls":   { AssVal, CgstVal, SgstVal, IgstVal, CesVal, RndOffAmt, TotInvVal }
}

Key rules: IsServc is Y for SAC (services) / N for HSN (goods). State code Stcd is the 2-digit GST state code (the same first two digits of the GSTIN). For intra-state supply, charge CgstAmt + SgstAmt; for inter-state supply (seller state ≠ POS), charge IgstAmt. Money fields are decimals; the IRP recomputes and rejects mismatches beyond the tolerance (±₹1 on item totals).


Calculation rules


Worked example (B2B intra-state, single line — request payload)

{
  "Version": "1.1",
  "TranDtls": { "TaxSch": "GST", "SupTyp": "B2B", "RegRev": "N", "IgstOnIntra": "N" },
  "DocDtls": { "Typ": "INV", "No": "INV-2025-0042", "Dt": "04/06/2025" },
  "SellerDtls": {
    "Gstin": "29AABCU9603R1ZM", "LglNm": "Acme Components Pvt Ltd",
    "Addr1": "12 Industrial Layout", "Loc": "Bengaluru", "Pin": 560058, "Stcd": "29"
  },
  "BuyerDtls": {
    "Gstin": "29AAACR5055K1Z5", "LglNm": "Nilgiri Traders",
    "Pos": "29", "Addr1": "5 MG Road", "Loc": "Bengaluru", "Pin": 560001, "Stcd": "29"
  },
  "ItemList": [
    {
      "SlNo": "1", "PrdDesc": "Steel bracket", "IsServc": "N", "HsnCd": "73269099",
      "Qty": 100, "Unit": "NOS", "UnitPrice": 150.00,
      "TotAmt": 15000.00, "AssAmt": 15000.00,
      "GstRt": 18.0, "IgstAmt": 0.00, "CgstAmt": 1350.00, "SgstAmt": 1350.00,
      "CesRt": 0, "CesAmt": 0.00, "TotItemVal": 17700.00
    }
  ],
  "ValDtls": {
    "AssVal": 15000.00, "CgstVal": 1350.00, "SgstVal": 1350.00,
    "IgstVal": 0.00, "CesVal": 0.00, "RndOffAmt": 0.00, "TotInvVal": 17700.00
  }
}

The IRP responds with the registration result — the IRN, signed invoice (JWT), and signed QR:

{
  "AckNo": 112010033456789,
  "AckDt": "2025-06-04 11:32:00",
  "Irn": "a1b2c3d4e5f60718293a4b5c6d7e8f90112233445566778899aabbccddeeff00",
  "SignedInvoice": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
  "SignedQRCode": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
  "Status": "ACT"
}

Print the IRN and embed the SignedQRCode on the physical/PDF invoice.


Validation checklist


Last updated: 2026-06-04 — confirm the active schema version, field codes, and portal/API requirements against the current GSTN / NIC (einvoice1.gst.gov.in) specifications before use.