Skip to main content
Let your customer authorize a recurring Pix, and pay each scheduled debit from the customer’s 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 of the payer. It shows each request to the payer and sends the payer’s decision.
  • Pix Lerian. Keeps the authorizations and the scheduled debits of the payer. It debits the payer’s account in Midaz on the settlement date.
  • Midaz. The ledger that holds the payer’s account.
  • Lerian SPI. Exchanges the Pix Automático messages and the payments with SPI.
  • SPI. The BACEN instant payment system. It carries the messages of the receiver’s institution and settles each payment.

Before you start


  • The payer’s account exists in Midaz, is active, and has a holder.
  • Your backend checks that the payer can use the account. Send that account in X-Account-Id. See Use Pix Automático with Pix Lerian.
  • Your systems receive the Pix Lerian events. See Pix Lerian events.

Diagram


Authorize

Authorize and pay with Pix Automático: Authorize

Pay the scheduled debits

Authorize and pay with Pix Automático: Pay the scheduled debits

Rules


Authorize

  • To refuse, send decision REJECT with rejectionReason. Pix Lerian publishes pix_auto_request.rejected. The receiver’s institution does not answer a rejection.
  • When no conclusion arrives within one hour, Pix Lerian publishes pix_auto_authorization.conclusion_timed_out. The authorization still waits for the conclusion.

Pay the scheduled debits

  • Pix Lerian refuses an instruction above the maximum amount of the payer (AM02), or one that differs from a fixed amount (AM09).
  • List the scheduled debits with GET /payer/scheduled-payments.
  • The payer can cancel one scheduled debit with POST /payer/scheduled-payments/{scheduled_payment_id}/cancel until 00:00 of the settlement date. The authorization stays active.
  • When the window of 00:00 to 08:00 closes without a settlement, Pix Lerian publishes pix_auto_scheduled_payment.settlement_deferred. It tries again on the same day, between 18:00 and 21:00.
  • The times on this page are in the America/Sao_Paulo time zone.

How you know it finished


  • Authorize. Pix Lerian publishes pix_auto_authorization.concluded with APPROVED.
  • Pay the scheduled debits. For each debit, Pix Lerian publishes outbound_transfer.completed with initiationType AUTO.

What can go wrong