Skip to main content
Use Midaz Module to manage Fee Packages that define how fees are calculated for transactions. Fee Packages are the core of the Fees Engine functionality, allowing you to configure complex fee structures based on transaction routes, amounts, and account types.

What are Fee Packages?


A Fee Package is a configuration that defines fee rules applied to transactions matching specific criteria. In Midaz Module, fee packages enable you to:
  • Define fee calculation rules - Configure flat fees, percentage-based fees, or combined calculations
  • Set amount ranges - Apply fees only to transactions within specified minimum and maximum amounts
  • Link to transaction routes - Associate packages with specific transaction routes for targeted fee application
  • Waive fees for specific accounts - Exclude certain accounts from fee calculations
  • Prioritize fee application - Control the order in which multiple fees are applied
Fee Packages work together with Transaction Routes and Segments to provide granular control over your fee structure.

Accessing the Fee Packages page


To open the Fee Packages page, select the Fee Packages option from the Fees Engine section of the left-side menu. The Fee Packages page displays a list of all configured fee packages.
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:

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 value
    • percentual - Percentage of the transaction amount
    • maxBetweenTypes - Higher value between flat and percentage calculations
  • Calculation Type - flat or percentage
  • Calculation Value - The fee amount or percentage
  • Reference Amount - Base for percentage calculation:
    • originalAmount - Calculate on original transaction value
    • afterFeesAmount - 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


Apply a fixed fee to all transactions within an amount range:
  • Application Rule: flatFee
  • Calculation: flat with value 2.50
  • Example: 2.50feeoneverytransactionbetween2.50 fee on every transaction between 10 and $1000
Charge a percentage of the transaction amount:
  • Application Rule: percentual
  • Calculation: percentage with value 1.5
  • Example: 1.5% fee on transfers, where 100transfer=100 transfer = 1.50 fee
Create multiple packages with different amount ranges:
  • Package 1: 00-100 → 2% fee
  • Package 2: 100100-1000 → 1.5% fee
  • Package 3: $1000+ → 1% fee
  • Lower fees for higher-value transactions
Apply whichever is higher between flat and percentage:
  • Application Rule: maxBetweenTypes
  • Calculations: flat: 1.00 and percentage: 2.0
  • Example: On 30transaction:max(30 transaction: max(1.00, 0.60)=0.60) = 1.00 fee
  • Example: On 100transaction:max(100 transaction: max(1.00, 2.00)=2.00) = 2.00 fee
Exempt specific accounts from fees:
  • Create package with standard fee rules
  • Add premium account aliases to Waived Accounts list
  • These accounts transact without incurring the configured fees

Best Practices


1

Plan your fee structure

Design your fee packages before implementation. Consider transaction types, amount ranges, and customer segments that require different fee treatments.
2

Use descriptive labels

Choose clear fee group labels and descriptions that explain when and why fees apply. This helps with auditing and customer communication.
3

Set appropriate amount ranges

Define minimum and maximum amounts carefully to avoid gaps or overlaps in your fee structure.
4

Test fee calculations

Use the Fee Simulation feature to verify fee calculations before enabling packages in production.
5

Manage priority carefully

When using multiple fees in a package, set priorities to ensure fees are applied in the correct order.
6

Document waived accounts

Keep track of why certain accounts are waived from fees for audit and compliance purposes.

Fee Calculation Flow


When a transaction is processed, the Fees Engine:
  1. Identifies applicable fee packages based on transaction route and segment
  2. Filters packages by amount range (transaction must fall within min/max)
  3. Checks if source account is in the waived accounts list
  4. Applies fee rules in priority order
  5. Calculates each fee based on application rule and reference amount
  6. Credits fee amounts to designated accounts
Fee packages must be enabled to apply to transactions. You can disable packages temporarily without deleting them.