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

# Withdrawal Event

Webhooks for `Wallet-as-a-Service` withdrawal flow notify you about the status of funds being withdrawn from a wallet.

* **Parent Method:** `withdraw`
* **Sub-Methods:**
  * **`unconfirmed`**: Triggered when a withdrawal request is initiated but not yet processed.
  * **`confirmed`**: Triggered when the withdrawal is successfully processed and funds are sent to the specified address.
  <br />

### **Example Payload for Withdrawal:**

<CodeGroup>
  ```json withdraw.unconfirmed theme={null}
  {
    "requestId": "f71516a1a53acbc5a999ef9b6edda4",
    "method": "withdraw.unconfirmed",
    "params": {
      "id": "68180c09b19304fc881991c2",
      "clientTxId": "57337eed-eef3-4123-9e83-83107c4dafa3",
      "coin": "USDT",
      "chain": "ERC20",
      "network": "Ethereum",
      "amount": 9,
      "fromAddress": "0x5523985926Aa12....678D7227E",
      "toAddress": "0x5523985926Aa12....678D7227E",
      "hash": null,
      "status": "pending",
      "networkFee": 0.01,
      "confirmation": 0,
      "fromWalletId": "6812b103908d2d0d49c7ff79",
      "workspaceId": "656abf1e4b5f5e0012345678",
      "createdAt": "2025-05-05T00:53:29.206Z",
      "updatedAt": "2025-05-05T00:53:29.206Z",
      "wallet": {
        "id": "6812b103908d2d0d49c7ff79",
        "clientUserId": null,
        "email": "email@openxswitch.com",
        "name": "openxswitch-subwallet",
        "asset": {
          "coin": "USDT",
          "balance": 9,
          "frozen": 0,
          "updatedAt": "2025-05-04T23:58:20.494Z"
        },
        "isSubWallet": false
      }
    }
  }
  ```

  ```json withdraw.confirmed theme={null}
  {
    "requestId": "f71516a1a53acbc5a999ef9b6edda4",
    "method": "withdraw.confirmed",
    "params": {
      "id": "68180c09b19304fc881991c2",
      "clientTxId": "57337eed-eef3-4123-9e83-83107c4dafa3",
      "coin": "USDT",
      "chain": "ERC20",
      "network": "Ethereum",
      "amount": 9,
      "fromAddress": "0x5523985926Aa12....678D7227E",
      "toAddress": "0x5523985926Aa12....678D7227E",
      "hash": "0x09e6d323086d462d0c4d0b3890d624451a82c6c28ba07d95a946a8544780...",
      "status": "success",
      "networkFee": 0.01,
      "confirmation": 20,
      "fromWalletId": "6812b103908d2d0d49c7ff79",
      "workspaceId": "656abf1e4b5f5e0012345678",
      "createdAt": "2025-05-05T00:53:29.206Z",
      "updatedAt": "2025-05-05T00:53:29.206Z",
      "wallet": {
        "id": "6812b103908d2d0d49c7ff79",
        "clientUserId": null,
        "email": "email@openxswitch.com",
        "name": "openxswitch-subwallet",
        "asset": {
          "coin": "USDT",
          "balance": 9,
          "frozen": 0,
          "updatedAt": "2025-05-04T23:58:20.494Z"
        },
        "isSubWallet": false
      }
    }
  }
  ```
</CodeGroup>

<br />

### Reference

| Field                           | Description                                                    | Type                |
| :------------------------------ | :------------------------------------------------------------- | :------------------ |
| `requestId`                     | Unique identifier for the event                                | `string`            |
| `method`                        | Event type (e.g. `withdraw.unconfirmed`, `withdraw.confirmed`) | `string`            |
| `params.id`                     | Unique ID for the withdrawal                                   | `string`            |
| `params.clientTxId`             | Optional client-assigned transaction ID                        | `string`            |
| `params.coin`                   | Token symbol (e.g. `USDT`)                                     | `string`            |
| `params.chain`                  | Blockchain network name (e.g. `Bitcoin`, `Ethereum`)           | `string`            |
| `params.network`                | Blockchain protocol used (e.g. `ERC20`, `TRC20`)               | `string`            |
| `params.amount`                 | Withdrawal amount                                              | `number`            |
| `params.fromAddress`            | Blockchain address sending the funds                           | `string`            |
| `params.toAddress`              | Recipient blockchain address                                   | `string`            |
| `params.hash`                   | Transaction hash on the blockchain, can be `null` initially    | `string` or `null`  |
| `params.status`                 | Transaction status (`pending`, `success`, `failed`, etc.)      | `string`            |
| `params.networkFee`             | Fee paid for the on-chain transaction                          | `number`            |
| `params.confirmation`           | Number of confirmations received on the blockchain             | `number`            |
| `params.fromWalletId`           | Internal ID of the sending wallet                              | `string`            |
| `params.workspaceId`            | ID of the associated workspace or organization                 | `string`            |
| `params.createdAt`              | Timestamp when the withdrawal was initiated                    | `string` (ISO 8601) |
| `params.updatedAt`              | Last updated timestamp of the transaction                      | `string` (ISO 8601) |
| `params.wallet.id`              | Wallet ID related to the withdrawal                            | `string`            |
| `params.wallet.clientUserId`    | Associated user ID (optional)                                  | `string` or `null`  |
| `params.wallet.email`           | Email tied to the wallet                                       | `string`            |
| `params.wallet.name`            | Wallet label                                                   | `string`            |
| `params.wallet.asset.coin`      | Coin in the wallet                                             | `string`            |
| `params.wallet.asset.balance`   | Current balance in wallet                                      | `number`            |
| `params.wallet.asset.frozen`    | Frozen amount in wallet                                        | `number`            |
| `params.wallet.asset.updatedAt` | Last balance update time                                       | `string` (ISO 8601) |
| `params.wallet.isSubWallet`     | Whether it's a sub-wallet                                      | `boolean`           |
