Create Withdrawal
Creates a request to withdraw USDT to a TRC-20 wallet.
Endpoint
POST /v1/withdrawals
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
terminal_id | string | Yes | ID of the terminal to withdraw from |
amount | number | Yes | Withdrawal amount in USDT |
address | string | Yes | TRC-20 wallet address |
subtract_fee_from_amount | boolean | No | Subtract the fee from the amount (default false) |
Request Example
curl -X POST https://api.bopay.io/v1/withdrawals \
-H "Content-Type: application/json" \
-H "X-Identity: your-api-key" \
-H "X-Signature: your-signature" \
-d '{
"terminal_id": "550e8400-e29b-41d4-a716-446655440000",
"amount": 100,
"address": "TNPXDJcnLqNwPbTB6ux7k1fSgM2v7jetP9"
}'
Subtracting the Fee from the Amount
curl -X POST https://api.bopay.io/v1/withdrawals \
-H "Content-Type: application/json" \
-H "X-Identity: your-api-key" \
-H "X-Signature: your-signature" \
-d '{
"terminal_id": "550e8400-e29b-41d4-a716-446655440000",
"amount": 100,
"address": "TNPXDJcnLqNwPbTB6ux7k1fSgM2v7jetP9",
"subtract_fee_from_amount": true
}'
With subtract_fee_from_amount: true the fee is subtracted from the amount. For example, with an amount of 100 USDT and a 5 USDT fee, 95 USDT will arrive at the wallet.
info
Funds are frozen on the balance of the specified terminal. To get terminal balances, use GET /v1/terminals.
Response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"amount": 100,
"fee": 5,
"currency": "USDT",
"address": "TNPXDJcnLqNwPbTB6ux7k1fSgM2v7jetP9",
"tx_hash": null,
"status": "pending",
"created_at": "2026-01-30T12:00:00Z",
"updated_at": "2026-01-30T12:00:00Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Withdrawal ID (UUID) |
amount | number | Withdrawal amount |
fee | number | Fee |
currency | string | Currency (USDT) |
address | string | Wallet address |
tx_hash | string | Transaction hash (after sending) |
status | string | Status |
created_at | string | Creation time |
updated_at | string | Update time |
Statuses
| Status | Description |
|---|---|
pending | Awaiting processing |
processing | In progress |
completed | Successfully sent |
failed | Error |
Errors
| Code | HTTP | Description |
|---|---|---|
WDR_001 | 400 | Invalid parameters |
WDR_002 | 400 | Insufficient funds |