Fee Packages are the building blocks of the Fees Engine. Each package defines a set of fee rules and the conditions under which they apply to Transactions.Documentation Index
Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt
Use this file to discover all available pages before exploring further.
The Fees Engine plugin must be enabled in Midaz module settings before this page is available.
What a Fee Package contains
A Fee Package lets you:
- Define fee calculation rules — flat fees, percentage-based fees, or combined calculations.
- Set amount ranges — apply fees only to transactions within a min/max range.
- Link to transaction routes — target specific transaction flows.
- Waive fees for specific accounts — exempt selected source accounts.
- Prioritize fee application — control the order in which multiple fees are applied.
Accessing the Fee Packages page
In the Midaz Module sidebar, expand Fees Engine and select Fee Packages. The page lists every configured package.
If you do not have any Fee Packages, the list will appear empty with a prompt to create your first package.
Available actions
From the Fee Packages page, you can:Create a Fee Package
Define new fee calculation rules for transactions
Edit a Fee Package
Update fee configurations and rules
Delete a Fee Package
Remove a fee package from your configuration
Understanding Fee Package structure
When creating or editing a fee package in Midaz Module, you’ll work with:
Basic information
- Fee Group Label (required) - A descriptive name for the fee package
- Description (required) - Explanation of the package purpose and when it applies
- Transaction Route (optional) - Link to a specific transaction route
- Segment (optional) - Associate with a specific segment
- Ledger (required) - The ledger this package applies to
Amount range
- Minimum Amount (required) - Lowest transaction amount for fee application
- Maximum Amount (required) - Highest transaction amount for fee application
- Waived Accounts (optional) - List of account aliases exempt from these fees
Fee rules
Each fee package can contain multiple fee rules with:- Fee Label - Name identifying this specific fee
- Application Rule - How the fee is calculated:
flatFee- Fixed amount regardless of transaction valuepercentual- Percentage of the transaction amountmaxBetweenTypes- Higher value between flat and percentage calculations
- Calculation Type -
flatorpercentage - Calculation Value - The fee amount or percentage
- Reference Amount - Base for percentage calculation:
originalAmount- Calculate on original transaction valueafterFeesAmount- Calculate after other fees are applied
- Priority - Order of fee application (lower numbers apply first)
- Is Deductible From - Whether this fee is deducted from the transaction
- Credit Account - Account that receives the fee amount
Common use cases
Simple flat fee per transaction
Simple flat fee per transaction
Apply a fixed fee to all transactions within an amount range:
- Application Rule:
flatFee - Calculation:
flatwith value2.50 - Example: 10 and $1000
Percentage-based fee
Percentage-based fee
Charge a percentage of the transaction amount:
- Application Rule:
percentual - Calculation:
percentagewith value1.5 - Example: 1.5% fee on transfers, where 1.50 fee
Tiered fee structure
Tiered fee structure
Create multiple packages with different amount ranges:
- Package 1: 100 → 2% fee
- Package 2: 1000 → 1.5% fee
- Package 3: $1000+ → 1% fee
- Lower fees for higher-value transactions
Combined flat + percentage (maximum)
Combined flat + percentage (maximum)
Apply whichever is higher between flat and percentage:
- Application Rule:
maxBetweenTypes - Calculations:
flat: 1.00andpercentage: 2.0 - Example: On 1.00, 1.00 fee
- Example: On 1.00, 2.00 fee
Fee waiver for premium accounts
Fee waiver for premium accounts
Best practices
Plan your fee structure
Design your fee packages before implementation. Consider transaction types, amount ranges, and customer segments that require different fee treatments.
Use descriptive labels
Choose clear fee group labels and descriptions that explain when and why fees apply. This helps with auditing and customer communication.
Set appropriate amount ranges
Define minimum and maximum amounts carefully to avoid gaps or overlaps in your fee structure.
Test fee calculations
Use the Fee Estimation feature to verify fee calculations before enabling packages in production.
Manage priority carefully
When using multiple fees in a package, set priorities to ensure fees are applied in the correct order.
Fee calculation flow
When a transaction is processed, Fees Engine:
- Identifies applicable fee packages based on transaction route and segment
- Filters packages by amount range (transaction must fall within min/max)
- Checks if source account is in the waived accounts list
- Applies fee rules in priority order
- Calculates each fee based on application rule and reference amount
- Credits fee amounts to designated accounts
Fee packages must be enabled to apply to transactions. You can disable packages temporarily without deleting them.

