RideKit
Docs/Reference/Brazil: Pix Automático for subscriptions and company invoices

Brazil: Pix Automático for subscriptions and company invoices

Built: 2026-11-03. Written for operators in Brazil and whoever maintains the code.

Pix Automático is the Banco Central's recurring Pix, in force since June 2025. The payer authorizes a company once, in their bank app. After that, each charge is debited on its due date with nothing to scan. RideKit uses it in two places, through the operator's Asaas account, the same one that takes Pix top-ups:

Who What is charged When
A rider with a subscription The plan price A few days before each renewal
A company account What the account owes (its invoice) Monthly, on the market's charge day

How the authorization works

  1. The payer starts it: the rider from their subscription screen, a company from Admin → Organizations → Billing.
  2. Asaas returns an immediate QR. The payer pays it in their bank app and accepts Pix Automático.
    • Rider: the QR collects the plan price, and that money goes into the wallet for the next renewal.
    • Company: the QR collects what it owes now, or R$5 if it owes less, since Asaas takes nothing smaller. That amount is recorded as the company's payment.
  3. When that payment settles, Asaas marks the authorization ACTIVE, and RideKit credits the first payment once.
  4. Charges:
    • Rider: when a renewal is due within the notice period (3 days by default), the plan price is charged with the renewal day as its due date. When it is paid, it lands in the wallet, and the existing renewal takes it from there.
    • Company: in the days before the charge day (the 5th by default), what the account owes is charged. When it is paid, it is recorded as the company's payment. Below R$5 nothing is charged, and the balance carries to the next month.
  5. Ending:
    • Either side can stop it: the rider in the app, the operator in Admin, or the payer in their bank app.
    • If the payer stops it in the bank app, the next status check closes it in RideKit.
    • An unpaid QR expires after a day.

One charge per due date. Each authorization can have only one charge for any due date, and every credit has its own ledger key. A sweep that runs twice moves no money twice.

The bank's rule. A charge must reach the payer's bank 2 to 10 days before it falls due. The notice setting is limited to that range.

Settings (Admin → Markets → Brazil → Payments → Pix Automático)

  • On or off. It ships on in Brazil, but needs the Asaas keys under Providers.
  • Days of notice before a charge: 2 to 10, 3 by default.
  • Company charge day: 1 to 28, the 5th by default.

What the rider sees (Subscription screen)

The Pay renewals by Pix Automático card appears while the subscription is not set to end. It moves through three states:

  1. Before setup: an explanation and a button to set it up.
  2. Waiting for the bank: the QR and the copia-e-cola code. The card checks every 15 seconds.
  3. Active: "On: each renewal is charged by Pix 3 days before it is due", the next charge with its date, and a button to stop it.

If the bank stopped it, the card says so.

What the operator sees (Organizations → Billing)

The Pix Automático (monthly invoice) block in the company's billing panel moves through these states:

  1. Set up: a button showing what the QR will collect now.
  2. Waiting for the company: the QR for the company's finance team, with its copia-e-cola.
  3. Active: active since when, and recent charges with their due date, amount and state (sent, paid, failed, or nothing owed).
  4. Stop: asks to confirm first.

Starting or stopping is audited.

Not built: one-tap Pix rides

"One-tap Pix" means paying in the app with no redirect, through the Banco Central's Pix por aproximação / Jornada sem Redirecionamento. It needs an Open Finance payment initiator, which the Asaas API does not offer. Rides paid by Pix keep the existing flow: a QR or copia-e-cola after the trip (see docs/brazil-pix-rides.md).

Tested end to end

  • API (pixauto-e2e.mjs, through the Asaas mock):
    • Rider:
      1. Subscribe to a R$19,90 plan.
      2. The authorization is monthly, R$19,90, with its QR; a second one is refused.
      3. The QR is paid: active within a minute, R$19,90 in the wallet, once.
      4. The renewal is set 3 days out: the charge is sent under the authorization, due on the renewal day.
      5. It is paid on the day and lands in the wallet. The next sweep sends nothing twice.
      6. Cancelled in the app, and closed when cancelled in the bank.
    • Company:
      1. Its authorization is monthly with a variable amount. The first payment is what it owes, or at least R$5, and is recorded on the account. Starting it is audited.
      2. An employee's company rides make it owe R$13,20.
      3. The charge for the 5th goes out for R$13,20; once paid, it owes nothing.
      4. Cancelled.
    • Settings: switched off in the market means it is not offered, and less than 2 days of notice is refused.
  • Admin in Chrome (admin-pixauto.mjs):
    • the market card and saving the notice days;
    • the company billing card: QR with copia-e-cola, active after the company paid, stopped from the card.
  • Rider app on the iOS simulator (Arabic):
    • set up from the subscription screen, showing the QR and code;
    • after the bank approved: "on", with the next charge of R$19,90 on 6 Nov;
    • stopped from the app.

For the code

What Where
Rules: frequency, notice window, charge days, states backend/src/payments/pix-automatic.ts (+ spec)
Authorizations, sweep, rider and company APIs backend/src/payments/pix-automatic.service.ts, pix-automatic.module.ts
Asaas calls backend/src/payments/providers/asaas-pix.provider.ts (createAutomaticAuthorization, automaticAuthorizationStatus, cancelAutomaticAuthorization, createAutomaticCharge)
API GET/POST/DELETE /payments/pix-automatic/subscription, GET/POST/DELETE /admin/organizations/:id/pix-automatic
Storage migration 180: pix_mandates, pix_mandate_charges
Admin components/orgs/OrgPixAutomatic.tsx, components/markets/PixAutomaticCard.tsx, 15 languages
Rider app src/components/PixAutomaticCard.tsx on the subscription screen, 14 languages

Check before launch.

  • Enable Pix Automático on the Asaas account, and run one authorization and one charge in the Asaas sandbox. The request fields here follow Asaas's published API (/v3/pix/automatic/authorizations, and pixAutomaticAuthorizationId on /v3/payments). Confirm the exact response shape against your account.
  • RideKit checks status every minute. You can also point Asaas's Pix Automático webhooks at the payments webhook.
  • Tell riders and companies in your terms how much is charged, how often, and how to stop.
source: docs/brazil-pix-automatico.md (ships identically in the product zip)