Skip to main content
It lets a payer authorize a recurring mandate (“enrollment”) once from their banking app, after which the merchant can charge that mandate on a schedule without any further customer interaction—the Pix equivalent of a card-on-file subscription or a direct debit.

Introduction

Unlike regular Pix (a single-use QR code / redirect per payment), Pix Automático is a two-phase payment method:
  1. Customer-initiated enrollment + initial payment (CIT)—the customer selects Pix Automático at checkout. Payrails calls dLocal POST /payments with a nested enrollment object carrying the subscription schedule. dLocal returns a PENDING payment (D-…), a PENDING enrollment (E-…), and a redirect_url. The customer follows the redirect to their bank to authorize the mandate.
  2. Merchant-initiated recurring charges (MIT)—once the enrollment is active, Payrails stores it as a payment instrument. Subsequent charges call dLocal POST /payments in the DIRECT flow, referencing the enrollment id—no redirect, no customer present.
Both phases return a PENDING payment synchronously; the final result arrives asynchronously via notification. The Payrails result and provider reference track the payment (D-…). The enrollment (E-…) is surfaced as the reusable credential (provider token) and is advanced by its own notification. This guide explains the process of integrating Pix Automático into your app or website using Payrails via dLocal.

Pre-requisites

Before you start accepting Pix Automático payments with Payrails, there are a few requirements you must meet:
  1. Integrate with Payrails using one of our SDKs or our API.
  2. Configure a new integration account for Pix Automático via dLocal as a Payment Service Provider. If you do not already have a dLocal integration configured in your workspace, complete the dLocal integration setup guide first.
  3. Enable Pix Automático as a payment method in your dLocal integration configuration. In the Payrails portal, navigate to Settings → Integrations, select your dLocal integration instance, and enable the Pix Automático checkbox under Payment methods, then save the account.
  4. Enable Pix Automático as a payment option in your workflow.
  5. Make sure you’re sending the Pix Automático-specific meta fields (meta.customer, meta.subscription) in your requests (see Required meta fields below).

Ways to integrate Pix Automático

Payrails SDK

The simplest way to use Pix Automático with Payrails is to use our drop-in in your checkout flow. With this integration type, no additional work is required to accept the initial payment except for handling success/failure screens for your users, and passing meta.subscription. For a more flexible implementation using our SDK, you can use our genericRedirectButton element.

Server-to-server integration

You can integrate Pix Automático by completely managing your own client-side implementation, and using Payrails APIs with a server-to-server integration to process both phases.

Required meta fields

Charge frequency mapping

meta.subscription.chargeFrequency is an ISO 8601 duration and is mapped to dLocal’s fixed set of cadences. Any value outside this list is rejected. WEEKLY is the shortest supported cadence—there is no 3- or 5-day option.

Phase 1: Enrollment + initial payment (CIT)

Parse Pix Automático from the lookup response

Sample CIT request (drop-in / create execution)

Synchronous response

dLocal returns a PENDING payment plus a PENDING enrollment and a redirect_url:
Payrails maps this to a pending authorize result with a redirect required action. The enrollment id (E-…) is surfaced as the provider token immediately—even on the pending response—so the instrument can be stored right away rather than waiting for a notification. The stored instrument carries only the enrollment country and external_id; there is no PAN- or MSISDN-equivalent account identity for Pix.

Handle the redirect

After the customer authorizes the mandate in their banking app and returns to your site, verify the payment status via the Payrails API or by listening to webhook notifications.

Phase 2: Recurring charge (MIT)

Once the enrollment is active and stored as an instrument, charge it by passing the paymentInstrumentId with pixAutomatico and integrationType: api. No redirect is returned—the payment goes straight to PENDING and is confirmed by notification.
meta.subscription.scheduledDate is mandatory on every MIT. A MIT without a resolvable enrollment reference on the instrument is rejected—Payrails never silently creates a new enrollment for a charge that is meant to reuse an existing mandate.

Sample MIT request

Synchronous response

Operational rules for recurring charges

These rules govern how a live mandate behaves day to day. They don’t change the request/response shapes above, but they do determine whether a given MIT will be accepted.

Submission window: 2 to 10 days before the billing date

