What e-invoicing (IRN) means for your store
E-invoicing is the mandatory reporting of B2B invoices to the Invoice Registering Portal (IRP) run by NIC. Each eligible invoice is submitted as a signed JSON payload and receives a 64-character Invoice Reference Number (IRN) plus a signed QR code that must appear on the printed invoice. Bharat GST Invoice implements the NIC e-invoice API (v1.03) end to end: payload building, authentication, IRN generation, cancellation and the QR block on the PDF.
Enabling e-invoicing safely
Turn the feature on under WooCommerce > Bharat GST > E-invoicing. The plugin ships with three environments. Mock mode needs no credentials and produces a deterministic fake IRN and QR payload locally — perfect for verifying the whole flow before touching the portal. Sandbox connects to the NIC sandbox with your trial credentials. Production is the live IRP. Credentials (endpoint, client ID/secret, username, password) live on the same settings screen, and the auth token is cached for an hour to avoid needless re-authentication.
Which invoices get an IRN
Eligibility is straightforward: an issued tax invoice with a buyer GSTIN (B2B), a configured seller GSTIN and a non-zero total. Invoices without a buyer GSTIN — everyday B2C retail — are not eligible and are simply skipped. With auto-generate enabled, the IRN is requested the moment the invoice is issued; otherwise the Generate IRN button in the order metabox does it manually. Every attempt is written to the audit log.
What happens after a successful IRN
The IRN, acknowledgement number, acknowledgement date and signed QR payload are stored on the invoice row, and the invoice PDF is regenerated automatically — it now shows an IRN block and the signed QR code. Cancelling an IRN (within the portal's 24-hour window) marks the row cancelled in mock and sandbox mode locally; on production the cancel request goes to the IRP first. A cancelled IRN can be regenerated if you need to re-file the document.
Testing the flow without credentials
Keep the environment on mock, place a B2B test order with a valid-format GSTIN, and complete it. You should see the IRN appear on the invoice within seconds, the QR block on the PDF, and the IRN count go up on the GST Dashboard. When you are satisfied, request NIC sandbox credentials, switch the environment, and run one more test before going live.
Wasim Akram digitalwasim.com buy the developer a coffee