# Cancel IRN

You can cancel an IRN by sending a **`PUT`** request to E-Invoicing API with the following request headers.

### Request Method

PUT

### Request URL

```
{{HOST}}/einv/v2/eInvoice/cancel
```

### Request Headers

<table><thead><tr><th>PARAMETER</th><th width="214">PARAMTER TYPE</th><th width="150">TYPE</th><th>DESCRIPTION</th></tr></thead><tbody><tr><td>X-Cleartax-Auth-Token</td><td>Header</td><td>String</td><td>Mandatory. The auth token generated from ClearTax user id and password. <a href="https://docs.cleartax.in/cleartax-for-developers/e-invoicing-api/e-invoicing-api-reference/authentication-token">Know how.</a></td></tr><tr><td>Content-Type</td><td>Header</td><td>String</td><td>Mandatory. This will always be <br>"application/json" for JSON and "application/xml" for XML.</td></tr><tr><td>Accept</td><td>Header</td><td>String</td><td>Optional. This will be "application/xml" if you want the response in XML.</td></tr><tr><td>gstin</td><td>Header</td><td>String</td><td>Mandatory. GSTIN number for the user</td></tr></tbody></table>

### Request Path Params

There are no path parameters for this API.

### Request Query Params

There are no query parameters for this API.

### Request Body

| Parameters | TYPE   | VALIDATIONS                                                          | DESCRIPTION                                                                                                                            |
| ---------- | ------ | -------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| irn        | String | minLength: 64	maxLength: 64                                          | Mandatory. IRN generated for the invoice.                                                                                              |
| CnlRsn     | String | <p>minLength: 1<br>maxLength: 1</p><p>enum: ["1", "2", "3", "4"]</p> | <p>Mandatory. Reason for cancellation.</p><p>1 = Duplicate</p><p>2 = Data entry mistake</p><p>3 = Order Cancelled</p><p>4 = Others</p> |
| CnlRem     | String | <p>minLength: 0<br>maxLength: 100</p>                                | Mandatory. Remarks for cancellation.                                                                                                   |

### Response Status Codes

| HTTP Status Code | Description                                                                  |
| ---------------- | ---------------------------------------------------------------------------- |
| 200              | For a successfully processed request (may be a success or validation error). |
| 400              | Bad Request. Invalid JSON Payload                                            |
| 401              | If the user is not authenticated for the operation.                          |
| 403              | If the user is not authorized for the operation.                             |
| 500              | If there are any unhandled exceptions on the Clear side.                     |

### Response Schema

| Parameter        | Data Type | Field Validations                                               | Description                             |
| ---------------- | --------- | --------------------------------------------------------------- | --------------------------------------- |
| document\_status | String    | <p>Enum:</p><p>IRN_CANCELLED </p><p>IRN_CANCELLATION_FAILED</p> | Status of the cancellation request.     |
| govt\_response   | Object    | NA                                                              | Details captured from the source Govt.  |

#### Govt Response Object

| Parameter     | Data Type | Field Validations | Description                     |
| ------------- | --------- | ----------------- | ------------------------------- |
| Success       | Boolean   | ‘Y’, ‘N’          | If Success or Failure.          |
| AckNo         | Number    | NA                | Acknowledgement Number          |
| AckDt         | String    | NA                | Acknowledgement Date            |
| IRN           | String    | 64 Digits         | Invoice Reference Number        |
| SignedInvoice | String    | NA                | Signed Invoice                  |
| SignedQRCode  | String    | NA                | QR code in JWT String.          |
| Status        | String    | <p><br></p>       | <p><br></p>                     |
| CancelDate    | String    | NA                | Date and time of cancellation.  |

### Sample Request and Response

#### Request&#x20;

{% tabs %}
{% tab title="JSON" %}
```json
[
{
  "irn": "6ca40d80480362014445a75ea944881f6a31d2b91fc7b88c84e3b250aec447c1",
  "CnlRsn": "1",
  "CnlRem": "Wrong"
}
]
```
{% endtab %}

