Pix transaction flows
Understanding how Pix transactions flow through the system is essential for configuring reconciliation correctly. The two flows below show what Matcher needs to reconcile on each side.
Pix sent (cash-out)

- Client initiates Pix — The end user triggers a Pix payment via the app or API.
- Plugin creates initiation — The Pix plugin creates an initiation record and resolves the destination account via DICT lookup.
- Plugin processes payment — The plugin debits the client account in Midaz (transaction in
pendingstatus) and sends the payment instruction to BTG/SPI. - Settlement confirmed — BTG sends a webhook confirming settlement. The Midaz transaction is committed.
- Matcher reconciles — Matcher compares the committed Midaz transaction against the corresponding entry in the BACEN SPI settlement extract.
Pix received (cash-in)

- Inbound Pix arrives — SPI/BTG sends a synchronous webhook containing the inbound Pix data.
- Plugin validates — The Pix plugin validates the payload and approves the transaction.
- Credit transaction created — The plugin creates a CREDIT transaction in Midaz for the recipient account.
- Settlement confirmed — The settlement webhook confirms the transaction is final.
- Matcher reconciles — Matcher compares the Midaz credit transaction against the corresponding entry in the BACEN SPI settlement extract.
In both flows, the endToEndId is the unique identifier that links the Midaz transaction to the BACEN settlement record. This is the primary key for reconciliation.
Configuration step-by-step
Create the context
Create a reconciliation context for Pix transactions. Use type Pix transactions have no intermediate fees or partial settlements. A Pix of R 150.00 in the BACEN extract. Set both tolerance values to zero.Setting
1:1 because each Pix transaction has exactly one corresponding BACEN settlement entry.autoMatchOnUpload to false gives you control over when matching runs, which is important when you need both sources ingested before executing.Create the sources
Each context needs two sources: one for Midaz transactions and one for the BACEN settlement extract.Source A — Midaz (type When Midaz is integrated with Matcher (see Midaz integration), transactions are ingested automatically via event-driven sync. No manual upload is needed for this source.Source B — BACEN SPI extract (type The BACEN source uses type
LEDGER):CUSTOM):CUSTOM because the SPI settlement file is uploaded manually or via an automated pipeline each day.Create field maps
Field maps tell Matcher how to translate fields from each source into the canonical fields used for matching.The following table shows the mapping between Matcher’s canonical fields and the fields in each source:
When Midaz is integrated with Matcher, standard fields are mapped automatically. The BACEN source — field map:
| Matcher field | Midaz (automatic) | BACEN extract (field map) |
|---|---|---|
transaction_id | id | id_liquidacao |
amount | amount | valor |
currency | asset_code | moeda |
date | created_at | data_liquidacao |
reference | metadata.endToEndId | end_to_end_id |
endToEndId lives in transaction metadata and requires a custom field mapping override in the source settings (see Midaz integration — custom field mapping):Midaz source — field map with endToEndId override:Create match rules
Match rules define how Matcher compares transactions across sources. For Pix reconciliation, two rules cover the vast majority of scenarios.Rule 1 — Exact match by endToEndId (priority 1):This rule resolves approximately 95% of cases. The A Pix initiated at 23:58 may settle in BACEN on the following calendar day. This rule allows a 1-day window to cover D+1 settlement scenarios. The lower
endToEndId is unique per Pix transaction across the entire ecosystem. When the reference, amount, currency, and date all match, it is a confirmed reconciliation with maximum confidence. Note that caseInsensitive is set to false because endToEndId values are case-sensitive, and referenceMustSet is true to ensure both sides carry the endToEndId before comparing — this prevents false positives on amount and date alone.Rule 2 — Date tolerance fallback (priority 51):matchScore of 85 signals that these matches should be reviewed with slightly more attention, though they are still valid. Note that this rule relies on amount and currency matching only — the endToEndId comparison is handled by Rule 1.Activate and schedule
Once all configuration is in place, activate the context and create a daily schedule.Activate the context:Create a schedule to run daily at 07:00 UTC:Running at 07:00 UTC provides enough margin for D+1 settlements to appear in the BACEN extract and for the daily file to be uploaded before the matching run executes.
Daily operation
Once configured, the daily reconciliation workflow follows five steps.
Upload BACEN extract
Upload the previous day’s SPI settlement file to the BACEN source. Matcher accepts both CSV and JSON formats.This step can be automated via a pipeline that fetches the SPI file and uploads it before the scheduled matching run.
Midaz data available automatically
With the Midaz integration configured, transactions are continuously ingested into Matcher as they are committed. No manual upload is needed for Source A. See Midaz integration for setup details.
Matcher runs at 07:00 (or manually)
The scheduled run executes automatically at 07:00 UTC. To run matching manually, use the run endpoint.Use
DRY_RUN first to preview results without committing them. When satisfied, run again with COMMIT:Review results
After the run completes, retrieve the matched groups to see the results.Each group shows the matched Midaz transaction and its corresponding BACEN settlement entry, along with the rule that matched them and the confidence score.
Resolve exceptions
Unmatched transactions appear as exceptions. These require investigation — a transaction present in one source but not the other, or a mismatch in amount or date beyond the configured tolerance.Review exceptions, determine the root cause, and resolve them by force matching, ignoring, or correcting the underlying data.
Practical example — one day of data
The following example illustrates a complete reconciliation run for March 17, 2026.
Midaz transactions (Source A)
| ID | endToEndId | Amount | Type | Date |
|---|---|---|---|---|
| txn-001 | E123456789202603170001 | 150.00 | Pix OUT | 2026-03-17 10:15 |
| txn-002 | E987654321202603170042 | 3200.50 | Pix IN | 2026-03-17 11:30 |
| txn-003 | E555666777202603170099 | 89.90 | Pix OUT | 2026-03-17 23:58 |
| txn-004 | E111222333202603170007 | 500.00 | Pix IN | 2026-03-17 14:00 |
BACEN SPI extract (Source B)
| id_liquidacao | end_to_end_id | valor | data_liquidacao |
|---|---|---|---|
| liq-8801 | E123456789202603170001 | 150.00 | 2026-03-17 |
| liq-8802 | E987654321202603170042 | 3200.50 | 2026-03-17 |
| liq-8803 | E555666777202603170099 | 89.90 | 2026-03-18 |
| liq-8804 | E444555666202603170055 | 750.00 | 2026-03-17 |
Match results
| endToEndId | Midaz | BACEN | Result | Rule |
|---|---|---|---|---|
| E12345…0001 | txn-001 | liq-8801 | Match | EXACT (score: 100) |
| E98765…0042 | txn-002 | liq-8802 | Match | EXACT (score: 100) |
| E55566…0099 | txn-003 | liq-8803 | Match (D+1) | DATE_LAG (score: 85) |
| E11122…0007 | txn-004 | — | Exception | — |
| E44455…0055 | — | liq-8804 | Exception | — |
Analysis
- txn-001 and txn-002: Exact match on endToEndId, amount, currency, and date. Rule 1 resolved these with confidence score 100.
- txn-003: Pix initiated at 23:58, settled in BACEN on 2026-03-18. Rule 2 (DATE_LAG with 1-day window) resolved this with confidence score 85.
- txn-004: Present in Midaz but absent from BACEN. Possible settlement failure or SPI timeout. Investigate the transaction status via the Pix plugin.
- liq-8804: Present in BACEN but absent from Midaz. An inbound Pix that was not processed. Check webhook delivery or reprocess the message.
Handling Pix exceptions
The following table covers the most common Pix exception scenarios and recommended actions.
| Scenario | Probable cause | Recommended action |
|---|---|---|
| In Midaz, not in BACEN | Settlement failure, SPI timeout, rejected transaction | Check transaction status in the Pix plugin. If rejected, revert in Midaz. |
| In BACEN, not in Midaz | Inbound Pix not processed, webhook failure | Reprocess the message. Create a manual transaction if needed. |
| Amount mismatch | Rare in Pix (no intermediate fees). Possible rounding error. | Investigate original records. Force match if the difference is acceptable. |
| Date mismatch (>1 day) | Held transaction, reprocessing | Verify it is the same Pix. Force match or ignore. |
Force match
When you have confirmed that two records represent the same Pix transaction but Matcher could not match them automatically, use force match.Ignore transaction
When a transaction should be excluded from reconciliation (for example, a duplicate entry or an already-reversed Pix), mark it as ignored.Pix refunds (devoluções)
Pix refunds generate reverse transactions that also need reconciliation. When a refund is processed, the Pix plugin creates a new transaction in Midaz with:
- The
originalEndToEndIdlinking back to the original Pix transaction - A new
returnIdentification(rtrId) that uniquely identifies the refund in SPI
The Pix plugin supports refund initiation via
POST /v1/transfers/{id}/refunds. Each refund carries the originalEndToEndId and a new returnIdentification for end-to-end tracking.Best practices
Use endToEndId as the primary reference
Use endToEndId as the primary reference
The
endToEndId is the unique Pix identifier across the entire ecosystem — from the initiating institution through SPI to the receiving institution. Ensure it is stored in Midaz transaction metadata and present in the BACEN extract. Without it, reconciliation falls back to amount and date matching, which is far less reliable.Run reconciliation the following day
Run reconciliation the following day
Pix transactions near end of day may settle in BACEN on D+1. Scheduling Matcher for 07:00 UTC ensures all settlements from the previous day are included in the BACEN extract before matching runs. This eliminates false exceptions caused by timing.
Separate Pix IN and Pix OUT for high volume
Separate Pix IN and Pix OUT for high volume
When processing high Pix volumes, create two separate contexts — one for cash-out and one for cash-in. This simplifies exception triage, provides more granular metrics per flow, and allows independent scheduling if needed.
Monitor match rate
Monitor match rate
A healthy Pix reconciliation achieves greater than 99% automatic match rate. If the rate drops below 95%, investigate systemic issues such as plugin failures, BACEN format changes, or missing metadata in Midaz transactions.
Zero tolerance is the default
Zero tolerance is the default
Pix has no intermediate fees, partial settlements, or processing charges. If amounts diverge between Midaz and BACEN, it indicates a real problem — not rounding. Keep both
feeToleranceAbs and feeTolerancePct at zero.Preview before committing
Preview before committing
Always run a
DRY_RUN before COMMIT, especially after rule or field map changes. This lets you review match results and catch configuration errors before they affect production data.Key metrics
Track these metrics to monitor the health of your Pix reconciliation process.
| Metric | Healthy value | Alert threshold |
|---|---|---|
| Automatic match rate | Above 99% | Below 95% |
| Daily exceptions | Below 0.5% of volume | Above 2% |
| Average resolution time | Under 4 hours | Over 24 hours |
| Unresolved exceptions 48h+ | 0 | More than 5 |
Next steps
Contexts and sources
Learn how to configure and manage reconciliation contexts and data sources.
Match rules
Explore all available rule types and advanced matching configurations.
Midaz integration
Deep dive into automatic field mapping and real-time sync with Midaz Ledger.
Resolving exceptions
Detailed guide on investigating, force matching, and managing reconciliation exceptions.

