Boleto

Boleto is one of Brazil's most widely used payment methods, allowing customers to pay for online purchases either over the counter at any supporting outlet in Brazil, or through internet banking. It is particularly popular because a significant portion of Brazilian consumers do not have a bank account.

The consumer is provided with a payment code (or barcode), which they then use to complete the payment — either in cash at a physical location or through their home banking app.

Introduction

Boleto uses a redirect-based payment flow. When a customer selects Boleto at checkout, they are redirected to dLocal's hosted page where a Boleto ticket is generated. The customer can then pay using the barcode or numeric code at a bank, ATM, or via internet banking, then return to your site upon completion.

Boleto is a single-use payment method where a new ticket must be generated for each transaction.

This guide explains the process of integrating Boleto into your app or website using Payrails.

Pre-requisites

Before you start accepting Boleto payments with Payrails, there are a few requirements you must meet:

  1. Integrate with Payrails using one of our SDKs or our API
  2. Configure a new integration account for Boleto via dLocal as a Payment Service Provider. If you do not have a dLocal integration already configured in your workspace, please follow the dLocal integration setup guide first.
  3. Enable Boleto as a payment method in your dLocal integration configuration. In the Payrails portal, navigate to Settings → Integrations, select your dLocal integration instance, and enable the Boleto checkbox under Payment methods, then save the account.
  4. Enable Boleto as a payment option in your workflow.
  5. Make sure you're sending the Boleto-specific meta fields in your requests.

Ways to integrate Boleto

Payrails SDK

The simplest way to use Boleto with Payrails is to use our drop-in in your checkout flow. With this integration type, no additional work is required to accept payments with Boleto except for handling success/failure screens for your users.

For a more flexible implementation using our SDK, you can use our genericRedirectButton element. See special instructions here for your client-side implementation.

Server-to-server integration

You can integrate Boleto by completely managing your own client-side implementation, and using Payrails APIs with a server-to-server integration to process Boleto payments.

Parse Boleto from lookup response

With a server-to-server integration, you can call our lookup payment options endpoint to get available payment options. As shown in the example below, you can see boleto returned as an option of the paymentCompositionOptions.

{
  "name": "lookup",
  "actionId": "0bb6413e-cabb-4074-99e6-9e815c69f25b",
  "executedAt": "2026-03-26T12:00:00.000000000Z",
  "data": {
    "paymentCompositionOptions": [
      {
        "integrationType": "redirect",
        "paymentMethodCode": "boleto",
        "description": "Boleto"
      }
    ]
  },
  "links": {
    "execution": "https://api.payrails.io/merchant/workflows/payment-acceptance/executions/83c534ac-13b7-43e6-b04b-f3e8b4eb4424",
    "authorize": {
      "method": "POST",
      "href": "https://api.payrails.io/merchant/workflows/payment-acceptance/executions/83c534ac-13b7-43e6-b04b-f3e8b4eb4424/authorize"
    }
  }
}

Pass Boleto payment method in request to authorize payment with Payrails

You can then make a request to our authorize a payment endpoint with boleto as the paymentMethodCode. See an example below:

{
  "executionId": "c0fd1c51-e709-47e5-bfd1-5d1c98f7d990",
  "amount": {
    "value": "10039",
    "currency": "BRL"
  },
  "paymentComposition": [
    {
      "integrationType": "redirect",
      "paymentMethodCode": "boleto",
      "amount": {
        "value": "10039",
        "currency": "BRL"
      }
    }
  ],
  "meta": {
    "customer": {
      "name": "Pedro Gomes",
      "email": "[email protected]",
      "identityCardNumber": "11934254096",
      "country": {
        "code": "BR"
      }
    }
  },
  "returnInfo": {
    "success": "https://mysuccessurl.com",
    "error": "https://myerrorurl.com"
  }
}

Note on amounts: BRL uses 2 decimal places. Amounts should be provided in the smallest currency unit — e.g., 10039 for R$100.39.

Synchronous response

Note: Boleto is a redirect-based, single-use payment method. After calling the authorize endpoint, the customer will be redirected to a hosted page where they can view and pay the Boleto ticket. Once payment is confirmed, the customer will be redirected back to the returnInfo.success URL. Make sure to provide valid returnInfo URLs in your authorization request.

Handle the redirect response

After the customer pays the Boleto and returns to your site, verify the payment status by checking the workflow execution status via the Payrails API or by listening to webhook notifications. Note that Boleto payments may take up to 1 business day to confirm after the customer completes payment at a physical location.

Supported currencies

Boleto via dLocal supports the following presentment currency:

  • BRL — Brazilian Real

Supported regions / countries

Customer regions

Boleto is available to customers based in:

  • Brazil 🇧🇷

Merchant regions

Merchants enabled for Brazil can accept Boleto payments via dLocal.

Supported workflows and services

WorkflowSupported
Available via Payrails SDK✔️
Available via Payrails API✔️
Delayed / Manual Capture✖️
Instant Capture✔️
Cancel / Void✖️
Refund / Reverse✔️
Save Instruments✖️
Merchant Initiated Transaction (MIT)✖️