Withdrawals API Reference
Complete reference for the Withdrawals API endpoints. Manage withdrawal settings and create withdrawal requests.
Withdrawal strategy values
The strategy field is a number in both settings and withdrawal requests:
| Value | Name | Description |
|---|---|---|
1 | multi-network | Direct transfers per chain; no cross-chain bridge. |
2 | bridge | Use Relay to bridge when the quote requires it; otherwise same as multi-network. |
See Withdrawal strategy for details. For how gas is paid (paymaster, self-fund, hot wallet), see Gas and fee funding.
Valid chain types
Withdrawal addresses are keyed by chain type. Valid keys are: evm, solana, bitcoin, tron, cosmos, polkadot, move, ton. Use these as keys in:
- Withdrawal Settings —
addresses: e.g.{ "evm": "0x...", "solana": "...", "bitcoin": "bc1q..." } - Payment Intents and Payment Links —
withdrawal_addresses: same shape
Each address is validated for that chain type (EVM, Solana, Bitcoin, etc.). To list networks by chain type, use GET /payments/networks?chainType=evm (or another valid chain type). See Payment minimums for per-chain-type minimums.
Per-payment withdrawal addresses (by chain type)
When you create a Payment Intent or Payment Link, you can optionally set withdrawal_addresses (or withdrawalAddresses for links) as a key-value object. Keys are chain types from the network table (e.g. evm, solana, bitcoin). Each value is the withdrawal address for that chain. If omitted or empty for a chain, your account's default from Withdrawal Settings for that chain type is used. Addresses are validated per chain (EVM, Solana, Bitcoin, etc.).
Base URL
https://api.orcarail.com/api/v1
Withdrawal Settings
Get Withdrawal Settings
Get the authenticated user's withdrawal settings (addresses by chain type, strategy, enabled flag).
GET /withdrawals/settings
Authentication
- Bearer Token (JWT) - Required
Response
{
"id": "uuid",
"userId": "uuid",
"addresses": {
"evm": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"solana": "GTtzwxqy67xx9DVESJjx28TgXqpc8xTqtiytgNMaQBTE",
"bitcoin": "bc1q..."
},
"isEnabled": true,
"strategy": 1,
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-01T12:00:00.000Z"
}
Keys in addresses are chain types (evm, solana, bitcoin, tron, cosmos, polkadot, move, ton). Each address is validated for that chain. Returns null if no settings exist yet.
Update Withdrawal Settings
Create or update withdrawal settings.
PUT /withdrawals/settings
Authentication
- Bearer Token (JWT) - Required
Request Body
All fields are optional. Only include fields to update.
| Parameter | Type | Required | Description |
|---|---|---|---|
addresses | object | No | Withdrawal addresses by chain type. Keys: evm, solana, bitcoin, etc. Values: address string for that chain. Validated against a network of that chain type. |
isEnabled | boolean | No | Whether withdrawals are enabled |
strategy | number | No | Withdrawal strategy (e.g. multi-network, bridge) |
Response
Same shape as GET; addresses is the key-value object. When auto-withdraw is enabled, at least one address is required.
Withdrawal Requests
Create Withdrawal Request
Create a new withdrawal request.
POST /withdrawals/requests
Authentication
- Bearer Token (JWT) - Required
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
amount | string | Yes | Amount to withdraw (e.g., "0.1") |
tokenId | string | Yes | Token ID (UUID) to withdraw |
sourceNetworkId | string | Yes | Source network ID (UUID) |
destinationNetworkId | string | No | Destination network ID (UUID, optional) |
address | string | Yes | Destination address (e.g., 0x...) |
strategy | number | Yes | Withdrawal strategy: 1 = multi-network, 2 = bridge. See strategy values. |
Response
{
"id": "uuid",
"userId": "uuid",
"amount": "0.1",
"tokenId": "uuid",
"sourceNetworkId": "uuid",
"destinationNetworkId": "uuid",
"address": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"strategy": 1,
"status": "pending",
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-01-01T00:00:00.000Z"
}
List Withdrawal Requests
List withdrawal requests for the authenticated user.
GET /withdrawals/requests
Authentication
- Bearer Token (JWT) - Required
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | number | No | Maximum number of requests to return |
Response
[
{
"id": "uuid",
"userId": "uuid",
"amount": "0.1",
"tokenId": "uuid",
"sourceNetworkId": "uuid",
"address": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"strategy": 1,
"status": "completed",
"createdAt": "2024-01-01T00:00:00.000Z"
}
]
Withdrawal Summary
Get Withdrawal Summary
Get a summary of balances and withdrawal totals by network and token.
GET /withdrawals/summary
Authentication
- Bearer Token (JWT) - Required
Response
{
"byNetwork": [
{
"networkId": 1,
"networkName": "Ethereum",
"totalAmount": "100.50",
"totalUsdcValue": "100.50"
}
],
"byToken": [
{
"tokenId": 1,
"tokenSymbol": "USDC",
"totalAmount": "100.50",
"totalUsdcValue": "100.50"
}
],
"totals": {
"totalEarnedUsdc": "1250.50",
"totalWithdrawnUsdc": "500.0",
"remainingUsdc": "750.5"
}
}
Status Codes
| Status Code | Description |
|---|---|
200 | Success |
201 | Created |
400 | Bad Request |
401 | Unauthorized |
404 | Not Found |
500 | Internal Server Error |
See Also
- Withdrawal strategy — multi-network vs bridge and where to set strategy
- Gas and fee funding — paymaster, native self-fund, and hot wallet
- Dashboard - Dashboard summary including balances
- Payments - Payment links and transactions