Disclaimer: Independent educational project. Not affiliated with Finkraft.ai. Built by Kaushal Khodifad. Data from public sources; figures are estimates.return to portfolio
Disclaimer: Independent educational project. Not affiliated with Finkraft.ai.
Module 4 / 7Mock IRP

E-invoicing.

Build an invoice payload, generate a deterministic mock IRN against a simulated NIC IRP, render a mock-signed QR. Every generated row is persisted with its payload so the recon engine can later match it back to GSTR-1. Only the IRP issues real IRNs - production wiring is a one-file swap behind generateMockIrn.

Real vs simulated in this module
Real
  • Payload builder - schema-shaped e-invoice JSON assembled in-process
  • Persistence + 24h cancel window - e-invoice rows and the 24-hour IRP cancellation-window logic are real
Simulated
  • IRN value - a demo hash for idempotency only - NOT the IRN NIC would register; the real IRN is computed and signed server-side by the IRP
  • NIC IRP call - mocked - no live Invoice Registration Portal round-trip
  • Digital signature - QR payload is a MOCK-SIGNED stand-in, not a GSP-signed JWS

A locally computed hash is never a legally valid IRN - only the IRP issues those. This module demonstrates the payload, persistence and lifecycle plumbing; production swaps generateMockIrn for a credentialed GSTN-authorised IRP/GSP call (e.g. Cygnet) that returns the registered IRN and signed QR.

Mock IRP · NIC schema

Generate an IRN

Supplier GSTIN
Recipient GSTIN
Invoice number
Invoice date
Taxable value (₹)
HSN / SAC
CGST (₹)
SGST (₹)
IGST (₹)
Total
59,000
Waiting
Click Generate IRN to call the mock NIC IRP. Returns a 64-char hex IRN, signed QR payload, ack number and date. The real wiring (replace generateMockIrn with callIrpGenerate) is one file change.

↑ Independent educational project by Kaushal Khodifad. Finkraft.ai is a real company in the enterprise GST compliance and reconciliation space; this design and the underlying prototype were built by Kaushal as a portfolio study. Not affiliated with, endorsed by, or representative of Finkraft.ai's actual product. Data is from public sources. Figures are estimates.

Return to portfolioOpen the live demo