> ## 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.

# Deposit Event

Webhooks for `Wallet-as-a-Service` deposit flow notifies you about incoming deposits and their status.

* **Parent Method:** `deposit`
* **Sub-Methods:**
  * **`pending`**: Triggered when a deposit is initiated and is awaiting blockchain confirmation.
  * **`updated`**: Triggered when the deposit progresses through intermediate confirmations(0,2...).
  * `success`: Triggered when the deposit is fully confirmed and credited to the wallet

<br />

### **Example Payload for Deposit:**

<CodeGroup>
  ```json deposit.pending | internal_transfer theme={null}
  {
    "requestId": "04afc1dd8ffae1f6f8c66f96eed0f5",
    "method": "deposit.pending",
    "params": {
      "id": "6817e9bb466d64e005d79d3c",
      "clientTxId": "0545fdb8-2f99-4de7-a114-8643cc3e41dc",
      "destination": "internal_transfer",
      "workspaceId": "67e723ed4b44a4f73dd2e8a2",
      "coin": "USDT",
      "amount": 9,
      "status": "pending",
      "fromWalletId": "6812c4977de20fb535e5bdee",
      "toWalletId": "6812b103908d2d0d49c7ff79",
      "tagMemo": null,
      "updatedAt": "2025-05-04T22:27:06.583Z",
      "createdAt": "2025-05-04T22:27:06.583Z",
      "wallet": {
        "id": "681510b8de0c43fbc4b40c06",
        "clientUserId": "681510b8de0c43fbc4b40c06",
        "email": "email@openxswitch.com",
        "name": "openxswitch-subwallet",
        "asset": {
          "coin": "USDT",
          "balance": 9,
          "frozen": 0,
          "updatedAt": "2025-05-02T18:36:39.814Z",
        },
        "isSubWallet": true,
      }
    }
  }
  ```

  ```json deposit.pending | on_chain theme={null}
  {
    "requestId": "b1244788a5e1c05295514ed5fe20fd",
    "method": "deposit.pending",
    "params": {
      "id": "6817fb74f634718f41b226d7",
      "clientTxId": "c1bd1995-8628-49f4-958c-bde56b468a0c",
      "destination": "on_chain",
      "workspaceId": "67e723ed4b44a4f73dd2e8a2",
      "coin": "USDT",
      "chain": "TRC20",
      "amount": 9,
      "network": "TRON",
      "hash": "e0e9e8f6afe63ab...fde9884e6a909549249294a645e6619202089ca489df4",
      "status": "pending",
      "confirmation": 0,
      "fromAddress": "TJ53sJLLwjwn7Pw3TPbdzreG7dvg....",
      "toAddress": "TGP1oMSEEDsAN4BqqjPus4v9pHEbPB....",
      "toWalletId": "6812b103908d2d0d49c7ff79",
      "tagMemo": null,
      "createdAt": "2025-05-04T23:42:43.694Z",
      "updatedAt": "2025-05-04T23:42:43.694Z",
      "wallet": {
        "id": "6812b103908d2d0d49c7ff79",
        "clientUserId": null,
        "email": "email@openxswitch.com",
        "name": "openxswitch-subwallet",
        "asset": {
          "coin": "USDT",
          "balance": 9,
          "frozen": 0,
          "updatedAt": "2025-05-02T18:36:39.814Z"
        },
        "isSubWallet": false
      }
    }
  }
  ```

  ```json deposit.updated | on_chain theme={null}
  {
    "requestId": "b1244788a5e1c05295514ed5fe20fd",
    "method": "deposit.updated",
    "params": {
      "id": "6817fb74f634718f41b226d7",
      "clientTxId": "c1bd1995-8628-49f4-958c-bde56b468a0c",
      "destination": "on_chain",
      "workspaceId": "67e723ed4b44a4f73dd2e8a2",
      "coin": "USDT",
      "chain": "TRC20",
      "amount": 9,
      "network": "TRON",
      "hash": "e0e9e8f6afe63ab2d...9884e6a909549249294a645e6619202089ca489df4",
      "status": "pending",
      "confirmation": 3,
      "fromAddress": "TJ53sJLLwjwn7Pw3TPbdzreG7dvg....",
      "toAddress": "TGP1oMSEEDsAN4BqqjPus4v9pHEbPB....",
      "toWalletId": "6812b103908d2d0d49c7ff79",
      "tagMemo": null,
      "createdAt": "2025-05-04T23:42:43.694Z",
      "updatedAt": "2025-05-04T23:42:43.694Z",
      "wallet": {
        "id": "6812b103908d2d0d49c7ff79",
        "clientUserId": null,
        "email": "email@openxswitch.com",
        "name": "openxswitch-subwallet",
        "asset": {
          "coin": "USDT",
          "balance": 9,
          "frozen": 0,
          "updatedAt": "2025-05-02T18:36:39.814Z"
        },
        "isSubWallet": false
      }
    }
  }
  ```

  ```json deposit.success | internal_transfer theme={null}
  {
    "requestId": "04afc1dd8ffae1f6f8c66f96eed0f5",
    "method": "deposit.success",
    "params": {
      "id": "6817e9bb466d64e005d79d3c",
      "clientTxId": "0545fdb8-2f99-4de7-a114-8643cc3e41dc",
      "destination": "internal_transfer",
      "workspaceId": "67e723ed4b44a4f73dd2e8a2",
      "coin": "USDT",
      "amount": 9,
      "status": "success",
      "fromWalletId": "6812c4977de20fb535e5bdee",
      "toWalletId": "6812b103908d2d0d49c7ff79",
      "tagMemo": null,
      "updatedAt": "2025-05-04T22:27:06.583Z",
      "createdAt": "2025-05-04T22:27:06.583Z",
      "wallet": {
        "id": "6812b103908d2d0d49c7ff79",
        "clientUserId": "681510b8de0c43fbc4b40c06",
        "email": "email@openxswitch.com",
        "name": "openxswitch-subwallet",
        "asset": {
          "coin": "USDT",
          "balance": 9,
          "frozen": 0,
          "updatedAt": "2025-05-02T18:36:39.814Z",
        },
        "isSubWallet": true,
      }
    }
  }
  ```

  ```json deposit.success | on_chain theme={null}
  {
    "requestId": "b1244788a5e1c05295514ed5fe20fd",
    "method": "deposit.success",
    "params": {
      "id": "6817fb74f634718f41b226d7",
      "clientTxId": "c1bd1995-8628-49f4-958c-bde56b468a0c",
      "destination": "on_chain",
      "workspaceId": "67e723ed4b44a4f73dd2e8a2",
      "coin": "USDT",
      "chain": "TRC20",
      "amount": 9,
      "network": "TRON",
      "hash": "e0e9e8f6afe63ab2d...9884e6a909549249294a645e6619202089ca489df4",
      "status": "success",
      "confirmation": 10,
      "fromAddress": "TJ53sJLLwjwn7Pw3TPbdzreG7dvg....",
      "toAddress": "TGP1oMSEEDsAN4BqqjPus4v9pHEbPB....",
      "toWalletId": "6812b103908d2d0d49c7ff79",
      "tagMemo": null,
      "createdAt": "2025-05-04T23:42:43.694Z",
      "updatedAt": "2025-05-04T23:42:43.694Z",
      "wallet": {
        "id": "6812b103908d2d0d49c7ff79",
        "clientUserId": null,
        "email": "email@openxswitch.com",
        "name": "openxswitch-subwallet",
        "asset": {
          "coin": "USDT",
          "balance": 9,
          "frozen": 0,
          "updatedAt": "2025-05-02T18:36:39.814Z"
        },
        "isSubWallet": false
      }
    }
  }
  ```
