Skip to main content

Fee Settlement

feeSettlement decides how the Avenia fees of a ticket are paid. Send it as a query parameter of the quote (GET /v2/account/quote/fixed-rate); the quote response returns the mode that was applied in feeSettlement, and the ticket created from it keeps that mode.

ModeHow the fees are paid
IMMEDIATEDeducted from the ticket's amount. The recipient gets the amount minus the fees.
EOMNot deducted. The fees of the month are charged together on an end-of-month invoice.
FEE_ACCOUNTNot deducted. The fees are charged to your Fee Account.

IMMEDIATE is always available. EOM and FEE_ACCOUNT are enabled by Avenia per account; contact your account manager to enable them.

Which mode a quote uses​

  1. If the quote sends feeSettlement, that mode is used. A mode that is not enabled for your account returns 400.
  2. If it doesn't, your account's default mode is used (see below).
  3. A refund always uses the mode of the ticket it refunds.

The default is the mode you set with PUT /v2/account/fee-settlement, as long as that mode is still enabled. Without a choice of yours, or if the chosen mode is no longer enabled, the default is EOM when the end-of-month invoice is enabled for your account, and IMMEDIATE otherwise. A FEE_ACCOUNT default doesn't apply to input currencies the Fee Account can't pay (Which balance pays); those quotes fall back to the next default.

Get the modes and the default​

Endpoint​

GET /v2/account/fee-settlement

Available to every access of the account. With subAccountId, it returns the same setting: the default belongs to the main account and applies to all its sub-accounts.

cUrl Example​

curl -X GET "https://api.sandbox.avenia.io:10952/v2/account/fee-settlement" \
-H "Authorization: Bearer <token>"

JSON Response​

{
"modes": ["IMMEDIATE", "EOM", "FEE_ACCOUNT"],
"default": "EOM"
}
  • modes: the modes enabled for your account.
  • default: the mode a quote without feeSettlement uses right now.

Set the default​

Endpoint​

PUT /v2/account/fee-settlement

Only an admin access of the main account can change it, and without subAccountId.

Fields​

FieldTypeDescription
defaultstringIMMEDIATE, EOM or FEE_ACCOUNT (must be one of your modes). Send "" to remove your choice and go back to the account's standard default.

cUrl Example​

curl -X PUT "https://api.sandbox.avenia.io:10952/v2/account/fee-settlement" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"default": "FEE_ACCOUNT"}'

JSON Response​

The same format as the GET, after the change:

{
"modes": ["IMMEDIATE", "EOM", "FEE_ACCOUNT"],
"default": "FEE_ACCOUNT"
}

Errors​

StatusWhen
400default is missing, unknown, or not enabled for your account; or a subAccountId was sent.
403The access is not an admin of the main account, or it is view-only.
info

With FEE_ACCOUNT as the default, every quote that doesn't send feeSettlement is paid by the Fee Account. If the Fee Account doesn't cover a ticket's fees, that ticket fails with failureReason: "insufficient balance on the fee account, please top it up" (details).