This API is used for cancelling an e-Invoice within stipulated time by passing the IRN.

Sequence Diagram

The format and details of Cancellation of IRN API request is depicted in following table.

URL <URL>/api/Cancel





Request Header

Attributes Description

client id to be provided by E-Invoice System


client secret to be provided by E-Invoice System


GSTIN of the authenticated user


User name of the authenticated user


Authentication token returned by the E-Invoice system

Request Payload

Attributes Description
Data Base 64 encoded string of encrypted Cancel e-invoice JSON using Sek.

Response Payload

Attributes Description
Status Status of the Cancel  IRN request(values 1-Success and 0- Failure)
Data If Status is ‘1’
Irn IRN that is cancelled
CancelDate Date of cancellation of the IRN
ErrorDetails If Status is ‘0’ (Base64encoded)
ErrorCode Unique error code
ErrorMessage Error Description
Info Any additional message to be conveyed would be passed. It will be Base64 encoded string.

Sample JSON (Request)

Cancel IRN Request

"Data": "cwMtQmlx/upJuEqKfTMTQ6RH1s6SOQwm9SknTMBvHm9CFeJCCs4otZZbdf76sP/xpR4K3H5qvf1FmSrIFw1kmcPG1fSrE+AhZXjicr07dFsFmngugxwcTu 4BScdA75FgIolVbvDnDgvzJyg9mDWxMIM3Mkbtt7by5XC9CqVqqhnPSri9R5UE3PJgVKcMsM3aBewBdNGiQ/2Z9fITZwCp1l/z6h6pMDd93GT30I8nxMsn3"

JSON corresponds to the "Data" element of Cancel E-Invoice Request above

"CnlRsn":"1 ",
"CnlRem":"Wrong entry"

Sample JSON (Response)

"data":"<Encrypted response>",
"Info":"<alert message in base 64 encoded format>"

JSON (corresponds to the data element of Cancelled e-Invoice Response(Success))

"CancelDate": "2019-12-05 14:26:00"

JSON(in case of error)

"status": "0",
"Data": null,
"ErrorDetails":"<Errors JSON in base64 encoded format>",
"info": "<alert message in base 64 encoded format>"

On decoding (Base64), the “ErrorDetails” attribute above, the following JSON array can be obtained

"ErrorCode": "110",
"ErrorMessage": "Invalid Client-ID/Client-Secret"

JSON Schema

"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"Irn": {
"type": "string",
"description": "IRN number"
"CnlRsn": {
"type": "string",
"description": "Cancel reason"
"CnlRem": {
"type": "string",
"description": "Cancel Remarks"


Content will be updated shortly.

Frequently Asked Questions

Content will be updated shortly.