Get started with Pix Automático via dLocal
Before you begin
If this is your first payment method, make sure to follow the Get started guide to begin processing payments with Primer. Pix Automático is not active on a dLocal account by default. Ask your dLocal contact to enable it before you activate it on the Checkout. You need credentials from the dLocal Merchant Dashboard. If you do not have an account, contact your dLocal account manager or support@dlocal.com. To get sandbox credentials, toggle Test mode in the top right of the dLocal dashboard — a blue bar appears across the top to confirm you are in test mode. Your x_login, x_trans_key and secret key are under Settings > Integration, on the Integration tab.Configure in the Dashboard
- Add Pix Automático via dLocal payment method to your Dashboard Go to the integrations section of the Dashboard, click on the ‘New Integration’ button and search for dLocal. Enter your x_login, x_trans_key and secret key, then click Connect.
- Add your MID Enter your dLocal AccountId in the MID box. You can find it at the top of the dLocal dashboard.
- Configure the webhooks in dLocal Copy the callback URL that Primer shows you during setup. In the dLocal dashboard, under Endpoint configuration, paste it into both the Refunds URL field and the Payins notification URL field. The Payins notification URL is required for Pix Automático.
- Activate Pix Automático via dLocal on the Checkout Go to the Checkout section of the Dashboard and toggle on Pix Automático. Add a display condition so it only appears where it can be paid — at a minimum,
Currency = BRL. - Configure a Workflow to process payments made with Pix Automático via dLocal Go to Workflows and create a workflow with a Payment created trigger and an Authorize payment action with Auto-continue enabled. Pix Automático via dLocal is a web redirect connection, so no further steps are needed.
Prepare the client session
dLocal leverages the following parameters to process a payment. Pass them when creating the client session.Enrolment and initial payment
The first payment creates the mandate and charges the customer. Pass the subscription terms in the client session metadata — they dictate when and how much you are allowed to charge on the recurring payments that follow.Recurring payments
For each merchant-initiated payment after the enrolment, pass the date the payment is scheduled for in metadata. dLocal requires it.scheduled_date. The example above was submitted on 4 September for a 4 October billing date.
Automatic retries
On thescheduled_date, between 00:00 and 08:00, dLocal attempts the debit. If it succeeds, the payment settles and Primer sends you a SETTLED webhook. If this first attempt fails, you are not notified.
If the first attempt failed because of insufficient funds or account limits, dLocal must retry the same day between 18:00 and 21:00 — a regulatory requirement from the Banco Central do Brasil. That retry is automatic and you do not need to trigger it. It produces a Primer webhook: SETTLED if it succeeds, FAILED if it does not.
Prepare the SDK for payments
- Web
- iOS
- Android
Use the payment method type
DLOCAL_PIX_AUTOMATICO wherever the code below references YOUR_PAYMENT_METHOD_TYPE.- Primer Checkout (recommended)
- Universal Checkout (legacy)
- Headless Universal Checkout (legacy)
Primer Checkout is our latest web SDK, built around declarative web components. Once Pix Automático via dLocal is enabled in your Dashboard, the default For dynamic rendering based on what the server returns, listen to primer:methods-update or use primer-payment-method-container for declarative filtering.
<primer-checkout> layout renders it automatically alongside your other methods — no payment-method-specific markup is required.