# Cancellations

In some scenarios, it's possible to cancel an ACH transfer. Learn how to initiate a cancellation through the Dashboard or API.

Canceling an ACH transfer is possible if the following conditions are met:

- Bank-to-bank: The credit has not yet originated
- Wallet-to-bank: The credit has not yet originated
- Bank-to-wallet: The debit has not yet originated

In any of the above scenarios, transfers within a transfer group can be canceled if they fall within the allowed time frame. Once a transfer is successfully canceled, all subsequent transfers in the transfer group will also be automatically canceled.

![Cancellations must occur within a specific time frame.](../../images/ach-cancel-window-light.png)

Cancellations must occur within a specific time frame.

Note that cancelling a transfer will not affect any associated future scheduled transfers.

## [Request cancellation](#request-cancellation)

[cURL](#tab-378429156-3-0) [Dashboard](#tab-378429156-3-1)

Request a cancellation by sending the `accountID` and `transferID` to the cancel a transfer `POST` [endpoint](/api/money-movement/transfers/cancel/).

```zsh
curl -X POST "https://api.moov.io/accounts/{accountID}/transfers/{transferID}/cancellations" \
  -H "Authorization: Bearer {token}" \
  -H "X-Idempotency-Key: UUID" \
  -H "x-moov-version: v2024.01.00" \
```

If you request a cancellation, but the transaction has already been originated, previously failed, or already completed, you'll receive a `400` error. If the request is made too close to origination, it's possible the the cancellation will fail. Retrying the cancellation is possible, but likely won't be successful.

Additionally, you can get the details of a cancellation using the following:

```zsh
curl -X GET "https://api.moov.io/accounts/{accountID}/transfers/{transferID}/cancellations/{cancellationID}" \
  -H "Authorization: Bearer {token}" \
  -H "X-Idempotency-Key: UUID" \
  -H "x-moov-version: v2024.01.00" \
```

Navigate to **Transfers** in the Dashboard. If a transfer can be canceled, you'll be able to use the **Cancel** button located near the transfer amount. If the transfer is outside the cancellation window, the cancel button will be grayed out.

Visit the Dashboard [cancellation](/guides/dashboard/transfers/all-transfers/#initiate-a-reversal-refund-or-cancellation) guide for more information.

## [Status](#status)

A cancellation status can be one of `pending`, `completed`, or `failed`. The `achDetails` object will also show a status of `canceled` if the transfer has been successfully canceled, along with a `canceledOn` timestamp.

For bank-to-bank transfers, a cancellation will be `pending` when the debit transaction has already been originated. Moov waits for the debit to complete and subsequently credits the source wallet before the credit leg is initiated to the destination. If the source does not have a wallet, the destination wallet will be credited and you can initiate a transfer of funds back to the source bank account.

A successful transfer request will have the following response:

```jsx
{
  "cancellationID": "8df8e13c-3c20-4b4b-b265-796534cf4275",
  "status": "pending",
  "createdOn": "2023-09-09T14:15:22Z"
}
```

For updates on a pending cancellation, you can subscribe to the cancellation [webhooks](#webhooks), or get the cancellation status using the cancellation details `GET` [endpoint](/api/money-movement/transfers/cancel-details/).

## [Webhooks](#webhooks)

Subscribe to the following [webhook events](/guides/webhooks/webhook-events/#cancellations), which will provide you with relevant cancellation updates:

- `cancellation.created` notifies you when the cancellation was successfully created
- `cancellation.updated` notifies you when the cancellation was updated
  
  - `pending`
  - `completed`
  - `failed`
