> For the complete documentation index, see [llms.txt](https://docs.cashramp.co/cashramp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cashramp.co/cashramp/cashramp-api/withdraw-onchain.md).

# Withdraw Onchain

Withdraw your Cashramp balance to an external wallet as a supported stablecoin.

### Create the Withdrawal

```graphql
mutation {
  withdrawOnchain(
    address: "0xc8802fEaB2FaFb48B7d1aDe77e197002c210f391"
    amountUsd: 200
    network: "BASE"
    symbol: "USDC"
    metadata: { payoutId: "payout_123" }
  ) {
    id # Track this ID or wait for the webhook (see below)
    quantity
    symbol
    network
    fee
    status
  }
}
```

#### Arguments

| Name             | Type                  | Required | Description                                                                                                   |
| ---------------- | --------------------- | -------- | ------------------------------------------------------------------------------------------------------------- |
| `address`        | `String!`             | **Yes**  | Destination wallet address. It must be valid for the selected network.                                        |
| `amountUsd`      | `Decimal!`            | **Yes**  | USD amount to withdraw. The minimum, maximum, and network fee depend on the selected stablecoin-network pair. |
| `network`        | `String`              | No       | Destination network code. Defaults to `OP`.                                                                   |
| `symbol`         | `String`              | No       | Stablecoin to send. Defaults to `USDT`.                                                                       |
| `metadata`       | `JSON`                | No       | Your own key-value data for reconciliation. Cashramp includes it in `onchain_tx.updated` webhooks.            |
| `travelRuleInfo` | `TravelRuleInfoInput` | No       | Destination ownership information. It contains `selfOwned`, `beneficiaryName`, and `vaspName`.                |

#### Supported Networks

| Network             | Code    | Supported stablecoins  | Network fee |
| ------------------- | ------- | ---------------------- | ----------- |
| Optimism            | `OP`    | `USDT`, `USDC`         | **$1.00**   |
| Celo                | `CELO`  | `USDT`, `USDC`, `CUSD` | **$0.50**   |
| Base                | `BASE`  | `USDC`                 | **$0.10**   |
| Polygon             | `MATIC` | `USDC`                 | **$0.50**   |
| Binance Smart Chain | `BSC`   | `USDT`, `USDC`         | **$0.50**   |
| Solana              | `SOL`   | `USDT`, `USDC`         | **$1.00**   |

`symbol` and `network` are validated together. Specify both when you do not want the default `USDT` on `OP` route. Fees and withdrawal limits vary by pair; the transaction response includes the applied fee.

The mutation fails if:

* The stablecoin or stablecoin-network pair is unsupported.
* `address` is invalid on the selected network.
* `amountUsd` is outside the selected pair's withdrawal limits.
* Your Cashramp balance cannot cover `amountUsd` plus the returned `fee`.

***

### Receive Status Updates

You’ll get a `onchain_tx.updated` webhook as the transaction progresses.

```json
{
  "event_type": "onchain_tx.updated",
  "data": {
    "id": "VHlwZXM6Ok9uY2hhaW5UeC1hYzNmODk2Mi1jNzRkLTRmNWMtYTQ5ZC1kYmIzMWM1MDc5Mzc=",
    "address": "0xc8802fEaB2FaFb48B7d1aDe77e197002c210f391",
    "status": "completed",
    "quantity": 200,
    "fee": 0.1,
    "symbol": "USDC",
    "network": "BASE",
    "txhash": "0x8e473aa19bcb2ce3107fc16b88effda50a21d6853a7db67e357abf312c26eaf7",
    "metadata": {
      "payoutId": "payout_123"
    }
  }
}
```

The withdrawal status is `pending`, `processing`, `completed`, `failed`, or `canceled`. Use the webhook (or poll `onchainWithdrawal(id)`) to confirm finality before updating your ledger.
