Boleto Bancario

Accept Boleto Bancário payments in Brazil with Bamboo. Learn how to integrate, request parameters, and test flows for this payment method.

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.


↪️

Redirect Flow for Boleto

This payment method uses a Redirect flow.
The API response includes an Action.URL and the purchase remains in Pending status until the customer completes the payment in a payment office or Internet Banking.


Request parameters

The following parameters are required specifically for this payment method.
Refer to the Purchase operation guide for standard fields and authentication requirements.

PropertyTypeMandatory?Description
PaymentMethodstringYesBLT - Review the table Payment Method.
TargetCountryISOstringYesIndicate the destination country.
Customer → EmailstringYesCustomer's email.
Customer → FirstNamestringYesCustomer's first name.
Customer → LastNamestringYesCustomer's last name.
Customer → DocumentTypestringYesCustomer's document type. Refer to the Document types table to see the possible values.
Customer → DocumentNumberstringYesCustomer's Document Number.
Customer → PhoneNumberstringNoCustomer's phone number.
Customer → Address → CountrystringNoCustomer's Country.
Customer → Address → StatestringYesCustomer's State. Refer to the Customer's State to see possible values.
Customer → Address → CitystringYesCustomer's City.
Customer → Address → AddressDetailstringNoCustomer's Address Detail.
Customer → Address → PostalCodestringYesCustomer’s Postal Code. The postal code must have eight digits—for example, 29018660.
MetaDataIn → PaymentExpirationInMinutesnumericNoConfigure 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 → AddressStreetstringYesCustomer address street.
MetadataIn → AddressNumberstringYesCustomer address number, floor, apartment.
MetadataIn → AddressDistrictstringYesCustomer address district.

Request example

To test this endpoint, use the API Reference or the Postman Collection

{
    "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": "[email protected]"
    }
}

Response parameters

In the response, you will find the following parameters. For additional information about the response structure, refer to the Response parameters section of the Purchase creation guide.

PropertyTypeDescription
MetadataOut → PaymentCodestringPayment code generated by Boleto Bancario
MetadataOut → PaymentBarCodestringCode of the barcode generated to complete the payment.
MetadataOut → PaymentBarCodeUrlstringURL of the payment page. You can redirect the payer to this page to download the boleto.
MetadataOut → PaymentExpirationDatedateDate 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
    }
}

Discover the API

Once you’re familiar with how to create a purchase, you can test your integration using our API Reference:


Did this page help you?