Get Payout Fees

Before you create a Payout Request, you can get the fees and exchange rate for it, for example to show them to your end user. The Payouts API has two endpoints for this. Specify either the source tokenAmount (the USDC you send) or the destination fiatAmount (the fiat your recipient receives). Add the on-behalf-of header to get the fees for your end user's Organization.

  • The exchange rate is the live rate. It is not locked until you execute the payout.
  • These endpoints apply only to fiat payouts. Payouts to a blockchain wallet, such as USDC to USDC, have no exchange fee.

Example requests

curl --request POST \
     --url https://api-staging.muralpay.com/api/payouts/fees/token-to-fiat \
     --header "accept: application/json" \
     --header "authorization: Bearer $MURAL_API_KEY" \
     --header "content-type: application/json" \
     --header "on-behalf-of: $ORGANIZATION_ID" \
     --data '
{
  "tokenFeeRequests": [
    {
      "amount": {
        "tokenAmount": 40,
        "tokenSymbol": "USDC"
      },
      "fiatAndRailCode": "cop"
    }
  ]
}
'
curl --request POST \
     --url https://api-staging.muralpay.com/api/payouts/fees/fiat-to-token \
     --header "accept: application/json" \
     --header "authorization: Bearer $MURAL_API_KEY" \
     --header "content-type: application/json" \
     --header "on-behalf-of: $ORGANIZATION_ID" \
     --data '
{
  "fiatFeeRequests": [
    {
      "fiatAndRailCode": "cop",
      "fiatAmount": 100000,
      "tokenSymbol": "USDC"
    }
  ]
}
'

The response includes the exchangeRate, the exchangeFeePercentage, the transactionFee, the feeTotal, and the estimated amount on the other side of the conversion.


Did this page help you?