Use the Fee Calculator in the Midaz Module to estimate fee calculations before processing real Transactions. The estimator is read-only — it does not create a Transaction or touch any Ledger balance.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.
Before you start
- The Fees Engine plugin must be enabled in Midaz module settings.
- You need at least one Fee Package saved.
- You need the source and destination Account aliases you want to test against.
Running an estimation
Fill in the estimated transaction. See the Field guide below for each input.
Field guide
| Field | What to enter | Example |
|---|---|---|
| Transaction Amount | Total value to estimate fees against. | 100.00 |
| Currency | Asset code for the estimated transaction. | BRL |
| Fee Package | Fee Package to test. | Standard Transfer Fee |
| From Account | Account alias that would be debited. | @customer_123 |
| To Account | Account alias that would be credited. | @merchant_456 |
| Description | Optional description for the estimation. | Pix transfer test |
The Fee Calculator is a read-only tool. It does not affect the ledger or create any transactions. You can run as many estimations as needed safely.
Understanding the results
After running an estimation, you’ll see a detailed breakdown of how fees are calculated:
Summary
- Total Fee - The combined amount of all fees that would be charged
- Net Amount - The amount the destination would receive after deductible fees
Fee breakdown
For each fee rule applied, you’ll see:| Field | Description |
|---|---|
| Fee Label | Name identifying the fee |
| Priority | Order in which the fee was applied |
| Calculation Type | flat or percentage |
| Reference Amount | The base amount used for calculation |
| Calculated Amount | The actual fee value |
| Credit Account | Account that would receive the fee |
| Is Deductible | Whether the fee is deducted from the transaction |
Estimation examples
Simple flat fee estimation
Simple flat fee estimation
Scenario: Test a $2.00 flat fee on a $100 transferInput:
- Fee Package:
Standard Transfer Fee - Asset:
USD - Amount:
100.00 - Source:
@customer/checking - Destination:
@merchant/revenue
- Total Fee: $2.00
- Net Amount: $98.00 (if deductible) or $100.00 (if not deductible)
Percentage fee estimation
Percentage fee estimation
Scenario: Test a 1.5% fee on a $500 transferInput:
- Fee Package:
Percentage Transaction Fee - Asset:
USD - Amount:
500.00 - Source:
@customer/savings - Destination:
@vendor/payments
- Total Fee: $7.50 (1.5% of $500)
- Calculation: 500 × 0.015 = 7.50
Combined fee estimation
Combined fee estimation
Scenario: Test max(flat, percentage) fee on different amountsTest 1 - Small transaction ($30):
- Flat: $1.00
- Percentage: 2% = $0.60
- Result: $1.00 (flat is higher)
- Flat: $1.00
- Percentage: 2% = $4.00
- Result: $4.00 (percentage is higher)
Multiple fees estimation
Multiple fees estimation
Scenario: Package with two fees applied in priority orderFee A (Priority 1): 1% on original amount
Fee B (Priority 2): 0.5% on after fees amountInput: $1000 transactionExpected Result:
- Fee A: $10.00 (1% of $1000)
- Fee B: $4.95 (0.5% of $990)
- Total Fee: $14.95
Use cases for fee estimation
Validate new fee packages
Before enabling a new fee package, run estimations with various transaction amounts to ensure fees are calculated correctly across the entire amount range.Test edge cases
Estimate transactions at minimum and maximum amount boundaries to verify fee behavior at the limits of your configured ranges.Compare fee structures
Run the same transaction through different fee packages to compare outcomes and choose the best structure for your use case.Document expected fees
Use simulation results to create documentation for your finance team or customers about expected fee amounts.Debug fee issues
If transactions are showing unexpected fees, use the estimator to reproduce the scenario and understand the calculation breakdown.Best practices
- Test full amount ranges - Don’t just test one amount; estimate transactions at minimum, maximum, and several points in between.
- Verify priority ordering - When packages have multiple fees, confirm they apply in the expected order.
- Check waived accounts - Test with accounts that should be waived to confirm they’re excluded from fees.
- Document your tests - Keep a record of estimation results for audit and compliance purposes.
- Share with stakeholders - Use estimation breakdowns to align with finance teams on expected fee outcomes before going live.
What to do next
After validating the fee result, adjust the Fee Package if needed in Editing a Fee Package, or create a real Transaction in Creating a Transaction.

