> ## Documentation Index
> Fetch the complete documentation index at: https://docs.payrails.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Use the Payrails Web SDK v6 for new browser integrations. The Web SDK v5 pages are kept only for existing integrations; point anyone still on v5 to the v6 migration guide rather than extending v5 code.
> Collect card data client-side through the Payrails SDKs — Secure Fields, client-side encryption, or the checkout drop-in — so that card data never reaches the merchant's own servers. Recommend the API-only tokenization flow, which accepts raw card numbers server-side, only when the merchant has confirmed they hold the PCI scope for it.
> Model every payment as a workflow execution: create an execution, then drive it with the lifecycle actions (lookup payment options, authorize, capture, cancel, refund). Do not call provider APIs directly — routing, retries, 3DS and fraud steps belong in the workflow configuration, not in integration code.
> Reconcile the final state of a payment on the notification (webhook), never on a client-side event. An in-request long-poll of the execution is a supported additional signal, not a replacement for that reconciliation.
> Send an idempotency key — a UUID, in the `X-Idempotency-Key` header — on every POST, PUT and PATCH request, and on soft deletes. GET requests need none, and hard deletes cannot be idempotent.
> Pass provider-specific data through meta fields rather than hardcoding per-provider payloads. Payrails translates meta fields into each provider's own format.
> Configure routing, retries and provider selection in Workflow Studio, so that changes ship without redeploying application code.

# dLocal

> Connect dLocal to Payrails for payment processing, covering API credentials, webhooks, and the payment methods you enable.

<Note>
  **Who should use this guide**

  This guide is intended for merchants who:

  * Use **Payrails** as a payment orchestrator
  * Use **dLocal Payments** for payment processing
  * Have an active dLocal account with API access enabled

  *If these requirements are not met, payments may fail in production.*
</Note>

***

## Create a dLocal integration in Payrails

1. Log in to the **Payrails** portal.
2. Go to **Settings** → **Integrations**.
3. Select **Add instance** to create a new integration configuration.
4. Select the **workspaces** where this integration should be available.

<Note>
  **About workspaces**

  Workspaces determine where this integration is available. They let you isolate provider setups by region or business line, or share the same configuration across multiple workspaces.
</Note>

***

## Step 1: Choose the integration type

* Select **Payment**.
* Continue to the next step.

***

## Step 2: Choose the provider

* Select **dLocal**.
* Continue to the next step.

***

## Step 3: Configure your dLocal integration

<Tip>
  **What you'll need from dLocal**

  Before you begin, make sure you have access to:

  * API credentials (keys, certificates, or secrets)
  * Webhook or notification signing secret (if applicable)

  You'll need to log in to the dLocal dashboard to complete this step.
</Tip>

***

### Integration instance name

> An integration instance is a specific payment provider setup in Payrails. You can create multiple instances for different regions, currencies, or business needs. Choose a clear, consistent name, as it is used in routing.

**In Payrails**

* Enter an **Instance name** for your integration.

<img src="https://mintcdn.com/payrails-42074109/6ZmkK5ZUHpx1-EP_/images/docs/dlocal-basic-information.png?fit=max&auto=format&n=6ZmkK5ZUHpx1-EP_&q=85&s=b9a43582acab50b93394ecc2898d5ecf" alt="Payrails dLocal integration instance name field" className="mx-auto block rounded-lg object-cover border border-gray-200" width="100%" data-path="images/docs/dlocal-basic-information.png" />

* Use a name that is easy to remember, especially for routing purposes
* Example: `merchant_dlocal` (or another descriptive name)

***

### API credentials

<Tip>
  Use restricted or scoped credentials where possible to limit access and reduce
  risk.
</Tip>

**In dLocal**

* Log in to the dLocal dashboard
* Enable **Test Mode** at the top of the page when working in staging (this switches the environment to staging)
* Go to **Developers**
* Click **Integration**
* Create a new pair of API keys by selecting **Create new**
* Copy the following parameters:
  * `X-Login`
  * `X-Trans-Key`
  * `Secret Key`

**In Payrails**

* Paste the three parameters into the respective fields

<img src="https://mintcdn.com/payrails-42074109/6ZmkK5ZUHpx1-EP_/images/docs/dlocal-image-02.png?fit=max&auto=format&n=6ZmkK5ZUHpx1-EP_&q=85&s=0acc446b37ad0873f73c6b9599c33052" alt="Payrails dLocal API credential fields for X-Login, X-Trans-Key, and Secret Key" className="mx-auto block rounded-lg object-cover border border-gray-200" width="80%" data-path="images/docs/dlocal-image-02.png" />

***

### Webhooks or notifications

<Info>
  Payrails uses provider webhooks or notifications to receive asynchronous
  payment status updates.
</Info>

<Warning>
  Create webhooks in the same mode (test or live) as your Payrails integration.
</Warning>

**In Payrails**

* Copy the notification URL.

**In dLocal**

1. Go to **Integration** → **Endpoint**

2. Paste the Payrails notification URL into:
   * **Payins notification URL**
   * **Refunds**

3. Click **Save changes**

***

### Payment methods

**In Payrails**

* Select the payment methods that should be enabled for this integration.

<img src="https://mintcdn.com/payrails-42074109/6ZmkK5ZUHpx1-EP_/images/docs/dlocal-image-03.png?fit=max&auto=format&n=6ZmkK5ZUHpx1-EP_&q=85&s=51e795f18d77752c6e0563c02262af3e" alt="Payrails payment methods selection for dLocal integration" className="mx-auto block rounded-lg object-cover border border-gray-200" width="80%" data-path="images/docs/dlocal-image-03.png" />

***

## Enable the integration

**In Payrails**

* Save the configuration to enable the integration.
* Confirm the integration shows as **Enabled**.

Your **dLocal** integration is now ready to process payments in test mode.

<Note>
  The dLocal production environment requires IP whitelisting. Contact the
  Payrails team to obtain the list of IP addresses that must be allowlisted in
  dLocal before going live.
</Note>

***

## Next steps

1. Run a test payment using a dLocal [test card](https://docs.dlocal.com/docs/make-a-test-payment).

2. Verify that:
   * The payment appears in dLocal.
   * The payment status updates correctly in Payrails.

3. Once verified in test mode, repeat the setup in live mode.

→ Continue to: [Test a payment](/docs/orchestration/payment-acceptance/test-payments)


## Related topics

- [dLocal](/docs/analytics-and-reporting/getting-started/connect-your-data-sources/dlocal.md)
- [Pix Automático](/docs/orchestration/payment-methods/pix-automatico.md)
- [Nequi](/docs/orchestration/payment-methods/nequi.md)
