Fees, Balances and Reconciliation
Fees in a quote
Every quote returns appliedFees, a list of five entries. All amounts are in the input currency.
type | What it is |
|---|---|
Markup Fee | Your own markup, if you send one. It goes to your account. |
In Fee | Avenia's fee for the input currency and payment method. |
Conversion Fee | Avenia's fee for converting between currencies. Zero when there's no real conversion, such as BRL → BRLA or USD → USDC. |
Out Fee | Avenia's fee for the output currency and payment method. |
Gas Fee | The blockchain network cost, when the operation sends on-chain. |
Avenia's fees are set in your contract. How they are collected depends on your fee settlement mode:
IMMEDIATE: every fee is deducted from the operation, andoutputAmountis what arrives.EOM: Avenia's fees aren't deducted from the operation (your markup still is, and any rebate share in your contract); they stay listed inappliedFeesand are billed at the end of the month, sooutputAmountis higher.FEE_ACCOUNT: priced likeEOM, and Avenia's fees are charged to your fee account when the ticket completes. The fee account belongs to the main account and pays for the main account's and every sub-account's operations.
A quote without feeSettlement uses your account's default: EOM when end-of-month billing is enabled for your account, IMMEDIATE otherwise, unless you set another default — see Which mode a quote uses.
The quote's outputAmount is always the amount that will be delivered for the mode used.
Balances: BRLA, not BRL
Your Avenia balance is held in tokens: BRLA (Avenia's Brazilian real token, 1 BRLA = 1 BRL), USDC, USDT, EURC and others. A PIX deposit of R$100 into your balance becomes 100 BRLA, minus any fees deducted under your fee settlement mode. When you pay out with PIX, BRLA is converted to BRL 1:1 on the way out.
Read balances with GET /v2/account/balances (add subAccountId for a sub-account). A balance can lag a just-completed operation by a few seconds; the ticket status is the source of truth for whether an operation finished.
Matching a payment to a ticket
Every ticket carries the identifiers to reconcile it with your records:
| Field | What it is |
|---|---|
id | The Avenia ticket ID. |
externalId | Your reference, if you sent one when creating the ticket. |
brazilianFiatSenderInfo.endToEndId | The PIX end-to-end ID of a PIX deposit (the payer's side). |
brazilianFiatReceiverInfo.endToEndId | The PIX end-to-end ID of a PIX payout. |
quote.appliedFees | The fees of that operation. |
GET /v2/account/tickets/ filters by externalId and endToEndId, among others — see Get All Tickets. The account statement lists every balance change, and async reports export them.
A PIX received on your static key or BR Code without a ticket creates a ticket automatically, with reason Pix deposit without ticket. It shows up in the ticket list and in webhooks like any other.
Limits
Each account — the main account and each sub-account separately — has monthly limits per currency and per direction (fiat in, fiat out, on-chain out), plus a global limit in USD that covers all currencies. An operation must fit both its currency's limit and, converted to USD, the global one. Read them, with what you've used this month, at Get Account Limits.
- Creating the ticket returns
400user does not have enough BRL limit for operation(or…GLOBAL limit…) when the amount doesn't fit the remaining limit. On-chain deposits aren't limited. - Limits are checked again when the ticket runs. A PIX deposit over the limit is refunded to the payer with
failureReasonuser does not have enough limit; a payout over the limit endsPARTIAL-FAILEDwithuser doesn't have enough limit available, and the amount stays in your balance.