Checkout redirect
Easily activate payments with dLocal’s Checkout solution.
Save time by integrating dLocal's Checkout, a pre-built workflow with all payment methods.
In this type of integration, the customer is redirected to a secure dLocal page, where the payment is completed. It doesn’t require PCI certification.

How does it work
1. Create a payment request
Make a POST request to the payments endpoint with the JSON body. Include all necessary information: amount, currency, payer details, etc.
2. Redirect the customer
Upon successful request, you will receive a response that contains a unique link (redirect_url
). Redirect your customers to that link so they can enter payment details.
By default, the Redirect URL can only be used one time.
3. Customer completes payment
The customer fills in their details (for the method you specified or any method, depending on your configuration), and our system processes the payment.
4. Get payment notification
Your notification_url
receives asynchronous updates about the transaction status. Upon completion, you can confirm the status (e.g., approved, declined) in your system.
When the payment status changes, an IPN is triggered, notifying the new status. The endpoint listening to this status can either be specified dynamically on a transaction level or statically at dLocal’s dashboard.
Checkout available configurations
Choose the best checkout experience for your customer based on their preferred payment flow.
- 1-Step Checkout. Redirects the customer directly to the payment flow for a specific payment method (e.g., Cards).
- 2-Step Checkout. Redirects the customer to a page where they can select from any available payment method (e.g., Cards, Banks, Wallets, etc.).
1-Step Checkout: Default payment method
Redirect the customer directly to the payment flow for a specific payment method (e.g. Cards).
Integration steps
- Set
payment_method_flow
toREDIRECT
.
This indicates that the customer should be redirected to the dLocal-hosted payment page. - Include a
payment_method_id
, such asCARD
.
This tells the API that the payment page should preselect and process the transaction using the specified payment method. - Send the JSON request to the payment API endpoint and retrieve the redirect URL.
Example request
All payment requests should be made to the /payments
endpoint.
You can find more information about this request on the Create payment page.
curl -X POST \
-H 'X-Date: {X-Date}' \
-H 'X-Login: {X-Login}' \
-H 'X-Trans-Key: {X-Trans-Key}' \
-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.00,
"currency" : "BRL",
"country": "BR",
"payment_method_id" : "CARD",
"payment_method_flow" : "REDIRECT",
"payer":{
"name" : "Thiago Gabriel",
"email" : "thiago@example.com",
"document" : "53033315550",
"address": {
"state" : "Rio de Janeiro",
"city" : "Volta Redonda",
"zip_code" : "27275-595",
"street" : "Servidao B-1",
"number" : "1106"
}
},
"order_id": "657434343",
"notification_url": "http://merchantsite.com/notifications"
}
{
"id": "D-4-086e1efe-c391-4226-992f-5e1d8664a297",
"amount": 120.00,
"currency": "BRL",
"payment_method_type": "CARD",
"payment_method_flow": "REDIRECT",
"country": "BR",
"created_date": "2019-01-09T20:08:49.000+0000",
"status": "PENDING",
"status_detail": "The payment is pending",
"status_code": "100",
"order_id": "Zh3gb4jhbg34Vj",
"notification_url": "http://merchantsite.com/notifications",
"redirect_url": "https://pay.dlocal.com/checkout/R-4-8b4f332f-b2fe-4f35-9cc1-632533d8..."
}
2-Step Checkout: Display payment methods
Redirect the customer to a page where they can pick any available payment method (e.g., Cards, Banks, Wallets, etc.).
Integration steps
- Set
payment_method_flow
toREDIRECT
.
This indicates that the customer should be redirected to the dLocal-hosted payment page. The checkout page will list all available payment methods. - Send the JSON request to the payment API endpoint and retrieve the redirect URL.
Example request
All payment requests should be made to the /payments
endpoint.
You can find more information about this request on the Create payment page.
curl -X POST \
-H 'X-Date: {X-Date}' \
-H 'X-Login: {X-Login}' \
-H 'X-Trans-Key: {X-Trans-Key}' \
-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.00,
"currency" : "BRL",
"country": "BR",
"payment_method_flow" : "REDIRECT",
"payer":{
"name" : "Thiago Gabriel",
"email" : "thiago@example.com",
"document" : "53033315550",
"address": {
"state" : "Rio de Janeiro",
"city" : "Volta Redonda",
"zip_code" : "27275-595",
"street" : "Servidao B-1",
"number" : "1106"
}
},
"order_id": "657434343",
"notification_url": "http://merchantsite.com/notifications"
}
{
"id": "D-4-086e1efe-c391-4226-992f-5e1d8664a297",
"amount": 120.00,
"currency": "BRL",
"payment_method_flow": "REDIRECT",
"country": "BR",
"created_date": "2019-01-09T20:08:49.000+0000",
"status": "PENDING",
"status_detail": "The payment is pending",
"status_code": "100",
"order_id": "Zh3gb4jhbg34Vj",
"notification_url": "http://merchantsite.com/notifications",
"redirect_url": "https://pay.dlocal.com/checkout/R-4-8b4f332f-b2fe-4f35-9cc1-632533d8..."
}
Considerations
- After making the request, you can get the result
REJECTED
orPENDING
. If the response isPENDING
, you will get the URL to redirect the customer. - Once the customer completes the payment (or the payment expires), you will receive a notification with the final status of the payment. You can get the result
REJECTED
orPAID
. - The default expiration date is 1 day.
- If the customer selects any card payment method (Visa, Mastercard, or any other card), all card payments will be processed with the security code of the card (CVV).
Updated 8 days ago