This flow is a suggested reading of the BACEN manuals for Pix. The manuals prevail over this page. Your institution, as the participant, validates the flow and implements it on the Lerian APIs. See how to read the diagrams.
Participants
- Your institution. The Pix participant that received the original Pix. It calls the Pix Lerian API and receives its events.
- Pix Lerian. Connects Midaz to Lerian SPI. It posts the return in Midaz and hands it to Lerian SPI.
- Midaz. The ledger that holds the account that received the original Pix.
- Lerian SPI. Exchanges the Pix messages with SPI.
- SPI. The BACEN instant payment system. It settles the return.
Before you start
- The original Pix is a received transfer in
COMPLETED. See Send and receive Pix. - Your systems receive the Pix Lerian events. See Pix Lerian events.
Diagram
Steps
Rules
reasonCodeis one ofMD06(return of the original Pix),SL02(return of a Pix Saque or Pix Troco),FR01(fraud, MED) orBE08(operational flaw, MED).- The returns of one transfer add up to the original amount at most.
- BACEN accepts a return within 90 days of the settlement of the original Pix.
- A return is a new Pix and a new transaction in Midaz. The original transfer and its transaction do not change.
How you know it finished
Pix Lerian publishes
refund.completed or refund.failed. GET /refunds/{id} shows the same result.
What can go wrong
The Pix Lerian error list describes each code.