{% tab title="XML" %}
```xml
<?xml version="1.0" encoding="UTF-8" ?>
<cancel_irn_requests>
    <cancel_irn_request>
        <irn>dc0bf021c9d1180a82443bd29a63abb6935aa15db8c1f399813f68ceb5043dc6</irn>
        <CnlRsn>1</CnlRsn>
        <CnlRem>Random</CnlRem>
    </cancel_irn_request>
</cancel_irn_requests>
```
{% endtab %}
{% endtabs %}

#### Response - **Success:**&#x20;

**HTTP Status Code : 200 OK**

{% tabs %}
{% tab title="JSON Response - Success" %}
```json
[
    {
        "custom_fields": null,
        "deleted": false,
        "document_status": "IRN_CANCELLED",
        "error_response": null,
        "errors": null,
        "govt_response": {
            "Success": "Y",
            "AckNo": 112310186209758,
            "AckDt": "2023-10-26 14:28:00",
            "Irn": "1641fc014d8b1b5be859f3f90973ab0fb9307566eaf70b7f272838865bdd8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-i7lcOKztVGohg6O3SjJXiMm3fT4Wg7Vhh8WewTT9GIv2rdg5u4m8zt9owcPb6u02aCLi4FMxhuw9osi3SKTi2itWb4ncCAz2uoL-IGsRYeLYWO7AlA",
            "Status": "ACT",
            "CancelDate": "2023-10-26 14:28:00"
        },
        "group_id": null,
        "gstin": "29AAFCD5862R000",
        "is_deleted": false,
        "owner_id": null,
        "tag_identifier": null,
        "transaction": {
            "Version": "1.1",
            "Irn": "1641fc014d8b1b5be859f3f90973ab0fb9307566eaf70b7f272838865bdd8ee3",
            "TranDtls": {
                "TaxSch": "GST",
                "RegRev": "Y",
                "SupTyp": "B2B",
                "IgstOnIntra": "N"
            },
            "DocDtls": {
                "Typ": "INV",
                "No": "WARB2B83",
                "Dt": "10/10/2023"
            },
            "SellerDtls": {
                "Gstin": "29AAFCD5862R000",
                "LglNm": "NIC Company Pvt Ltd",
                "TrdNm": "NIC Industries",
                "Addr1": "5th block, kuvempu layout",
                "Addr2": "kuvempu layout",
                "Loc": "GANDHINAGAR",
                "Pin": 560037,
                "Stcd": "29",
                "Ph": "9000000",
                "Em": "abc@gmail.com"
            },
            "BuyerDtls": {
                "Gstin": "29AAFCD5862R1ZR",
                "LglNm": "XYZ Company Pvt Ltd",
                "TrdNm": "XYZ Industries",
                "Pos": "12",
                "Addr1": "7th block, kuvempu layout",
                "Addr2": "kuvempu layout",
                "Loc": "GANDHINAGAR",
                "Pin": 562160,
                "Stcd": "29",
                "Ph": "91111111111",
                "Em": "xyz@yahoo.com"
            },
            "ItemList": [
                {
                    "SlNo": "1",
                    "PrdDesc": "Rice",
                    "IsServc": "N",
                    "HsnCd": "710692",
                    "Barcde": "123456",
                    "Qty": 0.200,
                    "Unit": "BAG",
                    "UnitPrice": 100.000,
                    "TotAmt": 20.00,
                    "AssAmt": 20.00,
                    "GstRt": 18.00,
                    "IgstAmt": 3.60,
                    "CgstAmt": 0.00,
                    "SgstAmt": 0.00,
                    "TotItemVal": 23.60
                }
            ],
            "ValDtls": {
                "AssVal": 20.00,
                "CgstVal": 0.00,
                "SgstVal": 0.00,
                "IgstVal": 3.60,
                "TotInvVal": 23.60,
                "TotInvValFc": 12897.70
            }
        },
        "transaction_id": "29AAFCD5862R000_WARB2B83_INV_2023",
        "transaction_metadata": null
    }
]
```
{% endtab %}

