GuidesAPI ReferenceChangelog
Changelog
Improved

v1.0.14

amount_type for Withdrawals — New Request Field

POST /v1/customers/{customer_id}/withdrawals

Added an optional amount_type field to control how the fee is applied to the withdrawal amount:

FieldTypeRequiredDescription
amount_typestringNoControls 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_type is omitted, it defaults to SEND_AMOUNT (existing behavior).
  • SEND_AMOUNT: the amount represents what leaves the sender's account. Recipient gets amount - fee.
  • RECEIVE_AMOUNT: the amount represents what the recipient gets. Sender is debited amount + 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"
  }
}