Improved
v1.0.14
about 1 month ago by Mário Oliveira
amount_type for Withdrawals — New Request Field
amount_type for Withdrawals — New Request FieldPOST /v1/customers/{customer_id}/withdrawals
POST /v1/customers/{customer_id}/withdrawalsAdded an optional amount_type field to control how the fee is applied to the withdrawal amount:
| Field | Type | Required | Description |
|---|---|---|---|
amount_type | string | No | Controls how the fee is applied. SEND_AMOUNT (default): fee is deducted from the amount. RECEIVE_AMOUNT: fee is added on top of the amount. |
- When
amount_typeis omitted, it defaults toSEND_AMOUNT(existing behavior). SEND_AMOUNT: theamountrepresents what leaves the sender's account. Recipient getsamount - fee.RECEIVE_AMOUNT: theamountrepresents what the recipient gets. Sender is debitedamount + fee.
Request example:
{
"idempotency_key": "unique-key-123",
"amount": "100.00",
"asset": "USDT",
"network": "ETHEREUM",
"wallet_address": "0x...",
"amount_type": "RECEIVE_AMOUNT"
}
With a fee of 2.00:
- SEND_AMOUNT: sender debited 100.00, recipient receives 98.00.
- RECEIVE_AMOUNT: sender debited 102.00, recipient receives 100.00.
Response includes amount_type when applicable. The field is omitted for non-withdrawal transactions.
Transaction History — amount_type in Response
GET /v1/customers/{customer_id}/transactions
GET /v1/customers/{customer_id}/transactions/{transaction_id}
The amount_type field is now included in withdrawal transaction responses. For RECEIVE_AMOUNT withdrawals, the destination.amount reflects the actual amount the recipient receives.
{
"transaction_id": "c4e985bc-8b35-11f0-b308-2eaa4f6974f2",
"amount_type": "RECEIVE_AMOUNT",
"transaction_fee": {
"value": "2.00",
"asset": "USDT"
},
"source": {
"amount": "102.00",
"asset": "USDT"
},
"destination": {
"amount": "100.00",
"asset": "USDT"
}
}