Getting a commission for making a withdrawal

The method allows you to get data on the commission that will be debited during the withdrawal

Getting a commission for making a withdrawal

POSThttps://app.apollopayment.io/api-gateway/withdrawal-fee-token
Header parameters
Body
advancedBalanceId*string

Identifier of the advance balance from which the commission will be paid

Example: "97ed074e-f6ce-441f-a1eb-1e3211e15f3f"
addressId*string

Identifier of the address from which you want to withdraw

Example: "d479f3e4-8671-4028-9dee-0f0cdaea463d"
amount*string

Amount you want to withdraw

Example: "200"
nativeboolean

Deduct the gas fee (network fee) from the native balance of the address (available for payment addresses, PAY_OUT type)

feeInAmountboolean

(Relevant for withdrawing coins) Deduct the network commission from the withdrawal amount or from the payer's funds. By default, the network commission is deducted from the withdrawal amount.

Response
Body
success*boolean

Request success indicator

response*RequestFeeResponse (object)

Commission request body

Request
const response = await fetch('https://app.apollopayment.io/api-gateway/withdrawal-fee-token', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "advancedBalanceId": "97ed074e-f6ce-441f-a1eb-1e3211e15f3f",
      "addressId": "d479f3e4-8671-4028-9dee-0f0cdaea463d",
      "amount": "200"
    }),
});
const data = await response.json();
Response
{
  "success": false,
  "response": {
    "blockchainFeeCurrencyUSDRate": "12.764",
    "blockchainFeeCurrency": "USDT",
    "withdrawalCurrencyUSDRate": "12.764",
    "blockchainFeeSource": "advanced_balance",
    "blockchainFee": "8.88",
    "blockchainFeeUSD": "8.88",
    "serviceFee": "1.2",
    "serviceFeeUSD": "1.2",
    "withdrawalMin": "2.0000",
    "token": "U2FsdGVkX1+qH7afNgLbqPOn50v/kDpRELnAV0PniaMvDsNtmZgN3ihHB51a/HykbF28dslwKqmjBk5Zl+Ppf98+Xx4AT2mIxPMYVFC9PP0ZS7arXRFkXtOvZjKsFthbCPVmAg96NQ+YFh0zC3ChEz63dFtJ14eJMsQ0aUugPKM=",
    "until": "2024-10-15T16:11:27.593Z"
  }
}

Last updated