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.
CustomerEmailstringYesCustomer's email.
CustomerFirstNamestringYesCustomer's first name.
CustomerLastNamestringYesCustomer's last name.
CustomerDocumentTypestringYesCustomer's document type. Refer to the Document types table to see the possible values.
CustomerDocumentNumberstringYesCustomer's Document Number.
CustomerPhoneNumberstringNoCustomer's phone number.
CustomerAddressCountrystringNoCustomer's Country.
CustomerAddressStatestringYesCustomer's State.
CustomerAddressCitystringYesCustomer's City.
CustomerAddressAddressDetailstringNoCustomer's Address Detail.
CustomerAddressPostalCodestringYesCustomer’s Postal Code. The postal code must have eight digits—for example, 29018660.
MetaDataInPaymentExpirationInMinutesnumericNoConfigure 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.
MetadataInAddressStreetstringYesCustomer address street.
MetadataInAddressNumberstringYesCustomer address number, floor, apartment.
MetadataInAddressDistrictstringYesCustomer 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
MetadataOutPaymentCodestringPayment code generated by Boleto Bancario
MetadataOutPaymentBarCodestringCode of the barcode generated to complete the payment.
MetadataOutPaymentBarCodeUrlstringURL of the payment page. You can redirect the payer to this page to download the boleto.
MetadataOutPaymentExpirationDatedateDate 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: