๐งพ E-Invoice / IRP Setup (India)
This guide covers Ledgr's Indian e-invoicing flow โ connecting to the IRP (Invoice Registration Portal), generating IRN + QR code per invoice, GSTIN auto-lookup, customer PO threading, and the e-Way Bill workflow.
What is e-invoice / IRP?
The Indian government requires businesses above a turnover threshold to register every B2B invoice with the IRP (run by NIC) before issuing it. The IRP returns:
- IRN (Invoice Reference Number) โ 64-char hex hash, unique per invoice
- Ack No / Ack Date โ IRP's acknowledgement
- Signed QR Code โ must print on the invoice; scannable to verify authenticity
Ledgr handles all of this automatically once configured โ you save the invoice and a single click submits it.
Who needs e-invoicing?
Indian businesses with turnover above the GSTN threshold must file e-invoice for B2B sales. The threshold has progressively dropped:
- April 2022: โฅ โน20 crore turnover
- October 2022: โฅ โน10 crore
- August 2023: โฅ โน5 crore (current as of writing)
- Likely to drop further toward universal coverage
Even if you're below the threshold, voluntary e-invoicing is increasingly common โ your buyers may demand it, and it auto-flows your sales into GSTR-1, simplifying tax filing. Ledgr supports it either way.
The two submission paths
Ledgr supports both ways to submit to the IRP:
| Path | Best for | Setup complexity |
|---|---|---|
| NIC direct | Larger businesses with NIC sandbox/production credentials. Direct API call with AES/RSA encryption. No third-party intermediary fees. | High โ needs NIC user/password + private key + sandbox testing |
| GSP (GST Suvidha Provider) | Most SMBs. The GSP wraps NIC's API with simpler bearer-token auth. Pay GSP per-invoice or monthly. | Low โ base URL + bearer token, paste-and-go |
Initial setup
1. Verify your company GSTIN
Settings โ Company โ confirm your GSTIN is correct and matches your tax registration. The IRP rejects requests with mismatched seller GSTIN.
2. Enable e-invoice in Settings
Settings โ E-Invoice / E-Way Bill. The wizard asks which path you'll use:
If GSP (recommended for SMBs):
- Pick "GSP" from the dropdown.
- Fill Base URL โ your GSP's API endpoint (e.g.
https://gsp.cleartax.in/apiorhttps://api.sandbox.co.in/gst/eivital). - Fill Bearer Token โ the long string your GSP gave you.
- (Optional) Fill Username/Password if your GSP requires it for token refresh.
- Save.
If NIC direct:
- Pick "NIC Direct" from the dropdown.
- Fill NIC username + password (from NIC sandbox / production registration).
- Upload your NIC public key file (.pem) โ used for AES key encryption.
- Save. Ledgr will use AES/RSA encryption per NIC's spec on every submission.
3. Configure GSTIN lookup (optional but recommended)
The same GSP credentials usually work for the GSTIN lookup feature too โ Ledgr auto-fills contact details (legal name, trade name, address, status) from the GSTN portal when you click "Look up" on a contact's GSTIN.
GSTIN auto-lookup feature
Saves enormous data entry time when adding new B2B customers/vendors:
- CRM โ New Contact โ enter GSTIN.
- Click the Look up button next to the GSTIN field.
- Ledgr calls your configured GSP/NIC endpoint and fetches:
- lgnm โ Legal Name
- tradeNam โ Trade/Brand Name
- pradr.addr โ Principal Address (full)
- sts โ GSTIN status (Active / Cancelled / Suspended)
- Auto-fills contact name, company name, billing address fields. Only fills empty fields โ never overwrites your manual entries.
- Status banner: โ green for Active, โ amber for Cancelled / Suspended.
PAN auto-extract
Whenever you type or paste a GSTIN into the form, Ledgr extracts chars 3-12 as the PAN and auto-fills the PAN field (only if PAN is empty). Purely local โ no API call. Works offline.
Generating an e-invoice
The flow
- Create the invoice as normal (Sidebar โ Invoices โ New).
- Save. The invoice gets a number and posts journal entries.
- From the invoice's view page, click Submit to IRP.
- Ledgr builds the IRP payload (per NIC v1.1 schema), encrypts if NIC direct, and submits.
- On success, IRP returns IRN + Ack No + Ack Date + signed QR data. Ledgr saves all four to the invoice.
- The print PDF now shows the IRN at the top + scannable QR at the bottom-right.
Preview the payload (debugging)
From the invoice view, click Preview IRP Payload โ Ledgr shows the full JSON it would submit. Useful for:
- Verifying buyer GSTIN, address, line items
- Pre-flight check before clicking Submit
- Sharing with your tax consultant for review
Customer PO + RefDtls.OrdDtls
Wholesale and B2B invoices almost always reference the buyer's PO. NIC's e-invoice schema has a dedicated field for this โ RefDtls.OrdDtls.
How Ledgr handles it
- On the invoice form, fill Customer PO Number + Customer PO Date (both fields visible next to Subject).
- Save the invoice.
- When you submit to IRP, Ledgr auto-populates:
RefDtls.OrdDtls.OrdNo= your customer PO numberRefDtls.OrdDtls.OrdDt= your customer PO date (formatted dd/mm/yyyy)
- NIC requires both fields or neither โ Ledgr enforces this. If you fill only one, Ledgr drops both from the payload (NIC rejects partial OrdDtls).
August 2026 URP mandate (unregistered ship-to)
GSTN advisory effective 1 August 2026 requires ShipDtls.Gstin = "URP" for unregistered ship-to addresses. Ledgr handles this automatically:
- If buyer's contact has no GSTIN (i.e. unregistered) AND ship-to address differs from bill-to โ Ledgr sets
ShipDtls.Gstin = "URP"in the IRP payload. - For B2C/B2CL invoices to unregistered consumers, the InvType is auto-set to
B2C.
You don't need to do anything manually โ these mandates are baked into the payload builder. Just make sure unregistered customer records have GSTIN field empty (don't fake-fill with random text).
E-Way Bill
When you need it
For movement of goods worth โน50,000+ (โน1 lakh+ in some states), the E-Way Bill is mandatory. It's a separate document from the e-invoice but tightly related.
Submitting via Ledgr
The same GSP/NIC credentials usually work for EWB. On an invoice with goods (not services):
- Fill the Transport Details section: Vehicle No, Transporter ID, Transporter Name, Mode (road/rail/air/ship), Distance (km), Doc No + Date.
- Click Submit E-Way Bill.
- Ledgr submits the EWB payload to NIC/GSP. Returns EWB Number + EWB Date + validity period (auto-computed from distance).
- EWB info prints on the invoice.
Intentional skip workflow
Sometimes EWB isn't needed even though the value crosses the threshold:
- Hand-carry by the buyer (no transporter)
- Buyer self-collects (you're not moving anything)
- Private bus or shared transport (passenger luggage)
- Local delivery within same PIN code (some states exempt)
Ledgr captures these via two fields:
- eway_skipped โ checkbox, on the invoice form's Transport section
- eway_skip_reason โ free text ("Buyer self-collected", "Hand-carry", etc.)
This is purely audit-trail. You're documenting WHY you didn't generate an EWB so if questioned later (during a GST audit), you can defend the choice. Ledgr won't auto-block invoice generation just because the value crosses the threshold.
Common workflows
First-time setup checklist
- Confirm your company GSTIN is right.
- Sign up with a GSP (or get NIC sandbox creds).
- Settings โ E-Invoice โ paste credentials.
- Test with one sandbox/test invoice. Submit. Verify IRN comes back.
- Switch to production. Submit a real invoice. Verify QR scans correctly with any QR scanner app.
- From here on, every B2B invoice submission is one click.
Daily B2B billing
- Create invoice as normal. Add lines, tax, save.
- If buyer is registered (GSTIN present) and amount above โน500: click Submit to IRP.
- If goods movement above โน50k: also click Submit E-Way Bill (after filling transport details).
- Print or email the invoice โ IRN + QR + EWB info auto-included.
Bulk submission for invoices created earlier
If you created invoices but didn't submit to IRP at save-time:
- Sidebar โ Invoices โ filter by status & date range.
- For each unsubmitted invoice โ open โ Submit to IRP.
- Bulk submission UI is on the roadmap; for now it's per-invoice.
Cancelling an e-invoice
Per NIC rules, an e-invoice can be cancelled within 24 hours of generation (only if no EWB has been generated against it). After 24 hours: issue a Credit Note instead.
- Open the invoice. Note the IRN.
- Click Cancel E-Invoice.
- Ledgr submits the cancellation request to IRP. On success, the IRN is marked cancelled.
- The invoice in Ledgr is also marked cancelled (status='cancelled'), and journal entries are reversed.
Credit note for sales return
- From the original invoice โ Create Credit Note.
- Pick lines being returned, adjust qty.
- Save โ journal posted.
- Submit Credit Note to IRP โ gets its own IRN. Print with QR for the buyer.
FAQ โ E-Invoice specific
Do I need to e-invoice every single bill?
Only B2B (registered buyer with GSTIN) above the value threshold (typically โน500 net of tax). B2C, exempt items, financial services โ usually skip. Always confirm with your CA based on your industry.
Which GSP should I pick?
For SMBs in India, popular choices are: ClearTax, Cygnet, Sandbox-by-Quicko (developer-friendly), Webtel, IRIS. Compare:
- Per-invoice pricing (typically โน0.50-โน2 per IRN)
- Monthly subscription (some offer unlimited at ~โน500-2000/month)
- Bundled features (some include EWB, some include GSTR-1 auto-prep)
- Sandbox availability (essential for first-time setup)
What if my GSP is down โ can I still issue invoices?
Yes โ the invoice creates locally in Ledgr regardless. You'd just postpone the IRP submission. NIC allows up to 24 hours for submission with no penalty. If outage exceeds 24h, document it (screenshot, GSP status page) for audit defence.
Does Ledgr auto-prepare GSTR-1?
Ledgr generates a GSTR-1 summary report (Sidebar โ Reports โ GST โ GSTR-1) that you can copy/upload to the GST portal. Direct API submission to GSTR-1 is on the roadmap โ for now it's manual upload.
Can I submit credit/debit notes to IRP?
Yes โ same flow as regular invoices. Each gets its own IRN. NIC's schema treats them as separate document types (CRN/DBN).
What's the AES/RSA encryption for NIC direct?
NIC's direct API requires payload-level encryption: AES symmetric key for the data, RSA-encrypted with NIC's public key for the AES key. Ledgr handles this automatically when you pick "NIC Direct". You just provide username/password + the public key file.
What happens if I edit an invoice after submitting to IRP?
You shouldn't โ the IRN locks the invoice contents. Ledgr blocks edits after IRN is assigned. To change the invoice: cancel the IRN within 24h (then edit and re-submit), or after 24h issue a Credit Note + new invoice.
How do I handle export invoices?
Set the buyer's place of supply to a foreign country and don't include GSTIN. The InvType becomes EXPWP (with payment of tax) or EXPWOP (without). Ledgr auto-detects from the buyer's address.
Is there an offline mode for e-invoice?
Yes โ invoice creation in Ledgr is fully offline. The IRP submission step needs internet. If you create invoices offline, queue them; when internet returns, submit each one. NIC allows submission within 24h of invoice date with no penalty.
Multi-GSTIN business โ can I switch between GSTINs?
Each Ledgr install is one company with one primary GSTIN. For multi-GSTIN businesses (different states), use one Ledgr install per GSTIN/state. Consolidated reporting via .ledgr backup export and merge is the workaround.
Setting up IRP for the first time?
WhatsApp us โ we'll walk through GSP signup, credential paste, and your first sandbox submission. Free 30-min call.