{% tab title="XML Response - Success" %}
```xml
<?xml version='1.0' encoding='UTF-8'?>
<eInvoiceTransactionDTOes>
    <invoice_details>
        <deleted>false</deleted>
        <document_status>IRN_CANCELLED</document_status>
        <govt_response>
            <Success>Y</Success>
            <AckNo>112310186209758</AckNo>
            <AckDt>2023-10-26 14:28:00</AckDt>
            <Irn>1641fc014d8b1b5be859f3f90973ab0fb9307566eaf70b7f272838865bdd8ee3</Irn>
            <SignedInvoice>eyJhbGciOiJSUzI1NiIsImtpZCI6IjE1MTNCODIxRUU0NkM3NDlBNjNCODZFMzE4QkY3MTEwOTkyODdEMUYiLCJ4NXQiOiJGUk80SWU1R3gwbW1PNGJqR0w5eEVKa29mUjgiLCJ0eXAiOiJKV1QifQ.eyJkYXRhIjoie1wiQWNrTm9cIjoxMTIzMTAxODYyMDk3NTgsXCJBY2tEdFwiOlwiMjAyMy0xMC0yNiAxNDoyODowMFwiLFwiSXJuXCI6XCIxNjQxZmMwMTRkOGIxYjViZTg1OWYzZjkwOTczYWIwZmI5MzA3NTY2ZWFmNzBiN2YyNzI4Mzg4NjViZGQ4ZWUzXCIsXCJWZXJzaW9uXCI6XCIxLjFcIixcIlRyYW5EdGxzXCI6e1wiVGF4U2NoXCI6XCJHU1RcIixcIlN1cFR5cFwiOlwiQjJCXCIsXCJSZWdSZXZcIjpcIllcIixcIklnc3RPbkludHJhXCI6XCJOXCJ9LFwiRG9jRHRsc1wiOntcIlR5cFwiOlwiSU5WXCIsXCJOb1wiOlwiV0FSQjJCODNcIixcIkR0XCI6XCIxMC8xMC8yMDIzXCJ9LFwiU2VsbGVyRHRsc1wiOntcIkdzdGluXCI6XCIyOUFBRkNENTg2MlIwMDBcIixcI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Y0MWZjMDE0ZDhiMWI1YmU4NTlmM2Y5MDk3M2FiMGZiOTMwNzU2NmVhZjcwYjdmMjcyODM4ODY1YmRkOGVlM1wiLFwiSXJuRHRcIjpcIjIwMjMtMTAtMjYgMTQ6Mjg6MDBcIn0iLCJpc3MiOiJOSUMgU2FuZGJveCJ9.bO-m7dvcv5ChvIZBBOl-ugPk8JJ-ZcrubPgbwH4EputOBfbFo1atck0KpelErLZQ5nbBjRNNdbEdPYqLoMpwGpS53yPsUtw9iVw4dz7LbtuVQBw7Nj6JOg-YEkwI0b93XdywQRtdwN8kKddd3m489KY4q-4KgAMjzxry7pMLWQvJBi49Uby2Ill_N3_RW142VLSwpavH4aIYeBwR-GzgSWYdKgvdAzZnFGf-i7lcOKztVGohg6O3SjJXiMm3fT4Wg7Vhh8WewTT9GIv2rdg5u4m8zt9owcPb6u02aCLi4FMxhuw9osi3SKTi2itWb4ncCAz2uoL-IGsRYeLYWO7AlA</SignedQRCode>
            <Status>ACT</Status>
            <CancelDate>2023-10-26 14:28:00</CancelDate>
        </govt_response>
        <gstin>29AAFCD5862R000</gstin>
        <is_deleted>false</is_deleted>
        <transaction>
            <Version>1.1</Version>
            <Irn>1641fc014d8b1b5be859f3f90973ab0fb9307566eaf70b7f272838865bdd8ee3</Irn>
            <TranDtls>
                <TaxSch>GST</TaxSch>
                <RegRev>Y</RegRev>
                <SupTyp>B2B</SupTyp>
                <IgstOnIntra>N</IgstOnIntra>
            </TranDtls>
            <DocDtls>
                <Typ>INV</Typ>
                <No>WARB2B83</No>
                <Dt>10/10/2023</Dt>
            </DocDtls>
            <SellerDtls>
                <Gstin>29AAFCD5862R000</Gstin>
                <LglNm>NIC Company Pvt Ltd</LglNm>
                <TrdNm>NIC Industries</TrdNm>
                <Addr1>5th block, kuvempu layout</Addr1>
                <Addr2>kuvempu layout</Addr2>
                <Loc>GANDHINAGAR</Loc>
                <Pin>560037</Pin>
                <Stcd>29</Stcd>
                <Ph>9000000</Ph>
                <Em>abc@gmail.com</Em>
            </SellerDtls>
            <BuyerDtls>
                <Gstin>29AAFCD5862R1ZR</Gstin>
                <LglNm>XYZ Company Pvt Ltd</LglNm>
                <TrdNm>XYZ Industries</TrdNm>
                <Pos>12</Pos>
                <Addr1>7th block, kuvempu layout</Addr1>
                <Addr2>kuvempu layout</Addr2>
                <Loc>GANDHINAGAR</Loc>
                <Pin>562160</Pin>
                <Stcd>29</Stcd>
                <Ph>91111111111</Ph>
                <Em>xyz@yahoo.com</Em>
            </BuyerDtls>
            <ItemList>
                <SlNo>1</SlNo>
                <PrdDesc>Rice</PrdDesc>
                <IsServc>N</IsServc>
                <HsnCd>710692</HsnCd>
                <Barcde>123456</Barcde>
                <Qty>0.200</Qty>
                <Unit>BAG</Unit>
                <UnitPrice>100.000</UnitPrice>
                <TotAmt>20.00</TotAmt>
                <AssAmt>20.00</AssAmt>
                <GstRt>18.00</GstRt>
                <IgstAmt>3.60</IgstAmt>
                <CgstAmt>0.00</CgstAmt>
                <SgstAmt>0.00</SgstAmt>
                <TotItemVal>23.60</TotItemVal>
            </ItemList>
            <ValDtls>
                <AssVal>20.00</AssVal>
                <CgstVal>0.00</CgstVal>
                <SgstVal>0.00</SgstVal>
                <IgstVal>3.60</IgstVal>
                <TotInvVal>23.60</TotInvVal>
                <TotInvValFc>12897.70</TotInvValFc>
            </ValDtls>
        </transaction>
        <transaction_id>29AAFCD5862R000_WARB2B83_INV_2023</transaction_id>
    </invoice_details>
</eInvoiceTransactionDTOes>
```
{% endtab %}
{% endtabs %}

