Pix transaction flows
The two flows below show what Matcher needs to reconcile on each side.
Pix sent (cash-out)
Cash-out flow: from client initiation through SPI settlement to reconciliation in Matcher.
- 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 SPI. - Settlement confirmed: SPI sends a webhook confirming settlement. The Midaz transaction becomes committed.
- Matcher reconciles: Matcher compares the committed Midaz transaction against the corresponding entry in the BACEN SPI settlement extract.
Pix received (cash-in)
Cash-in flow: from inbound SPI notification through Midaz credit to reconciliation in Matcher.
- Inbound Pix arrives: SPI 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.
Configuration step-by-step
Create the context
1:1 because each Pix transaction has exactly one corresponding BACEN settlement entry.autoMatchOnUpload to false gives you control over when matching runs. Use that control when you need both sources ingested before the run executes.Create the sources
LEDGER):LEDGER is Matcher’s category for internal ledger data. It is not a live Midaz connector. You export the day’s Pix transactions from Midaz, including the endToEndId metadata as a flat column. You then upload the export to this source, manually or via an automated pipeline. See Matcher and Midaz for the export/import flow.Source B, BACEN SPI extract (type CUSTOM):CUSTOM because you upload the SPI settlement file manually or via an automated pipeline each day.Each source must declare a side (LEFT or RIGHT). A context reconciles its LEFT source against its RIGHT source. Assign one side to Midaz and the other to BACEN. Keep the assignment consistent across both sources.Create field maps
external_id, amount, currency, and date, plus the optional description, fee_amount, fee_currency, and direction. The direction key takes an object, {column, debit, credit}, for a file that marks each row as debit or credit in a separate column. Every other key takes a raw column name in the source. Lookups are flat. A mapping value must name a top-level column in the row. The Midaz export must therefore carry endToEndId as its own flat column (see Matcher and Midaz: custom field mapping).The following table shows how each canonical field maps to the column in each source:Create match rules
endToEndId is unique per Pix transaction across the entire ecosystem. A match on reference, amount, currency, and date gives a confirmed reconciliation with maximum confidence. The rule sets caseInsensitive to false because endToEndId values are case-sensitive. The rule sets referenceMustSet to true, so both sides must carry the endToEndId before comparison. This prevents false positives on amount and date alone.Rule 2 (date tolerance fallback, priority 51):endToEndId comparison.Activate and schedule
Daily operation
Once configured, the daily reconciliation workflow follows five steps.
Upload BACEN extract
Upload the Midaz export
endToEndId metadata as a flat column. Upload the export to the Midaz source the same way. The same pipeline usually automates this step. See Matcher and Midaz for the export/import flow.Matcher runs at 07:00 (or manually)
DRY_RUN first to preview results without committing them. When satisfied, run again with COMMIT:Review results
Resolve exceptions
Practical example: one day of data
The following example illustrates a complete reconciliation run for March 17, 2026.
Midaz transactions (Source A)
BACEN SPI extract (Source B)
Match results
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) proposed this pair with confidence score 90. Matcher never confirms a
DATE_LAGgroup automatically: it proposes the group, whatever its score. To pair the two transactions, un-match the proposed group, then create a manual match. - 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. This inbound Pix did not reach the ledger. Check webhook delivery or reprocess the message.
Handling Pix exceptions
The following table covers the most common Pix exception scenarios and recommended actions.
Manual match
When you have confirmed that two records represent the same Pix transaction but Matcher could not match them automatically, pair them with a manual match. Matcher creates aCONFIRMED match group at confidence 100.
Ignore transaction
When you must exclude a transaction 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 the Pix plugin processes a refund, it 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
POST /v1/transfers/{id}/refunds is a Pix plugin endpoint, not a Matcher endpoint. Matcher does not initiate transfers or refunds. It only reconciles the resulting transactions. Each refund carries the originalEndToEndId and a new returnIdentification for end-to-end tracking, which Matcher then uses to match the refund against BACEN’s settlement extract. For refund initiation, see the Pix plugin documentation.Best practices
Use endToEndId as the primary reference
Use endToEndId as the primary reference
endToEndId is the unique Pix identifier across the entire ecosystem, from the initiating institution through SPI to the receiving institution. Store it in Midaz transaction metadata and make sure the BACEN extract carries it. 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
Separate Pix IN and Pix OUT for high volume
Separate Pix IN and Pix OUT for high volume
Monitor match rate
Monitor match rate
Zero tolerance is the default
Zero tolerance is the default
feeTolerance at 0 on the DATE_LAG rule.Preview before committing
Preview before committing
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.

