Skip to main content
The Fees Engine is a plugin available in the Midaz Module that allows you to configure and manage transaction fees through a visual interface. Define fee rules, test calculations, and apply charges to transactions without writing code.

What is the Fees Engine?


The Fees Engine provides a complete fee management system that integrates with your Midaz Core infrastructure. It allows you to:
  • Define flexible fee rules: Create fees based on flat amounts, percentages, or a combination of both
  • Target specific transactions: Apply fees to particular transaction routes, segments, or ledgers
  • Set amount thresholds: Configure minimum and maximum transaction amounts for fee application
  • Waive fees selectively: Exempt specific accounts from fees when needed
  • Test before deploying: Use the fee calculator to simulate charges before enabling them

Accessing the Fees Engine


To access the Fees Engine in Lerian Console:
1

Open the Midaz Module

From the Lerian Console home page, select the Midaz product card.
2

Navigate to Plugins

In the left sidebar, locate the Plugins section.
3

Select Fees Engine

Click on Fees Engine to access the fee management interface.

Key concepts


Before working with the Fees Engine, understand these core elements:
  • Fee Package: A container that groups fee rules together and defines when they apply (transaction route, segment, amount range)
  • Fee Rule: An individual fee configuration within a package that specifies how a fee is calculated
  • Application Rule: The calculation method used—flat fee, percentage, or maximum between both
  • Reference Amount: Whether percentage fees are calculated on the original transaction amount or after other fees
  • Priority: The order in which multiple fees are applied within a package

Available features


How fees are calculated


When a transaction is processed, the Fees Engine:
  1. Matches the transaction to applicable fee packages based on route, segment, and ledger
  2. Validates the amount falls within the package’s minimum and maximum range
  3. Checks for waivers to see if the source account is exempt
  4. Applies fee rules in priority order
  5. Calculates each fee using the specified application rule and reference amount
  6. Credits fee accounts with the calculated amounts

Fee calculation types


The Fees Engine supports three calculation methods:
A fixed amount charged regardless of transaction value.Example: $2.50 per transaction
A percentage of the transaction amount.Example: 1.5% of 100=100 = 1.50 fee
Applies whichever is higher between a flat amount and a percentage.Example: Max of $1.00 or 2%
  • On 30:max(30: max(1.00, 0.60)=0.60) = 1.00
  • On 100:max(100: max(1.00, 2.00)=2.00) = 2.00

Integration with Midaz Core


The Fees Engine works with your existing Midaz infrastructure:
  • Ledgers: Scope fee packages to specific ledgers
  • Segments: Apply different fee structures to customer segments
  • Transaction Routes: Define which fees apply to which transaction flows
  • Accounts: Designate accounts to receive fee credits and specify waived accounts

Next steps