Boleto
Learn how to integrate your solution to process payments with Boleto Bancario.
Info
The purchase status for Alternative Payment methods will remain Pending until the customer completes payment.
Boleto Bancario
Boleto Bancário is a popular payment method in Brazil that allows for paying bills and online purchases without a credit card. It generates a unique barcode that can be printed or accessed through a digital platform and paid at any bank or authorized payment center.
Request parameters
You need to include specific fields for this payment method to work correctly. Check the Purchase operation article for details on authentication, languages of the response, and basic purchase parameters such as amount and currency.
Property | Type | Mandatory? | Description |
---|---|---|---|
PaymentMethod | string | Yes | Find the value in the table Payment Method. |
TargetCountryISO | string | Yes | Indicate the destination country. |
Customer → Email | string | Yes | Customer’s email. |
Customer → FirstName | string | Yes | Customer’s first name. |
Customer → LastName | string | Yes | Customer’s last name. |
Customer → DocumentType | string | Yes | Customer’s document type. Refer to the Document types table to see the possible values. |
Customer → DocumentNumber | string | Yes | Customer’s Document Number. |
Customer → PhoneNumber | string | No | Customer’s phone number. |
Customer → Address → Country | string | No | Customer’s Country. |
Customer → Address → State | string | Yes | Customer’s State. |
Customer → Address → City | string | Yes | Customer’s City. |
Customer → Address → AddressDetail | string | No | Customer’s Address Detail. |
Customer → Address → PostalCode | string | Yes | Customer’s Postal Code. The postal code must have eight digits—for example, 29018660 . |
MetaDataIn → PaymentExpirationInMinutes | numeric | No | Configure the expiration time for the payment using this field, specifying the duration in minutes. The API applies a default value if you don’t provide this information. |
MetadataIn → AddressStreet | string | Yes | Customer address street. |
MetadataIn → AddressNumber | string | Yes | Customer address number, floor, apartment. |
MetadataIn → AddressDistrict | string | Yes | Customer address district. |
Request example
{
"PaymentMethod": "BLT",
"Order": "paymentID3022",
"Amount": 20000,
"Currency": "BRL",
"Description": "Purchase Test",
"MetaDataIn": {
"PaymentExpirationInMinutes": "7200",
"AddressStreet": "Avenida Anisio Fernandes Coelho",
"AddressNumber": "661",
"AddressDistrict": "PR"
},
"TargetCountryISO": "BR",
"Customer": {
"Address": {
"AddressDetail": "Avenida Anisio Fernandes Coelho, 661 ",
"PostalCode": "29060670",
"City": "Vitoria",
"State": "ES",
"Country": "Brasil"
},
"FirstName": "Jhon",
"LastName": "Doe",
"DocumentNumber": "47168892703",
"DocumentType": "CPF.BR",
"PhoneNumber": "3188060418",
"Email": "john@mail.com"
}
}
Response parameters
In the response, you will find the following parameters:
Property | Type | Description |
---|---|---|
Response → MetadataOut → PaymentCode | string | Payment code generated by Boleto Bancario |
Response → MetadataOut → PaymentBarCode | string | Code of the barcode generated to complete the payment. |
Response → MetadataOut → PaymentBarCodeUrl | string | URL of the payment page. You can redirect the payer to this page to download the boleto. |
Response → MetadataOut → PaymentExpirationDate | date | Date when the payment will expire. Format DD/MM/YYYY HH:MM:SS. |
Payment page in Boleto
Response example
{
"TransactionId": "128635201747174176",
"Result": "COMPLETED",
"Status": "PENDING",
"ErrorCode": null,
"ErrorDescription": null,
"Created": "2024-12-20T20:46:20.199",
"AuthorizationDate": "2024-12-20T20:46:20.674",
"AuthorizationCode": "",
"Amount": 1000,
"Currency": "BRL",
"Installments": 1,
"TaxableAmount": null,
"Tip": null,
"Url": "https://api.stage.bamboopayment.com/Purchase/128635201747174176",
"MetadataOut": {
"PaymentCode": "bd88102f813cface085ea4ac63038a65cd5378228be2d5694f67b8a83af45931",
"PaymentBarCode": "10491814900000002009632034000900041179634666",
"PaymentBarCodeUrl": "https://pagar.sandbox.goboleto.com/?hash=bd88102f813cface085ea4ac63038a65cd5378228be2d5694f67b8a83af45931",
"PaymentExpirationDate": "09/01/2026 00:00:00"
},
"Action": null,
"PaymentMethod": {
"Brand": "Boleto",
"CardOwner": null,
"Bin": null,
"IssuerBank": null,
"Type": "BankTransfer",
"Expiration": null,
"Last4": null
}
}