What this template emits
A JSON payload conformant to the National Informatics Centre (NIC) e-invoice schema, the format accepted by the Invoice Registration Portal (IRP) for India GST e-invoicing.
The IRP returns two things after registration:
- The IRN (Invoice Reference Number), a 64-character hex hash derived from the invoice payload, the supplier GSTIN, and the financial year.
- The signed QR code, a base64-encoded JSON Web Token carrying the IRN, the invoice metadata, and the IRP's signature.
The template emits the request payload with placeholder values where the IRP would substitute the IRN and signed QR. A production integration POSTs the payload to the IRP via the e-invoice API and embeds the returned IRN and QR onto the printable invoice.
Indic script rendering
GST applies across India. Many businesses prefer item descriptions and line notes in regional scripts: Hindi for Devanagari-speaking regions, Tamil for Tamil Nadu, Bengali for West Bengal, Gujarati for Gujarat, Marathi for Maharashtra, Punjabi for Punjab.
Most PDF tools built on DOMPDF, mPDF, or TCPDF cannot lay out complex Indic scripts correctly. Conjunct consonants, vowel positioning, and ligature substitution all fall outside their text-shaping capabilities. Even when the glyphs are present in the font, they are positioned wrong.
LightningPDF renders through Chromium, which uses the same HarfBuzz text-shaping engine as Chrome. Devanagari, Tamil, Bengali, Gujarati, Kannada, Telugu, Oriya, Gurmukhi, and Malayalam all render correctly out of the box. No font configuration, no shaping library.
Validation status
The NIC IRP JSON Schema is distributed only to portal-registered taxpayers. On 2026-06-03 we ran a structural conformance check against the 47 required fields and totals math defined in the published v1.1 spec. All 47 checks pass, including the Devanagari item description (Indic-script moat demo). Result file: test-results/validators/india/structural-checks.json.
Full IRP runtime validation (GSTIN format check, HSN code allowlist, state-code/POS routing) requires sandbox credentials we have not yet provisioned. Once provisioned, the IRN and signed QR (currently placeholders) will be populated from the IRP response.
The CGST / SGST / IGST split
Intra-state transactions split tax equally between CGST (Central GST) and SGST (State GST). Inter-state transactions use IGST (Integrated GST) instead. The template defaults to the intra-state CGST + SGST split. For inter-state, pass Stcd != Pos (state code differs from place of supply) and route the tax through IGST.
Frequently asked questions
Why JSON and not XML?
The NIC schema is JSON-native. Unlike Peppol BIS 3.0 (UBL XML), ZUGFeRD (CII XML), or ZATCA (UBL XML), the Indian IRP works in JSON. Schema validation, IRN generation, and QR signing all happen against JSON payloads. The visual leg is still a normal PDF.
What is the turnover threshold today?
GST e-invoicing applies to businesses with annual turnover above INR 5 crore (50 million). The threshold has stepped down over time from an initial INR 500 crore in 2020. Expect further reductions; the policy direction is universal e-invoicing.
What about the QR for B2C invoices?
B2C invoices over INR 500 require a dynamic QR code containing payment details (UPI ID, account number). This is a different QR from the IRP-signed QR. Both can coexist on the same invoice if your business serves both B2B and B2C.