Documentation Index
Fetch the complete documentation index at: https://developer.sandbox.co.in/llms.txt
Use this file to discover all available pages before exploring further.
GST e-Invoice API
GST e-Invoice is a GST-compliant invoice registered with the Invoice Registration Portal (IRP) and assigned an IRN (Invoice Reference Number). Use this API to generate IRNs, receive the IRP-signed invoice JSON and QR code, download PDFs, cancel or fetch e-Invoices, and create or retrieve E-Way Bills linked to the IRN. This API integrates with India’s Invoice Registration Portal (IRP) for GST e-invoicing. API credentials are created on the e-Invoice portal and mapped to your GSP.Complete e-Invoice lifecycle
Signed invoice & QR code
PDF generation
How it works
Create API credentials on e-Invoice portal
Authenticate with Sandbox
Authenticate with e-Invoice IRP
x-source header to primary (NIC 1) to route to the primary IRP. This returns an e-Invoice session token valid for the IRP. See the Generate e-Invoice session recipe for implementation details.Handle IRP failover (if needed)
x-source: secondary to route to NIC 2. Use the same approach for all subsequent taxpayer API calls.Generate e-Invoice
Generate e-Invoice PDF
Fetch e-Invoice
Cancel e-Invoice (if needed)
Generate E-Way Bill for transportation
API endpoints
Authentication
| API | Purpose |
|---|---|
| Obtain Sandbox JWT for PDF generation and other Sandbox services | |
Obtain e-Invoice session token from IRP. Supports x-source header |
e-Invoice operations
| API | Purpose |
|---|---|
Generate IRN with signed invoice and QR code. Supports x-source header | |
Fetch e-Invoice details by IRN. Supports x-source header | |
Fetch e-Invoice by document type, number, and date. Supports x-source header | |
Cancel an e-Invoice by IRN. Supports x-source header | |
| Generate PDF from signed invoice and QR. Uses Sandbox JWT | |
| Look up GSTIN details in IRP database (not GSTN) |
E-Way Bill (from e-Invoice)
| API | Purpose |
|---|---|
Generate E-Way Bill linked to IRN. Supports x-source header | |
Retrieve E-Way Bill details by IRN. Supports x-source header |
Common use cases
Use GST e-Invoice API when you need to:- Generate GST e-invoices (IRN) and store signed invoice + QR for compliance and audit
- Provide “Download invoice PDF” functionality to customers and finance teams
- Cancel wrongly issued e-invoices by IRN within the cancellation window
- Fetch e-invoices by IRN or by document reference for reconciliation and support
- Generate and retrieve E-Way Bills linked to IRN for logistics and transportation
- Validate GSTIN details via IRP lookup before invoicing
Frequently Asked Questions
What is GST e-Invoice?
What is GST e-Invoice?
How does GST e-Invoice API work end-to-end?
How does GST e-Invoice API work end-to-end?
x-source. See the Generate e-Invoice recipe for a complete example.What is the x-source header in Sandbox e-Invoice APIs?
What is the x-source header in Sandbox e-Invoice APIs?
x-source header enables dual-IRP routing in Sandbox e-Invoice APIs. Set x-source: primary to route requests to NIC 1 (the primary IRP) or x-source: secondary to route to NIC 2 (the secondary IRP). If omitted, requests default to primary. This header is supported on all taxpayer endpoints, including authentication, generate, fetch, cancel, and E-Way Bill operations.What credentials are required to call e-Invoice Authentication?
What credentials are required to call e-Invoice Authentication?
Why does e-Invoice PDF generation use Sandbox JWT instead of the e-Invoice token?
Why does e-Invoice PDF generation use Sandbox JWT instead of the e-Invoice token?
Can I generate an E-Way Bill from an e-Invoice IRN?
Can I generate an E-Way Bill from an e-Invoice IRN?
x-source header.