> ## Documentation Index
> Fetch the complete documentation index at: https://assetpay.gg/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancel Withdrawal Item

> Request cancellation of a single undelivered withdrawal item; AssetPay asks the supplier to cancel and refunds your merchant wallet on success. CS2 only.

Requests cancellation of a single undelivered withdrawal item. AssetPay asks the marketplace supplier to cancel the purchase; on success your merchant wallet is refunded automatically. To cancel the whole order in one call, use [`POST /client/trading/withdraw/{tradeId}/cancel`](/docs/api-reference/trading/cancel-withdrawal) instead.

**Authentication:** Client Token (`Authorization` header)

<Note>
  CS2 (Assetpay) items only. Rust withdrawals are fulfilled by a polling supplier with no cancel API, and internal-sourced items leave nothing to reverse upstream; both return `TRADE_CANCEL_UNSUPPORTED` (44).
</Note>

## Request

```http theme={null}
POST https://api.assetpay.gg/client/trading/withdraw/{tradeId}/items/{itemId}/cancel
Authorization: CLIENT_TOKEN
```

### Path Parameters

| Parameter | Type   | Required | Description                                                                                                 |
| --------- | ------ | -------- | ----------------------------------------------------------------------------------------------------------- |
| `tradeId` | string | Yes      | The withdrawal's internal ID, or the `externalId` you supplied at creation.                                 |
| `itemId`  | string | Yes      | The item's `id` within that trade, or the per-item `externalId` you supplied at withdraw time. 1–128 chars. |

## When an item can be cancelled

A cancel is only accepted when **all** of the following hold:

* The item belongs to a **withdrawal** trade owned by the authenticated user.
* The item is a **CS2 (Assetpay)** item that was not sourced from the internal pool.
* The item is **at least 30 minutes old** (measured from when it was created).
* The item is **not** already in a terminal state (`completed`, `failed`, `reverted`, `canceled`).

## Response

```json theme={null}
{
  "requestId": "...",
  "success": true,
  "data": {
    "tradeId": "trade-uuid",
    "itemId": "item-uuid",
    "externalId": "wd_item_a",
    "status": "cancelled"
  }
}
```

`externalId` echoes your own per-item reference and is omitted when you did not supply one.

A `200` only confirms the marketplace **accepted** the cancellation. AssetPay does **not** change the item state inline — the refund and the transition to `canceled` arrive asynchronously through the standard `trade.*` [callback](/docs/guides/callbacks). Poll `GET /client/trades/{id}` or rely on callbacks for the final state, and refund the user's balance when you receive the canceled callback.

<Note>
  A cancel lands on `canceled`, not `reverted`. `reverted` is for a delivered item that came back afterwards.
</Note>

## Rate Limits

| Merchant Status | Limit             |
| --------------- | ----------------- |
| Verified        | 60 requests / min |
| Unverified      | 10 requests / min |

Shared across all clients of the same merchant.

## Errors

| Code | Key                        | When                                                                                                    |
| ---- | -------------------------- | ------------------------------------------------------------------------------------------------------- |
| 27   | `TRADE_CANCEL_TOO_SOON`    | The item is younger than 30 minutes. Retry after the 30-minute window.                                  |
| 28   | `TRADE_NOT_CANCELLABLE`    | Not cancellable: not a withdrawal, already in a terminal state, or the marketplace rejected the cancel. |
| 44   | `TRADE_CANCEL_UNSUPPORTED` | The item is Rust or internal-sourced, so there is no supplier cancel to call.                           |
| 1300 | `FORBIDDEN`                | The trade does not belong to the authenticated user.                                                    |
| 2201 | `ITEM_NOT_FOUND`           | No item matching that `itemId` or `externalId` exists under the given trade.                            |
