Send the e-way bill number and a reason. It is cancelled and you get the cancellation time back. It has to be done by the generator, within 24 hours of generating the e-way bill: after that the network answers with error 728.
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.
An e-way bill can be cancelled by its generator only, and only within 24 hours of generation. Past that, error 728 says "You can cancel the ewaybill within 24 hours from Part B entry" and nothing can be done through the API.
If you generate e-way bills while testing, cancel them in the same session. They cannot be cancelled the next day.
cancel_reason_code is one digit: 1 Duplicate, 2 Order Cancelled, 3 Data Entry mistake, 4 Others. Add a short cancel_remark.
These are not the same numbers as the e-invoice cancellation reasons, where 2 is Data entry mistake. Do not reuse one table for the other.
| Field | Type | Required | Meaning |
|---|---|---|---|
| gstin | string | Yes | The GSTIN you act as, with API access set up. |
| gstin_username | string | Yes | The e-way bill API username for that GSTIN. Never stored. |
| password | string | Yes | The matching API password. Never stored. |
| ewaybill_no | string | Yes | The e-way bill number to cancel. |
| cancel_reason_code | string | No | 1 Duplicate, 2 Order Cancelled, 3 Data Entry mistake, 4 Others. Defaults to 2. |
| cancel_remark | string | No | Short free-text remark. |
| test_mode | boolean | No | true 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.
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/cancel" \
-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", "ewaybill_no": "351000000123", "cancel_reason_code": "2", "cancel_remark": "Order cancelled", "test_mode": true }'Response
{
"success": true,
"ewaybill_no": "351000000123",
"cancel_date": "23/10/2026",
"billed_to": "paid",
"credits_remaining": 197
}| Code | Message | What to do |
|---|---|---|
| 728 | You can cancel the ewaybill within 24 hours from Part B entry | Too late. Generate a correct e-way bill instead; the old one stays until it expires. |
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.