# Delete B2C transaction

You can delete a B2C QR transaction by sending a **`POST`** request to B2C QR code API with the following request headers.

### **Request Method**

POST

### **Request URL**

```
{{HOST}}/einv/v1/b2c/delete
```

### Request Headers

<table><thead><tr><th>Parameter</th><th width="168.66668701171875">Data Type</th><th>Field Validations</th><th>Description</th></tr></thead><tbody><tr><td>X-Cleartax-Auth-Token</td><td>String</td><td>NA</td><td>Mandatory. The auth token generated from ClearTax user id and password.</td></tr><tr><td>Content-Type</td><td>String</td><td>NA</td><td>Mandatory. This will always be <br>"application/json" for JSON</td></tr><tr><td>Gstin</td><td>String</td><td>NA</td><td>Mandatory. GSTIN number for the user.</td></tr></tbody></table>

### Request Path Params <a href="#request-path-params" id="request-path-params"></a>

There are no path parameters for this API.

### Request Query Params <a href="#request-query-params" id="request-query-params"></a>

There are no query parameters for this API.

### Request Body

| Parameter       | Data Type | Field Validations | Description                                                                          |
| --------------- | --------- | ----------------- | ------------------------------------------------------------------------------------ |
| transaction\_id | String    | NA                | Mandatory. Value of transaction\_id received from Generate B2C QR Code API response. |

### Response Status Code

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

### Response Schema

On Successful deletion, you will receive HTTP Status Code 200 OK in the API response.&#x20;

### Sample Request and Response <a href="#sample-request-and-response" id="sample-request-and-response"></a>

#### **Request**

```json
[
    "29AAFCD5862R000_B2CTest1_INV_2025"
]
```

#### **Response (Success)**

**HTTP Status Code: 200 OK**

```json
1
```

#### Response (Failure)&#x20;

HTTP Status Code: 401&#x20;

```json
{
    "error_code": "401",
    "error_message": "Authentication failed.",
    "error_source": "CLEARTAX"
}
```

### API Validations <a href="#api-validations" id="api-validations"></a>

Currently there are no known validations for this API.

### API Constraints <a href="#api-constraints" id="api-constraints"></a>

Record for the provided transaction id needs to be present in Clear database.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cleartax.in/cleartax-docs/e-invoicing-api/e-invoicing-api-reference/cleartax-e-invoicing-apis-xml-schema/b2c-e-invoicing-apis/delete-b2c-transaction.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
