# Cancel Withdrawal

<mark style="color:red;">**`DELETE`**</mark> `https://api.sfox.com/v1/transactions/:atx_id`

Cancel a specified withdrawal. Cancelation is not guaranteed–if the withdrawal has already be processed and cannot be canceled, you will receive an error response.

{% hint style="info" %}
**Authentication:** This endpoint requires a [User Auth Token](/connect/rest-api/end-users/create-user-auth-token.md) for authentication. Requests using your Connect API Key will be rejected.
{% endhint %}

### Path Parameters

<table><thead><tr><th width="190">Name</th><th width="104">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong><code>atx_id</code></strong> <mark style="color:red;">required</mark></td><td>int</td><td>The transaction ID of the withdrawal you are trying to cancel.</td></tr></tbody></table>

<details>

<summary><mark style="color:green;"><strong>200</strong></mark><strong> OK</strong></summary>

No body for this response

</details>

{% tabs %}
{% tab title="Shell" %}

```shell
curl -X DELETE \
-H "Authorization: Bearer ${USER_AUTH_TOKEN}" \
'https://api.sfox.com/v1/transactions/12345'
```

{% endtab %}

{% tab title="NodeJS" %}

```javascript
const axios = require('axios');

const config = {
  method: 'delete',
  url: 'https://api.sfox.com/v1/transactions/12345',
  headers: {
    'Authorization': `Bearer ${process.env.USER_AUTH_TOKEN}`
  }
}

axios(config)
  .then((response) => {
    console.log(response.status);
    console.log(response.data);
  })
  .catch((error) => {
    console.error(error.response.status);
    console.error(error.response.data);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
import os

data = requests.delete(
  "https://api.sfox.com/v1/transactions/12345",
  headers={
    "Authorization": f"Bearer {os.environ['ENTERPRISE_API_KEY']}"
  }
)
print(data.status_code)
print(data.json())
```

{% endtab %}
{% endtabs %}


---

# 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.sfox.com/connect/rest-api/withdrawals/cancel-withdrawal.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.