**Response - Failure:**

**HTTP Status Code : 200 OK**

{% tabs %}
{% tab title="JSON" %}
```json
[
    {
        "custom_fields": null,
        "deleted": false,
        "document_status": "IRN_CANCELLATION_FAILED",
        "error_response": null,
        "errors": null,
        "govt_response": {
            "Success": "N",
            "ErrorDetails": [
                {
                    "error_code": "USER_INPUT_EXCEPTION",
                    "error_message": "E-Invoice with the IRN not present with our datastore",
                    "error_source": "CLEARTAX"
                }
            ]
        },
        "group_id": null,
        "gstin": "29AAFCD5862R000",
        "is_deleted": false,
        "owner_id": null,
        "tag_identifier": null,
        "transaction": null,
        "transaction_id": null,
        "transaction_metadata": null
    }
]
```
{% endtab %}

{% tab title="XML" %}
```xml
<?xml version='1.0' encoding='UTF-8'?>
<eInvoiceTransactionDTOes>
    <invoice_details>
        <deleted>false</deleted>
        <document_status>IRN_CANCELLATION_FAILED</document_status>
        <govt_response>
            <Success>N</Success>
            <ErrorDetails>
                <error_code>USER_INPUT_EXCEPTION</error_code>
                <error_message>E-Invoice with the IRN not present with our datastore</error_message>
                <error_source>CLEARTAX</error_source>
            </ErrorDetails>
        </govt_response>
        <gstin>29AAFCD5862R000</gstin>
        <is_deleted>false</is_deleted>
    </invoice_details>
</eInvoiceTransactionDTOes>
```
{% endtab %}
{% endtabs %}

### API Validations

1. IRN should be present in the ClearTax database.&#x20;
2. IRN cannot be cancelled, if the Valid/Active E-way Bill exists for the same.
3. Cancellation can be done by active or suspended taxpayers.

### API Constraints

1. Maximum of 5 IRNs can be cancelled in one API call.&#x20;
2. IRN can be cancelled within 24 hours from its time of generation.
