Skip to main content
Pix via dLocal redirects the customer to a dLocal hosted page presenting a Pix QR code and copy-and-paste key. The customer completes the transfer from their banking app and the funds settle instantly. Pix is Brazil’s instant payment scheme, developed by the Banco Central do Brasil for real-time payments between individuals, companies and government entities. It is available in Brazil only, in BRL.
Pix via dLocal is asynchronous. dLocal confirms the payment by webhook once the customer completes the transfer in their banking app, so fulfil orders only on a final status. Full and partial refunds are supported, and a payment can be refunded more than once.

Get started with Pix 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 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

  1. Add Pix 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.
  2. Add your MID Enter your dLocal AccountId in the MID box. You can find it at the top of the dLocal dashboard.
  3. Configure the webhook in dLocal Copy the callback URL that Primer shows you during setup and paste it into the Refunds URL field in the dLocal dashboard, under your API keys.
  4. Activate Pix via dLocal on the Checkout Go to the Checkout section of the Dashboard and toggle on Pix. Add a display condition so Pix only appears where it can be paid at a minimum, Currency = BRL.
  5. Configure a Workflow to process payments made with Pix via dLocal Go to Workflows and create a workflow with a Payment created trigger and an Authorize payment action with Auto-continue enabled. Pix 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.

Prepare the SDK for payments

Use the payment method type DLOCAL_PIX wherever the code below references YOUR_PAYMENT_METHOD_TYPE.

Test in sandbox

Connect your dLocal test account to your Primer Sandbox environment. Toggle Test mode in the dLocal dashboard before copying your credentials — sandbox and production credentials are different.

Go live

Ensure to use production credentials, and confirm with dLocal that Pix is enabled on your production account. Refunds URL webhook must be configured in your production dLocal dashboard as well as in sandbox.