All e-way bill and e-invoice API calls

E-way bill generate API

POST /v1/ewaybill

Short answer

Send one POST with the e-way bill JSON in the government's own format. You get back the 12-digit e-way bill number, its date and its validity. If the call times out, send the same document number again: you get the original e-way bill back instead of a duplicate.

Cost: 3 credits per successful call. A rejection or an upstream failure is never charged.

Every call accepts "test_mode": true and returns a sample in the live shape, free. Set up your API credentials before the first real call.

What you send

The body carries your GSTIN, the API username and password for that GSTIN, and a payload object. The payload is the e-way bill JSON exactly as the government network defines it (supplyType, docType, docNo, fromGstin, toGstin, itemList and the rest). gstinapi.in does not rename or reshape it.

The API username and password are not your normal portal login. You create them once on the e-way bill portal under Registration, For GSP.

Safe retries after a timeout

A government-network call can occasionally run long enough that you cannot tell whether the e-way bill was filed. Do not generate a new document number. Send the same payload again with the same docNo.

If that document already exists, the response is the real e-way bill with already_existed set to true, billed like a fresh success. Sending a different document number is what actually risks a duplicate filing.

Check the payload for free first

POST /v1/ewaybill/validate checks the payload locally for the mistakes that cause most rejections and charges nothing. Passing it does not guarantee acceptance: the government network also checks things no one else can see, such as a cancelled GSTIN or a duplicate document.

Request fields

FieldTypeRequiredMeaning
gstinstringYesThe GSTIN you act as, with API access set up.
gstin_usernamestringYesThe e-way bill API username for that GSTIN. Never stored.
passwordstringYesThe matching API password. Never stored.
payloadobjectYesOne e-way bill JSON payload in the government's field names.
test_modebooleanNotrue returns a sample in the live shape: free, nothing is filed.

Send your API key in the x-api-key header. Government API credentials are used for the one call and never stored.

Example

The request below runs in test mode, so it is free and files nothing. Remove test_mode for a real call.

curl -X POST "https://www.gstinapi.in/v1/ewaybill" \
  -H "x-api-key: YOUR_API_KEY" -H "Content-Type: application/json" \
  -d '{ "gstin": "24AAAAA0000A1Z5", "gstin_username": "YOUR_EWB_API_USER", "password": "YOUR_EWB_API_PASSWORD", "payload": { "supplyType": "O", "docType": "INV", "docNo": "INV-1001" }, "test_mode": true }'

Response

{
  "success": true,
  "ewaybill_no": "351000000123",
  "ewaybill_date": "23/10/2026",
  "valid_upto": "25/10/2026",
  "doc_no": "INV-1001",
  "already_existed": false,
  "billed_to": "paid",
  "credits_remaining": 197
}

Errors you can expect

CodeMessageWhat to do
108Invalid login credentialsThe API username or password was refused. Usually the API user was created for a different GSP, or the password has special characters.
604Already generatedHandled for you: the existing e-way bill is returned with already_existed: true.
HTTP 403paid_account_requiredReal filings need an account that has bought a credit pack. test_mode works on any account.

All e-way bill API error codes

Questions

Do I get an e-way bill number even in test mode?
You get a sample in the real response shape with a TEST- prefixed number. It is free, nothing is filed and no registration is needed.
How many credits does it cost?
It is charged only when an e-way bill is actually generated. A rejection, such as an invalid HSN code or bad credentials, costs nothing.

Not affiliated with the Government of India. Rules are the government network's own and can change; if a page here looks out of date, tell us.