Why this combination matters
Each component solves a specific layer of the problem:
Choosing your Pix participation model
The Pix Plugin supports both participation models defined by BACEN. The fee integration and ledger flow on this page apply to both. Only the connection to BACEN differs.
Scenario 1: Fintech launching Pix with automated fees
A fintech plans to offer Pix to its customers. It wants to charge a flat fee on every incoming Pix (cash-in). The fee covers operational costs and adds revenue without extra complexity for the customer. The fee logic and ledger structure stay the same for both models. This holds whether the fintech is an indirect participant (via BTG) or a direct participant (via JD).
The business goal
- Offer instant Pix payments to end customers
- Charge a transparent, configurable fee on incoming transfers
- Record every fee in the ledger for compliance and financial reporting
- Launch quickly, without custom fee logic or reconciliation pipelines
Setting up with Midaz
The fintech first structures its Midaz environment:Create the Organization
Set up the Ledger
Define the Asset
Create customer accounts
Create fee destination accounts
Organize with Segments
Configuring the Fees Engine
With the ledger structure in place, the fintech configures a fee package:- Fee type: Flat fee of R$ 1.50 per incoming Pix
- Scope: Applied to all cash-in transactions on the main ledger
- Routing: The Fees Engine routes fee credits to the “Pix Fee Revenue” internal account
- Exemptions: Add Premium-tier accounts to the waived accounts list
How a transaction flows
When a customer receives a Pix transfer, here’s what happens behind the scenes:Pix arrives
Transaction is validated
Settlement begins
Fees are calculated automatically
Ledger records the full picture
- Midaz credits the customer’s account with the net amount (gross minus fee).
- Midaz credits the fee destination account with R$ 1.50.
- Every movement is traceable, with double-entry precision.
Transaction is complete
What this unlocks
- No custom fee logic — the Fees Engine handles calculation, routing, and exemptions.
- Accurate ledger — every fee is a ledger entry, not just metadata. Auditors see the same numbers your finance team sees.
- Customer segmentation — the Fees Engine exempts Premium customers automatically through waived accounts.
- Fee flexibility — change fee values, add percentage-based fees, or introduce amount-based thresholds without changes to your transaction pipeline.
Scenario 2: Marketplace with Pix and proportional fees
A B2B marketplace connects buyers and sellers. Buyers pay via Pix, and the marketplace charges a service fee on each transaction before it distributes the rest to sellers.
The business goal
- Accept Pix payments from buyers
- Charge a percentage-based service fee on each payment
- Distribute the net amount proportionally across multiple sellers when a single payment covers goods from different sellers
- Maintain a clear audit trail for every split and fee
Setting up with Midaz
The marketplace structures its Midaz environment to reflect the multi-party nature of its operations:Create the Organization
Set up the Ledger
Define the Asset
Create seller accounts
Create the marketplace fee account
Use Segments for seller tiers
Configuring the Fees Engine
The marketplace configures a fee package with proportional distribution:- Fee type: 3% of the transaction value
- Scope: Applied to all incoming Pix payments on the marketplace ledger
- Distribution: The Fees Engine splits fees proportionally across source accounts when a single transaction covers multiple sellers
- Routing: Fee credits go to the “Marketplace Service Fee” account
- Deductible: The Fees Engine deducts the fee from the sellers’ amount (
isDeductibleFrom: true), so the buyer always sends the full amount
How a transaction flows
A buyer purchases R$ 1,000 worth of goods from three sellers:Buyer sends Pix
Pix arrives at the Plugin
Fees are calculated with proportional split
- Seller A: R 485.00 net)
- Seller B: R 291.00 net)
- Seller C: R 194.00 net)
Ledger records every movement
- Seller A’s account: credited R$ 485.00
- Seller B’s account: credited R$ 291.00
- Seller C’s account: credited R$ 194.00
- Marketplace fee account: credited R$ 30.00
- Total: R$ 1,000.00 — fully balanced
Sellers and marketplace are settled
What this unlocks
- Automated revenue split — the Fees Engine handles proportional distribution across any number of accounts.
- Transparent pricing for sellers — each seller sees the exact fee and the reason for it.
- Balanced ledger — gross amount in equals the sum of all credits out. No rounding gaps, no manual adjustments.
- Configurable rates — change the fee percentage, add flat minimums, or exempt specific partners — all through fee package configuration.
What you need to get started
To run this setup, your institution needs:
Estimating before going live
Before you process real transactions, use the Fees Engine estimate to check your fee configuration. The estimate lets you:
- Preview the exact fee for a given transaction amount
- Check that exemptions work as expected
- Confirm proportional splits produce the correct distribution
- Test edge cases like boundary amounts and waived accounts

