Skip to main content
Send a Pix from a Midaz account, and receive a Pix into a Midaz account.
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. It calls the Pix Lerian API and receives its events.
  • Pix Lerian. Connects Midaz to Lerian SPI. It posts the Pix in Midaz and hands the payment to Lerian SPI.
  • Midaz. The ledger that holds the accounts of your customers.
  • Lerian SPI. Exchanges the Pix messages with SPI.
  • SPI. The BACEN instant payment system. It settles each Pix.

Before you start


  • The account that sends or receives the Pix exists in Midaz, is active, and has a holder.
  • Your systems receive the Pix Lerian events. See Pix Lerian events.
  • The Pix ledger in Midaz has overrides.allowFeeSkip on. A received Pix never pays a fee.

Diagram


Send a Pix

Send and receive Pix: Send a Pix

Receive a Pix

Send and receive Pix: Receive a Pix

Rules


Send a Pix

  • The initiation stays open for 5 minutes. After that, step 5 answers 422 with PIX-0321.
  • A static QR code with an amount sets the amount of the transfer. At step 5, leave out the amount, or send the same amount.
  • The debit in Midaz is not the settlement. The transfer is final only at the event of step 13.

Receive a Pix

  • Pix Lerian refuses a Pix to an account that it does not find or that is not active. It also refuses a Pix when the holder does not match. Midaz records nothing for a refused Pix.
  • Pix Lerian credits the account only after SPI confirms the settlement.
  • A credit that Midaz does not confirm is parked, not dropped. Pix Lerian publishes inbound_transfer.credit_parked, and your back office credits the Pix with POST /transfers/{id}/credit.
  • When Pix Lerian does not answer within the SPI time limit, Lerian SPI refuses the Pix.

How you know it finished


  • Send a Pix. Pix Lerian publishes outbound_transfer.completed or outbound_transfer.rejected. GET /transfers/{id} shows the same status.
  • Receive a Pix. Pix Lerian publishes inbound_transfer.completed. For a parked credit, it publishes inbound_transfer.credit_parked first, and inbound_transfer.completed after the credit call completes.

What can go wrong


The Pix Lerian error list describes each code.