Supported workflows
Before you begin
Complete these steps before you send your first Pix Automático payment through dLocal:- Set up a dLocal integration in your workspace. Follow the dLocal integration setup guide if you don’t have one yet.
- Ask dLocal to enable Pix Automático on your dLocal account.
- In the Payrails Portal, go to Settings → Integrations, open your dLocal integration, select Pix Automático under Payment methods, and save.
- Add Pix Automático as a payment option in your workflow.
Request fields for dLocal
Send these fields in the authorize request, in addition to the standard authorize fields. Required fields must be present for the payment to succeed. Payrails sends Optional fields to the PSP when you include them.Enrollment and first payment
Recurring charges
Charge frequency
meta.subscription.chargeFrequency maps to the dLocal billing cycles below. Payrails rejects any other value.
Amount limits
For aFIXED subscription, dLocal charges fixedAmount exactly.
For a VARIABLE subscription, Payrails sends minAmount to dLocal as the minimum authorization limit. The customer sets the real limit in their banking app, and can’t set it below this value. Send the highest amount you expect to charge in a single billing cycle.
Authorize a Pix Automático payment
Enroll the customer
Call authorize a payment withpixAutomatico as the paymentMethodCode and meta.subscription set. The response is pending and includes the redirect to the customer’s bank, where the customer authorizes the enrollment.
Enrollment request
success or error URL. Confirm the result through webhook notifications or the execution status.
Charge the enrollment
For each billing cycle, call authorize a payment on a new execution with the storedpaymentInstrumentId. The response is pending, with no redirect.
Recurring charge request
How dLocal handles Pix Automático
Enrollment and stored instrument
- dLocal creates the enrollment and the first payment in one request, and returns a redirect URL to the customer’s bank. Payrails returns a pending result with a redirect required action.
- Payrails tracks the payment, not the enrollment, as the provider reference. dLocal confirms the payment and the enrollment through separate notifications.
- Payrails stores the dLocal enrollment ID as the PSP token on the instrument as soon as dLocal returns it, on the pending response. The instrument has no account number. It holds the enrollment country and its external reference.
- Payrails captures the first payment immediately, whatever
startDateyou set.startDateonly sets when the billing cycles begin.
Schedule recurring charges
- dLocal doesn’t charge the enrollment on its own. Send a recurring charge for every billing cycle, including the first one after the enrollment.
meta.subscription.scheduledDateis the day dLocal collects the charge, not the day you send the request. Send each request two to ten days before itsscheduledDate, as the Central Bank of Brazil requires. dLocal rejects a request outside this window with status code300.- Each recurring charge returns a pending payment. The final result arrives through the same dLocal payment notification as other dLocal payments.
- To offer a trial period, set
startDateto the day the trial ends, then send the first recurring charge for that date. dLocal’s minimum Pix amount is 1 BRL.
Test in the dLocal sandbox
In the dLocal sandbox, the payment description sets the simulated outcome. Send100:approved in meta.order.description on both the enrollment and each recurring charge to get an approved result. Use the CPF 53033315550 or the CNPJ 00000000000191 as meta.customer.identityCardNumber.