---
updatedAt: 2026-07-27T09:12:27.000Z
agentTools:
  projectIndex: https://docs.dlocal.com/llms.txt
---

# Cash payments

Learn how to start receiving cash payments.

# Redirect cash payments

All Cash (`TICKET`) payment methods offer a redirect solution (`payment_method_flow = REDIRECT`). The API returns a `redirect_URL`, which is used to redirect the user to a dLocal-hosted page. The user will be able to see the ticket in order to print it or pay using their home banking.

Using the Redirect method, the payment will have the `PENDING` status until the user pays the ticket, and dLocal gets notified.

> The usage of the `redirect_url` must be with a GET operation.

> ⚠️ Important
>
> Starting May 1st 2021, the `redirect_url` will start returning an `HTTP 200 OK` with the HTML content of the ticket. This will be instead of the `HTTP 302 FOUND`, that used to generate a double redirect.

The example below belongs to payment using OXXO in Mexico. For a full list of TICKET payment methods available, visit the [Payment method page](https://docs.dlocal.com/docs/payment-method).

## Example request

```json Example request
curl -X POST \
    -H 'X-Date: 2018-02-20T15:44:42.310Z' \
    -H 'X-Login: sak223k2wdksdl2' \
    -H 'X-Trans-Key: fm12O7G9' \
    -H 'Content-Type: application/json' \
    -H 'X-Version: 2.1' \
    -H 'User-Agent: MerchantTest / 1.0 ' \
    -H 'Authorization: V2-HMAC-SHA256, Signature: 1bd227f9d892a7f4581b998c21e353b1686a6bdad5940e7bb6aa596c96e0a6ec' \
    -d '{body}'
    https://api.dlocal.com/payments

{
    "amount": 100,
    "currency": "MXN",
    "country": "MX",
    "payment_method_id": "OX",
    "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": "MXN",
    "payment_method_id": "OX",
    "payment_method_type": "TICKET",
    "payment_method_flow": "REDIRECT",
    "country": "MX",
    "created_date": "2018-12-26T20: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://sandbox.dlocal.com/collect/pay/pay/M-0aa0cc00-094e-11e9-9f92-dbdad3ad0963?xtid=CATH-ST-1545856640-602791137"
}
```

## Example ticket

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/a788e6c1b11b9b9e9ba204bcb69f9585843a07a733ea92dd34bb862b9a27f5b2-APM_-_oxxo.png",
        "dlocal-oxxo.png",
        1632
      ],
      "align": "center",
      "sizing": "80",
      "caption": "Example of redirect page of an OXXO ticket."
    }
  ]
}
[/block]

# Direct cash payments

Some alternative payment methods are available via our **Direct APMs** solution (`payment_method_flow = DIRECT`). The important parameters of a ticket are returned via API, so the merchant can build their own UI.

The example below belongs to direct payment using Boleto Bancário in Brazil. For a full list of `TICKET` payment methods available, visit the [Payment method page](https://docs.dlocal.com/docs/payment-method).

## Example request

```json Example request
curl -X POST \
    -H 'X-Date: 2018-02-20T15:44:42.310Z' \
    -H 'X-Login: sak223k2wdksdl2' \
    -H 'X-Trans-Key: fm12O7G9' \
    -H 'Content-Type: application/json' \
    -H 'X-Version: 2.1' \
    -H 'User-Agent: MerchantTest / 1.0 ' \
    -H 'Authorization: V2-HMAC-SHA256, Signature: 1bd227f9d892a7f4581b998c21e353b1686a6bdad5940e7bb6aa596c96e0a6ec' \
    -d '{body}'
    https://api.dlocal.com/payments

{
    "amount": 120,
    "currency": "USD",
    "country": "BR",
    "payment_method_id": "BL",
    "payment_method_flow": "DIRECT",
    "payer": {
        "name": "Thiago Gabriel",
        "email": "thiago@example.com",
        "document": "53033315550",
        "user_reference": "12345",
        "address": {
            "state": "Rio de Janeiro",
            "city": "Volta Redonda",
            "zip_code": "27275-595",
            "street": "Servidao B-1",
            "number": "1106"
        }
    },
    "order_id": "5346523564",
    "notification_url": "http://merchant.com/notifications"
}
```
```json Example response
{
    "id": "D-4-965cbd38-92d4-4e71-a000-2f653d7d16c6",
    "amount": 120,
    "currency": "USD",
    "payment_method_id": "BL",
    "payment_method_type": "TICKET",
    "payment_method_flow": "DIRECT",
    "country": "BR",
    "ticket": {
        "type": "CUSTOM",
        "number": "34191090080056880044554689940002877570000096000",
        "expiration_date": "2019-01-03T01:59:00.000+0000",
        "id": "109/00005688-0",
        "barcode": "34198775700000960001090000568800445468994000",
        "company_name": "DLOCAL BRASIL LTDA",
        "provider_name": "itau",
        "provider_logo": "http://static-sandbox.dlocal.com/images/providers/itau.png",
        "image_url": "http://backoffice.dlocal.sandbox/gmf/payments/M-146aa2f0-094f-11e9-9f92-dbdad3ad0963"
    },
    "created_date": "2018-12-26T20:44:44.445+0000",
    "status": "PENDING",
    "order_id": "5346523564",
    "notification_url": "http://merchant.com/notifications"
}
```

## Example ticket

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/e49c218c5873e108317f50c4e40ce9935b015b6e2ed386a2f144c28031e8a458-cash_pay.png",
        "dlocal-caixa.png",
        1300
      ],
      "align": "center",
      "sizing": "80",
      "caption": "Example mobile UI built with the information in the example above."
    }
  ]
}
[/block]

## Cancel a cash payment

Some of our DIRECT APMs tickets can be cancelled by merchants just giving the following instruction through the API: <https://api.dlocal.com/payments/{payment_id}/cancel>.

See more information on how to [Cancel alternative payment](https://docs.dlocal.com/reference/cancel-alternative-payment) in the API reference section.

### Example request

Send a `POST` request to `https://api.dlocal.com/payments/D-4-f1500792-7527-4a0e-86ef-3a9472b63f21/cancel` with no request body.

```json Example response
{
    "id": "D-4-f1500792-7527-4a0e-86ef-3a9472b63f21",
    "amount": 1000,
    "currency": "MXN",
    "payment_method_id": "OX",
    "payment_method_type": "TICKET",
    "payment_method_flow": "DIRECT",
    "country": "MX",
    "created_date": "2020-09-14T19:11:48.000+0000",
    "status": "CANCELLED",
    "status_detail": "The payment was cancelled.",
    "status_code": "400",
    "order_id": "23796c17-2cc5-4fbb-86b5-10da0859a282",
    "description": "test",
    "notification_url": "http://conductor.sandbox.internal/robot-server/rest/generic/notification/new"
}
```