Cancel IRN

You can cancel an already generated IRN by sending a POST request to E-Invoicing API with the following request headers.

If the E-Invoice has a valid/active E-Waybill linked, then you cannot cancel the IRN.

Request URL

POST: {{HOST}}/einv/v1/govt/api/Cancel

Request Headers

Parameter
Type
Description

x-cleartax-auth-token

String

Mandatory. The access token generated for the workspace.

x-cleartax-product

String

Should always be "EInvoice" without the double quotes.

gstin

String

Users GSTIN

Request Parameters

Parameters

Parameter Type

Type

Validations

Description

irn

Body

String

minLength: 64 maxLength: 64

Mandatory. IRN generated for the invoice.

CnlRsn

Body

String

minLength: 1 maxLength: 1

enum: ["1", "2", "3", "4"]

Mandatory. Reason for cancellation.

1 = Duplicate

2 = Data entry mistake

3 = Order Cancelled

4 = Others

CnlRem

Body

String

minLength: 0 maxLength: 100

Mandatory. Remarks for cancellation.

Sample Request Body

{
  "irn": "a5c12dca80e743321740b001fd70953e8738d109865d28ba4013750f2046f229",
  "CnlRsn": "1",
  "CnlRem": "Duplicate Invoice"
}

Response Parameters

  • For Successful request

Parameter

Type

Description

Success

String

"Y" if request is successful,

"N" otherwise

CancelDate

String

Format YYYY-MM-DD HH:MM:SS,

Cancellation date

Irn

String

Invoice Reference Number

  • For Failed requests

Parameter

Type

Description

Success

String

"N" for failed request

ErrorDetails

Array of Error Detail

Details of all errors

Error Detail

Parameter

Type

Description

error_code

String

Error Code

error_message

String

Error Message

error_source

String

Error Source can either be GOVT or CLEARTAX

error_id

String

Optional

Sample Response

{
  "ewbStatus": "FAILED",
  "Success":"Y",
  "Irn": "a5c12dca80e743321740b001fd70953e8738d109865d28ba4013750f2046f229",
  "CancelDate": "2019-12-05 14:26:00"
}

Please note that you will be able to cancel an E-Invoice only within the time limit (24 hours since generation) specified by the Government.

Last updated