Transfer Funds to Master Account
POST
/wallets/withdraw-to-master/
Transfers funds from a user wallet (sub-account) to the master account. This operation decreases the sub-account balance and increases the master account balance by the specified amount.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| wallet_id | string | Yes | The external ID of the user wallet (sub-account) to transfer funds from |
| currency | string | Yes | The currency code (e.g., "USDTTRC20", "BTC") |
| amount | number | Yes | The amount to transfer (must be positive) |
Example Request
POST /wallets/withdraw-to-master/
Content-Type: application/json
X-API-Key: your_api_key_here
{
"wallet_id": "550e8400-e29b-41d4-a716-446655440000",
"currency": "USDTTRC20",
"amount": 50.00
}
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| result | object | Result object containing transaction details |
Result Object
| Parameter | Type | Description |
|---|---|---|
| id | string | Transaction identifier |
| amount | number | Amount transferred |
| currency | string | Currency code of the transferred amount |
| status | string | Status of the transaction (usually "completed") |
Example Response
{
"result": {
"id": "6d3f0960-5551-4af5-9601-aeecc512a87a",
"amount": 50.00,
"currency": "USDTTRC20",
"status": "completed"
}
}
Error Codes
| Status Code | Error Message | Description |
|---|---|---|
| 400 | "User ID, currency, and amount are required" | Missing required parameters |
| 400 | "Amount must be positive" | Attempting to transfer zero or negative amount |
| 400 | "Insufficient balance" | User wallet has insufficient balance to complete the transfer |
| 404 | "Account not found" | The specified account ID does not exist |
| 404 | "Balance not found" | No balance exists for the specified currency in the user wallet |
| 404 | "Tenant balance not found" | No balance exists for the specified currency in the master account |
| 401 | authentication_failed | Authentication failed. Check your API key or OAuth 2.0 access token |
| 403 | insufficient_permissions | Your API key does not have required permissions |
| 500 | "Internal server error" | An error occurred on the server |
Notes
- This endpoint is used to withdraw funds from individual player wallets back to the master account.
- The transfer is atomic and will either succeed completely or fail completely.
- Both accounts must have the same currency for the transfer to succeed.
- The user wallet balance is decreased and the master account balance is increased by the same amount.
- You can monitor your master account and user wallet balances using the
/user/balancesendpoint.
iGaming Integration Note
Casino operators should use this endpoint as part of the withdrawal process. When a player requests a withdrawal, first transfer the funds from their wallet to your master account using this endpoint, then create a withdrawal request from your master account using the /withdrawal/ endpoint. This ensures proper accounting and separation of player funds.