e-Invoice APIEnvironment:
API Reference
Overview
Authentication
Get GSTN Details
Get Sync GSTIN From CP
Generate IRN
Get EInvoice Details
Get IRN details by Doc Details
Cancel IRN
Cancel IRNPOST
Get Rejected IRNs
Generate Ewaybill
Get Ewaybill Details by IRN
Get B2C QR Code Details

e-Invoice IRN Cancellation API

POSThttps://apisandbox.whitebooks.in/einvoice/type/CANCEL/version/V1_03

Cancel Invoice Reference Number. You can cancel only past 24 hours of invoices from the time of IRN generation

Parameters

query parameters
emailstringrequired
User Email
irpstringoptional
e-Invoice Server Type(NIC1/NIC2),given at the time of e-Invoice generation
header parameters
ip_addressstringrequired
IP Address
client_idstringrequired
Client ID
client_secretstringrequired
Client Secret
usernamestringrequired
User name
auth-tokenstringrequired
Token
gstinstringrequired
GSTIN number

Request Body

application/jsonrequired
Irnstringoptional
Irn number
Example: "a5c12dca80e743321740b001fd70953e8738d109865d28ba4013750f2046f229"
CnlRsnstringoptionalnullable
Cancel Reason Number
Example: "1"
CnlRemstringoptional
Cancel Reason
Example: "Wrong entry"

Response

Not Found. If requested entity is not found or if requested API is not found.

Frequently Asked Questions

The request body requires Irn (the 64-character alphanumeric hash), CnlRsn (numeric cancellation reason code), and CnlRem (cancellation remarks). Authenticate via Authorization: Bearer <access_token> and x-api-key, along with standard routing headers (gstin, username, ip_address).
Standard IRP cancellation codes are: 1 for Duplicate, 2 for Data entry error, 3 for Order cancelled, and 4 for Others. When using 4, descriptive text must be supplied in CnlRem.
No. If an active e-Way Bill was generated against the IRN, the e-Way Bill must be cancelled first. Attempting to cancel the IRN while an e-Way Bill is active results in validation failure on the IRP.
No. Once an IRN is cancelled on the IRP, the specific document number cannot be reused for another IRN in the same financial year. A new invoice number must be issued.
POST/einvoice/type/CANCEL/version/V1_03
1const response = await fetch('https://apisandbox.whitebooks.in/einvoice/type/CANCEL/version/V1_03?email=value&irp=value', {
2 method: 'POST',
3 headers: {
4 ip_address: "value",
5 client_id: "value",
6 client_secret: "value",
7 username: "value",
8 auth-token: "value",
9 gstin: "value",
10 Content-Type: "application/json"
11},
12 body: JSON.stringify({
13 "Irn": "a5c12dca80e743321740b001fd70953e8738d109865d28ba4013750f2046f229",
14 "CnlRsn": "1",
15 "CnlRem": "Wrong entry"
16}),
17});
18
19const data = await response.json();
20console.log(data);
No example available.