</CodeGroup>

<br />

### Reference

| Field                           | Description                                                            | Type                |
| :------------------------------ | :--------------------------------------------------------------------- | :------------------ |
| `requestId`                     | Unique ID for the request, used for tracking                           | `string`            |
| `method`                        | Event type identifier (e.g., `deposit.pending`)                        | `string`            |
| `params.id`                     | Unique ID of the deposit transaction                                   | `string`            |
| `params.clientTxId`             | External/client-assigned transaction ID                                | `string`            |
| `params.destination`            | Destination type (e.g., `internal_transfer`, `on_chain`)               | `string`            |
| `params.workspaceId`            | ID of the associated workspace or organization                         | `string`            |
| `params.coin`                   | Cryptocurrency involved (e.g. `USDT`)                                  | `string`            |
| `params.chain`                  | Blockchain protocol used (e.g. `TRC20`)                                | `string`            |
| `params.amount`                 | Deposit amount                                                         | `number`            |
| `params.network`                | Blockchain network name (e.g. `TRON`)                                  | `string`            |
| `params.hash`                   | Blockchain transaction hash                                            | `string`            |
| `params.status`                 | Current status (`pending`, `success`, etc.)                            | `string`            |
| `params.confirmation`           | Number of confirmations received                                       | `number`            |
| `params.fromAddress`            | Blockchain address sending the deposit                                 | `string`            |
| `params.fromWalletId`           | ID of the wallet the funds are coming from                             | `string`            |
| `params.toWalletId`             | ID of the wallet receiving the funds                                   | `string`            |
| `params.tagMemo`                | Optional tag or memo for deposits (used for some chains like XRP, XLM) | `string` \| `null`  |
| `params.updatedAt`              | Last updated timestamp of the transaction                              | `string` (ISO 8601) |
| `params.createdAt`              | Timestamp when the transaction was created                             | `string` (ISO 8601) |
| `params.wallet.id`              | ID of the receiving wallet                                             | `string`            |
| `params.wallet.clientUserId`    | ID of the user/client associated with the wallet                       | `string`            |
| `params.wallet.email`           | Email associated with the user/wallet                                  | `string`            |
| `params.wallet.name`            | Name or label of the wallet                                            | `string`            |
| `params.wallet.asset.coin`      | Coin held in the wallet (e.g., `USDT`)                                 | `string`            |
| `params.wallet.asset.balance`   | Available balance in the wallet                                        | `number`            |
| `params.wallet.asset.frozen`    | Frozen balance (e.g., pending withdrawals, locked funds)               | `number`            |
| `params.wallet.asset.updatedAt` | Last balance update timestamp                                          | `string` (ISO 8601) |
| `params.wallet.isSubWallet`     | Indicates whether the wallet is a sub-wallet                           | `boolean`           |