Every recurring payment request must reach dLocal 2 to 10 days before the scheduledDate it is billing for—this reflects a Central Bank of Brazil requirement for all Pix Automático payments. For example, a billing date of 5 August expects the request between 26 July and 3 August. A same-day request is not supported and comes back: The request is rejected outright—it is not silently queued to the next valid date.
Payrails does not currently enforce this windowThe connector only checks that scheduledDate is present, not that it falls 2–10 days out. An out-of-window MIT will be built and sent to dLocal as-is, and will come back REJECTED / 300. Until this validation is added, merchants are responsible for scheduling MITs correctly.

What scheduledDate means, and how you learn the outcome

meta.subscription.scheduledDate is the day dLocal should collect the charge, not the day you call the API. The MIT POST returns a synchronous PENDING; the final PAID or REJECTED outcome arrives asynchronously through the same payment-notification webhook used by other dLocal payment methods. There is no separate “renewal” notification type. Track the outcome against the payment’s provider reference (D-…).

Amount limits: there is no maxAmount

For a VARIABLE subscription, dLocal’s API has exactly one amount field: minAmount (forwarded as dLocal’s min_value). There is no maxAmount field. The naming is misleading: min_value is the minimum authorization limit the payer can set during enrollment. The payer chooses the real ceiling in their banking app but can never set it below this value. dLocal’s own guidance is to send the highest amount you expect to charge in a single cycle as minAmount. For FIXED subscriptions, this doesn’t apply: fixedAmount is charged exactly.

Free trials: do not model as a R$0 payment

A free trial must not be modelled as a R$0 initial payment in the enrollment-plus-payment flow; dLocal’s Pix capability also enforces a 1 BRL minimum transaction amount. The supported pattern is:
  1. Create the enrollment without an initial payment.
  2. Set subscription.startDate to the date the trial ends.
  3. Submit the first billing request for that date once the trial is over, respecting the 2–10 day submission window.
The same pattern applies to a paid trial: submit the first non-zero payment for the trial-end date, inside the window.

Retry a rejected recurring charge (not currently supported)

dLocal offers a retry service for a failed renewal (POST /payments carrying the failed payment’s retry_payment_id, up to 3 retries within a 7-day window, intended for the same billing cycle rather than a new request). Payrails does not currently support invoking this service. There is no way today to submit a dLocal retry or to learn how many attempts remain. The only current option after a rejected renewal is to submit a fresh recurring payment request with a new scheduledDate, subject to the same 2–10 day window.

startDate and how trials actually work

Setting subscription.startDate in the future is supported and is the recommended way to model a trial period. With MONTHLY frequency, subsequent payments follow the monthly cadence from that start date. For example, “charge today, startDate = today + 7 days, chargeFrequency = P1M” puts the first recurring charge roughly one month after startDate, not 7 days out. dLocal does not auto-fire a recurring charge. For every cycle, including the first, the merchant (via Payrails) must call the recurring-payment endpoint 2–10 days ahead of the scheduled date. If omitted, startDate defaults to the day of the initial payment.

Known limitations

Staging tests

Test values

Sandbox testing noteKeep meta.order.description set to 100:approved for every happy-path test. In the dLocal sandbox, the description forwarded as the dLocal description field drives the simulated outcome. It follows a <status_code>:<status> convention. Anything else (or an omitted description) leaves the sandbox free to return a non-approved status, so the enrollment or payment will not settle as approved and the run will look like a product bug when it isn’t. This applies to both phases: the CIT enrollment + initial payment and every MIT recurring charge. Use a different value only when you are deliberately testing a negative or declined scenario.

CIT test steps

  1. Create an execution / open the drop-in with the CIT payload above. Make sure meta.subscription is present and complete.
  2. Select Pix Automático in the drop-in → you’re redirected to dLocal’s hosted page.
  3. On the dLocal sandbox page, click approve to simulate a successful enrollment, or cancel to simulate enrollment abandonment.
  4. You’re redirected back to the drop-in success/fail screen.
  5. Verify in the portal that a payment instrument was created for the holder, carrying the enrollment id as its token.
  6. Wait for the payment notification and confirm the execution moves to its final state.

MIT test steps

  1. Take the paymentInstrumentId created by the CIT run.
  2. POST the MIT payload above to the authorize endpoint of a fresh execution.
  3. Expect a pending result with no redirect action.
  4. Confirm the final state via the payment notification.

Supported currencies

Pix Automático via dLocal supports the following presentment currency:
  • BRL: Brazilian Real

Supported regions / countries

(via dLocal)

Supported workflows and services

For Save Instruments, the enrollment is the stored credential.
Last modified on September 28, 2026