# Cancel Transaction

ACH transactions that have not been submitted for processing can be canceled using this API. You will receive appropriate error messages if a transaction cannot be canceled.

**`DELETE /users/{{user_id}}/transactions/{{id}}`**

{% tabs %}
{% tab title="Request sample" %}

```
curl --location --request DELETE '{{url}}/users/{{user_id}}/transactions/{{id}}' \
--header 'X-Client-Id: 457dde89-76d4-41ac-97ee-f4a4321591d8' \
--header 'X-Client-Secret: c562435e-cb80-4df1-aa11-205a2df56b6a' \
--header 'Content-Type: application/json'
```

{% endtab %}

{% tab title="Response sample" %}

```
Status code 200 OK
```

{% 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://paas.docs.machnetinc.com/api-references/transaction/cancel-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.
