---
updatedAt: 2026-03-03T17:17:39.000Z
agentTools:
  projectIndex: https://docs.dlocal.com/llms.txt
---

# Brazil / Pix payments

Learn how to start receiving Pix payments.

Pix is a Brazilian payment method, officially launched by the local Central Bank, that enables immediate payment confirmation and 24/7 availability. The user can complete the payment using any Home Banking or Ewallet App, by copying and pasting a Transaction ID or scanning a QR code (see example in the next section).

> ℹ️ Availability
>
> Pix payment method is only available in Brazil.

Pix payments support a `REDIRECT` or `DIRECT` flow.

# Redirect Pix payment

In this flow, `payment_method_flow` is set to `REDIRECT`. The API returns a `redirect_URL`, which is used to redirect the user to a dLocal-hosted page (shown below). The user will be able to open any App that supports Pix (Home Banking and Ewallets) and decide whether to use the scan QR or the Transaction ID copy/paste option.

Using the `REDIRECT` method, the payment will have the `PENDING` status until the user confirms the payment, and dLocal gets notified (immediate after user confirmation).

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/749e173655ad5395b2331bda14024bd89bf6dea189ade8b35f78929f9550ba97-APM_-_pix-redirect.png",
        null,
        "PIX redirect display example."
      ],
      "align": "center",
      "caption": "Pix redirect display example."
    }
  ]
}
[/block]

## Example request

```json Example request body
{
    "amount": 100,
    "currency": "BRL",
    "country": "BR",
    "payment_method_id": "PQ",
    "payment_method_flow": "REDIRECT",
    "payer": {
        "name": "Thiago Gabriel",
        "email": "thiago@example.com",
        "document": "53033315550"
    },
    "order_id": "5346523564",
    "notification_url": "http://merchant.com/notifications"
}
```
```json Example response
{
    "id": "D-4-75c7473a-ab86-4e43-bd39-c840268747d3",
    "amount": 100,
    "currency": "BRL",
    "payment_method_id": "PQ",
    "payment_method_type": "TICKET",
    "payment_method_flow": "REDIRECT",
    "country": "BR",
    "created_date": "2020-11-16T20:37:20.000+0000",
    "status": "PENDING",
    "status_detail": "The payment is pending",
    "status_code": "100",
    "order_id": "5346523564",
    "notification_url": "http://merchant.com/notifications",
    "redirect_url": "https://dlocal.com/collect/pay/pay/M-0aa0cc00-094e-11e9-9f92-dbdad3ad0963?xtid=CATH-ST-1545856640-602791137"
}
```

# Direct Pix payment

Pix payments are available via our **Direct APMs** solution (`payment_method_flow = DIRECT`). The important parameters are returned via API, so the merchant can build their own Pix UI.

Using the `DIRECT` method, the payment will have the `PENDING` status until the user confirms the payment, and dLocal gets notified (immediate after user confirmation).

```json Example request body
{
    "amount": 100,
    "currency": "BRL",
    "country": "BR",
    "payment_method_id": "PQ",
    "payment_method_flow": "DIRECT",
    "payer": {
        "name": "Thiago Gabriel",
        "email": "thiago@example.com",
        "document": "53033315550"
    },
    "order_id": "5346523564",
    "notification_url": "http://merchant.com/notifications"
}
```
```json Example response
{
    "id": "D-4-75c7473a-ab86-4e43-bd39-c840268747d3",
    "amount": 100,
    "currency": "BRL",
    "payment_method_id": "PQ",
    "payment_method_type": "TICKET",
    "payment_method_flow": "DIRECT",
    "country": "BR",
    "ticket": {
        "type": "CUSTOM",
        "number": "QRS2-BTCN44FJ6HDQLB0DKKN2",
        "expiration_date": "2020-11-22T01:59:00.000+0000",
        "id": "QRS2-BTCN44FJ6HDQLB0DKKN2",
        "barcode": "iVBORw0KGgoAAAANSUhEUgAAAfQAAAH0CAIAAABEtEjdAABdsUlEQVR4XuzUwYolSbZs2/P/P/s",
        "company_name": "DLOCAL BRASIL LTDA",
        "provider_name": "pix",
        "provider_logo": "http://static-sandbox.dlocal.com/images/providers/pix.png",
        "image_url": "http://backoffice.dlocal.sandbox/gmf/payments/M-146aa2f0-094f-11e9-9f92-dbdad3ad0963"
    },
    "created_date": "2020-11-16T20:37:20.000+0000",
    "status": "PENDING",
    "status_detail": "The payment is pending",
    "status_code": "100",
    "order_id": "5346523564",
    "notification_url": "http://merchant.com/notifications"
}
```

# Specific instructions

## Mobile version instructions (Direct flow)

### Copy and paste flow

1. As users who are paying using Pix with their mobile device will not be able to scan the QR code, the mobile flow is based on copying and pasting the `ticket.number` to the Bank Application in order to complete the payment.
2. Please use `ticket.number` for the Copy and Paste experience, the label presented to the user should be '"Copia e Cola" (The local and known term).

### Desktop version instructions

**Adding a QR code to the Pix payment page (Direct flow)**

There are 2 ways of presenting the QR code to the user:

1. Build a QR code using the `ticket.number` field
2. Use the `ticket.barcode` field - It includes a Base64 encoded QR image.