Skip to main content
Create a Pix charge with a dynamic QR code, and know when the payer pays it.
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 of the receiver. It calls the Pix Lerian API, shows the QR code, and receives the events.
  • Pix Lerian. Creates the charge and tracks its status. It credits the payment in Midaz.
  • Midaz. The ledger that holds the account that receives the payment.
  • Lerian SPI. Registers the charge, serves it to the payer’s institution, and exchanges the Pix messages with SPI.
  • SPI. The BACEN instant payment system. It settles the payment.
  • Payer’s institution. The Pix participant of the payer. It reads the charge and sends the payment.

Before you start


  • The account that receives the payment has an active Pix key that your institution registered with Pix Lerian.
  • Your systems receive the Pix Lerian events. See Pix Lerian events.

Diagram


Charge with a dynamic QR code

Steps


Rules


  • A charge creates no transaction in Midaz. The money arrives as a received Pix, with its own inbound_transfer.completed event.
  • A new charge needs a new X-Idempotency key and a new txId.
  • A due-date charge follows the same steps. Create it with POST /collections/duedate. Its collection.paid event has type DUE_DATE.
  • To end an unpaid immediate charge, cancel it with DELETE /collections/immediate/{id}. The charge becomes CANCELLED.

How you know it finished


Pix Lerian publishes collection.paid, and GET /collections/immediate/{id} shows the charge in COMPLETED.

What can go wrong


The Pix Lerian error list describes each code.