What you can do
| Endpoint | What it does |
|---|---|
| POST /v1/ewaybill | Generate an e-way bill |
| POST /v1/ewaybill/cancel | Cancel an e-way bill |
| POST /v1/ewaybill/close | Close an e-way bill |
| POST /v1/ewaybill/update-vehicle | Update the vehicle on an e-way bill |
| POST /v1/ewaybill/update-transporter | Assign or change the transporter on an e-way bill |
| POST /v1/ewaybill/extend-validity | Extend the validity of an e-way bill |
| POST /v1/ewaybill/reject | Reject an e-way bill (only its recipient can) |
| POST /v1/ewaybill/details | Fetch the details of an e-way bill |
| POST /v1/ewaybill/lookup | Find an already-generated e-way bill by document type and number (1 credit) |
| POST /v1/einvoice | Generate an e-invoice and get the IRN |
| POST /v1/einvoice/cancel | Cancel an e-invoice by IRN |
Put vehicle details (EwbDtls) in the e-invoice payload and one call generates both the IRN and the e-way bill. It is billed once, not twice. The e-invoice response also carries the signed QR code and the signed invoice record, passed through as the filing system returns them.
Before your first call
The filing happens on the government network, so the GSTIN you file for must already have e-way bill API access set up. That is a one-time step on the e-way bill portal, separate from your gstinapi.in API key. To set it up:
- Log in to the e-way bill portal (ewaybillgst.gov.in) as the taxpayer or transporter for that GSTIN.
- Open the Registration menu and choose “For GSP”.
- Select the GSP from the dropdown. Contact us and we will confirm the exact entry to pick.
- Create the API username and password there. They are separate from your normal portal login.
- Send us the GSTIN through the contact page so we can enable it on our side. Until then you can build and test with test_mode.
Each GSTIN, meaning each place of business, needs its own API username and password. Transporters follow the same steps. E-invoice needs its own separate API registration on the e-invoice portal, so contact us for that one.
You send the GSTIN’s own API username and password with each request. They are forwarded for that call and never stored.
A request
The payload is one e-way bill JSON payload in the government’s format (supplyType, docType, docNo, fromGstin, toGstin, itemList and the rest). Add "test_mode": true to build against the sandbox.
curl -X POST https://www.gstinapi.in/v1/ewaybill \
-H "x-api-key: gak_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"gstin": "YOUR_GSTIN",
"gstin_username": "YOUR_EWAYBILL_API_USERNAME",
"password": "YOUR_EWAYBILL_API_PASSWORD",
"test_mode": true,
"payload": { "docType": "INV", "docNo": "INV-001", "...": "the rest of the e-way bill payload" }
}'Illustrative. The full field list is in the API documentation.
Pricing
- 3 credits per successful document: generate, cancel and close each cost the same.
- A rejection, or a failure upstream, is never charged.
- The lookup endpoint costs 1 credit, because it is a real call to the filing system. A clean "no record found" answer is still charged for that reason.
- Sandbox calls (test_mode) are free: required fields are still validated, but the government network is never called, and every reference number is prefixed TEST- so it cannot be mistaken for a real one.
- On the 6,250-credit pack a credit is ₹0.40, so a document is about ₹1.20 before 18% GST.
Timeouts and safe retries
If a call times out before a response comes back, retry with the same document number, never a new one. /v1/ewaybill then returns the already-generated e-way bill as a normal success, and /v1/einvoice returns the already-generated invoice’s real IRN with already_existed set to true. It is billed the same as a fresh success, and there is never a duplicate filing. A different document number is what risks a duplicate.
Frequently asked questions
Is there an API to generate e-way bills in India?
Yes. POST /v1/ewaybill generates an e-way bill from one JSON payload, and the companion endpoints cancel, close, update the vehicle on, reject and fetch e-way bills. The same key also generates e-invoices.
What does the e-way bill API cost?
3 credits per successful generate, cancel or close, and nothing for a rejection or an upstream failure. On the largest pack that is about ₹1.20 a document before 18% GST. The sandbox is free.
Do you store my e-way bill portal password?
No. The username and password you send with a request are forwarded for that call and are not stored.
Can one call create both an e-invoice and an e-way bill?
Yes. Include EwbDtls (vehicle number, transport mode, distance) in the e-invoice payload and the response carries the e-way bill number alongside the IRN. It is billed once.
How do I test without filing anything real?
Add "test_mode": true to the request body. Required fields are still validated, nothing is sent to the government network and nothing is charged.
Do I need to register anything before I can use it?
Yes, once per GSTIN. Log in to the e-way bill portal, open Registration, choose “For GSP”, select the GSP we confirm for you, and create an API username and password. Then contact us with the GSTIN so we can enable it. E-invoice has its own separate registration, so contact us for that one.
Start with up to 100 free lookups
25 on signup and 25 for each of three setup steps. No card, and they never expire.
Create a free account