Skip to main content
POST
/
virtual-accounts
/
fees
/
preview
Preview transaction fee
curl --request POST \
  --url https://prod-api.pcxpay.com/v1/virtual-accounts/fees/preview \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <x-api-key>' \
  --data '
{
  "transaction_type": "<string>",
  "amount": 123,
  "currency": "<string>"
}
'
{
  "fee_amount": 123,
  "fee_currency": "<string>",
  "total_amount": 123
}

Headers

Authorization
string
default:NONE
required

Bearer JWT for user-facing flows (Bearer eyJraWQ...), or the literal string NONE when authenticating via API key.

Example:

"Bearer eyJraWQ..."

X-Api-Key
string
default:NONE
required

API key for server-to-server flows, or the literal string NONE when authenticating via JWT.

Example:

"pcx_abc123_xxxx"

Body

application/json
transaction_type
string
required

Type of transaction (e.g. withdrawal, transfer)

amount
number<float>
required
currency
string
required

Response

Fee preview

fee_amount
number<float>
fee_currency
string
total_amount
number<float>