Skip to main content
The Fees API returns, in a single call, all effective fees for your account: pix, boleto, credit card (1x to 12x installments), withdrawal, refund, and chargeback. The values are already resolved for the authenticated company — you don’t need to calculate precedence or know where the fee came from.
Fees are configured by scope and resolved in the order platform → company → global. When nothing has been configured, the value falls back to 0. The response always delivers the effective value for your account, already resolved. Learn more about the model in Values · Fees.

How to read a fee

Every fee has two components:

percentage

Percentage applied to the transaction amount. 3.99 means 3.99%.

fixed

Fixed portion in cents (integer). 350 means $3.50.
The currency follows the ISO 4217 standard (BRL, USD, …). Fees are resolved per currency; if there is no specific override for the requested currency, it falls back to the currency-agnostic fee that has been configured.

Endpoints

MethodRouteDescription
GET/feesResolved fee table for the account
All requests use the x-api-key header. See Authentication.

Retrieve the fee table

GET /fees
Returns pix, boleto, credit card from 1x to 12x installments, withdrawal, refund, and chargeback (fee + penalty) for the specified currency.

Query parameters

currency
string
Currency code in ISO 4217, exactly 3 letters (e.g., BRL). It is automatically normalized to uppercase, so brl and BRL work the same way.Optional. When omitted, uses the default currency of your company. If the company also has no default currency configured, the fallback is BRL.

Request example

# Using the company's default currency
curl https://api.sandbox.z2pay.com/fees \
  -H "x-api-key: YOUR_SANDBOX_KEY"
# Specifying a currency explicitly
curl "https://api.sandbox.z2pay.com/fees?currency=BRL" \
  -H "x-api-key: YOUR_SANDBOX_KEY"

Response

200 OK
{
  "currency": "BRL",
  "pix": { "percentage": 0.99, "fixed": 0 },
  "boleto": { "percentage": 0, "fixed": 350 },
  "creditCard": [
    { "installments": 1, "percentage": 3.99, "fixed": 0 },
    { "installments": 2, "percentage": 4.49, "fixed": 0 },
    { "installments": 3, "percentage": 4.99, "fixed": 0 },
    { "installments": 4, "percentage": 5.29, "fixed": 0 },
    { "installments": 5, "percentage": 5.59, "fixed": 0 },
    { "installments": 6, "percentage": 5.89, "fixed": 0 },
    { "installments": 7, "percentage": 6.09, "fixed": 0 },
    { "installments": 8, "percentage": 6.29, "fixed": 0 },
    { "installments": 9, "percentage": 6.49, "fixed": 0 },
    { "installments": 10, "percentage": 6.69, "fixed": 0 },
    { "installments": 11, "percentage": 6.89, "fixed": 0 },
    { "installments": 12, "percentage": 6.99, "fixed": 0 }
  ],
  "withdrawal": { "percentage": 0, "fixed": 367 },
  "refund": { "percentage": 0, "fixed": 0 },
  "chargeback": {
    "fee": { "percentage": 0, "fixed": 0 },
    "penalty": { "percentage": 0, "fixed": 0 }
  }
}
The numbers above are illustrative. Actual fees depend on your account configuration — always read them from the API response; never hardcode values in your code.

Response fields

currency
string
Currency of the returned fees (ISO 4217). Reflects the currency query parameter, the company’s default currency, or BRL as the last fallback.
pix
object
Fee for the pix payment method.
boleto
object
Fee for the boleto payment method, with the same percentage and fixed attributes.
creditCard
array
List with one entry per installment count, always from 1x to 12x (12 items).
withdrawal
object
Withdrawal/payout fee (percentage + fixed).
refund
object
Refund fee (percentage + fixed).
chargeback
object
Fees associated with chargebacks.
The creditCard array always has 12 items, even if your account does not operate with all installment options. To get the fee for a specific installment count, filter by installments (e.g., creditCard.find(c => c.installments === 3)).

Errors

This endpoint requires API Key authentication. Common errors: The error format is standardized across the entire API — details in Errors.

See also

Fees Concept

How fees are modeled and resolved by precedence.

Settlement

How fees impact the net amount to be received.

Split

Splitting amounts between recipients.

Authentication

How to generate and send your API Key.