Skip to main content

Create Withdrawal

Creates a request to withdraw USDT to a TRC-20 wallet.

Endpoint

POST /v1/withdrawals

Request Parameters

ParameterTypeRequiredDescription
terminal_idstringYesID of the terminal to withdraw from
amountnumberYesWithdrawal amount in USDT
addressstringYesTRC-20 wallet address
subtract_fee_from_amountbooleanNoSubtract 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

FieldTypeDescription
idstringWithdrawal ID (UUID)
amountnumberWithdrawal amount
feenumberFee
currencystringCurrency (USDT)
addressstringWallet address
tx_hashstringTransaction hash (after sending)
statusstringStatus
created_atstringCreation time
updated_atstringUpdate time

Statuses

StatusDescription
pendingAwaiting processing
processingIn progress
completedSuccessfully sent
failedError

Errors

CodeHTTPDescription
WDR_001400Invalid parameters
WDR_002400Insufficient funds