Skip to main content
POST
Get Transaction Fee
Calculate the fee for a given transaction type, currency, and amount before executing the transaction.

Example Request

Example Response

Parameters


Quoting a specific withdrawal method

Fees are configured per rail, so an ACH and a wire to the same bank are usually priced differently. Pass withdrawal_method to quote the rail you will actually send on:
Swap "ach" for "domestic_wire" or "international_wire" to compare rails before deciding which to send on — everything else in the request stays the same.
Omitting withdrawal_method quotes the currency-level fee, which may not be what the withdrawal is charged if a rail-specific fee applies to your account. Always send the rail you intend to use.

Quoting a saved beneficiary

If you are paying a saved beneficiary, pass beneficiaryId instead and the rail and destination country are taken from that beneficiary — no need to restate them:
destination_country still wins over the beneficiary’s own value when you send it. withdrawal_method does not: a withdrawal always prices off the beneficiary’s saved rail, so sending a withdrawal_method that contradicts it returns a 400 explaining which rail the payout will actually be charged as. Omit it, or update the beneficiary’s withdrawal_method first.
The beneficiary must belong to your account. An unknown beneficiaryId returns a 400 rather than falling back to a default fee — a quote never silently prices a different rail than the withdrawal will use.

FX payouts

For a cross-currency payout, add recipientCurrency. The response then also carries feeInRecipientCurrency:
Call this endpoint before initiating a withdrawal or swap to show your users the exact fee they’ll be charged. Send the same withdrawal_method (or beneficiaryId) you will send to POST /wallet/withdraw so the quote matches the charge.

Authorizations

X-API-Key
string
header
required

Your Rolla API key

Body

application/json
currency
string
required

Currency of the wallet being debited. Currency code, 3 or 4 letters, upper-cased by the server (for example NGN, USD, USDC).

Required string length: 3 - 4
Example:

"NGN"

transactionType
enum<string>
required

Type of transaction the fee is quoted for

Available options:
deposit,
withdrawal,
swap,
card_funding,
payin
Example:

"withdrawal"

amount
integer
required

Transaction amount, in the smallest unit of currency. Whole number of the smallest currency unit (kobo for NGN, cents for USD). Fractional values and amounts below 1 are rejected with a 400.

Required range: x >= 1
Example:

5000

recipientCurrency
string

For FX payouts, the currency the beneficiary receives. The response then also carries feeInRecipientCurrency.

Required string length: 3 - 4
Example:

"NGN"

destination_country
string

Two-letter country code of the destination bank, for fees scoped to a corridor. Upper-cased by the server.

Required string length: 2
Example:

"US"

withdrawal_method
enum<string>

Payout rail to price. Fees are configured per rail, so an ACH and a wire to the same bank are usually priced differently; send the rail you will actually withdraw on. Omitted, the currency-level fee is quoted. Sending one that contradicts the saved rail of a beneficiaryId is rejected with a 400.

Available options:
domestic_wire,
international_wire,
ach,
local_transfer,
crypto_usdt,
crypto_usdc,
rolla_transfer,
mobile_money
Example:

"ach"

beneficiaryId
string<uuid>

Quote a saved beneficiary: destination_country and withdrawal_method are read from it when not supplied. The beneficiary must belong to your account, and an id that resolves to nothing returns a 400 rather than a default fee.

Example:

"c3d4e5f6-a7b8-9012-cdef-123456789012"

Response

Fee calculated successfully

status
integer
required
Example:

200

message
string
required
Example:

"Transaction fee retrieved successfully"

success
boolean
required
Example:

true

data
object
required