Boleto.Cloud API

Finance / API Key Intermediate HTTPS
Varies by plan (check documentation)

Overview

Boleto.Cloud is a Brazilian payment API that lets you generate boletos — the popular Brazilian bank slip payment method used widely for bills and online purchases. If you are building an e-commerce or billing application for the Brazilian market, this API handles the complex boleto generation rules for you. It requires an API key and is designed for developers serving Brazilian customers.

💡

Beginner Tip

Boletos are a Brazil-specific payment method, so this API is only relevant if you are targeting Brazilian customers. Make sure your boleto expiration date is set at least 1-3 days in the future since same-day boletos are often rejected by banks.

Available Data

randomly generated data
customizable output format
Boleto.Cloud data via REST API
JSON-formatted response data
Requires API key authentication

Example Response

JSON Response
{
  "status": "success",
  "data": {
    "result": "Data from Boleto.Cloud",
    "description": "A api to generate boletos in Brazil",
    "timestamp": "2025-01-15T10:00:00Z"
  }
}

Field Reference

id Unique identifier for the generated boleto.
barcode The numeric barcode string that identifies the boleto for payment at banks or ATMs.
pdf_url URL to the printable PDF version of the boleto that customers can download and pay.
due_date The expiration date of the boleto in ISO 8601 format.
amount The payment amount in Brazilian Reais (BRL).

Implementation Example

const url = "https://boleto.cloud/";
// Replace headers or query params with the values required by this API.
const response = await fetch(url, {
  headers: {
  "X-API-Key": "YOUR_API_KEY"
  }
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = await response.json();
console.log(data);

What Can You Build?

Note: These code examples are AI-generated and unverified. Always refer to the official API documentation for accurate usage.

Common Errors & Troubleshooting

401 Unauthorized The API key is missing or incorrect in the Authorization header.
Use the format "Authorization: Bearer YOUR_API_KEY" and verify your key in the Boleto.Cloud dashboard.
422 Unprocessable Entity Required fields like due_date or payer document are missing or formatted incorrectly.
Ensure the due_date is in YYYY-MM-DD format and the payer's CPF/CNPJ document is valid.
Boleto not accepted by bank The generated boleto has already expired or the due date was in the past.
Always set the due_date to a future date and regenerate a new boleto if a customer misses the payment deadline.

Matrix Score Breakdown

🌐 Reachability 30/30
⚡ Speed 5/20
🔒 Security 15/15
🛠 Developer XP 12/20
✓ Reliability 10/15

Partially tested on Apr 5, 2026

Technical Specifications

Auth API Key
HTTPS REQUIRED
CORS UNKNOWN
Category Finance
Difficulty Intermediate
Verified: 2026-04-04

Similar APIs

View All →