Boleto

Learn how to integrate your solution to process payments with Boleto Bancario.

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.

PropertyTypeMandatory?Description
PaymentMethodstringYesFind the value in 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

{
    "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:

PropertyTypeDescription
ResponseMetadataOutPaymentCodestringPayment code generated by Boleto Bancario
ResponseMetadataOutPaymentBarCodestringCode of the barcode generated to complete the payment.
ResponseMetadataOutPaymentBarCodeUrlstringURL of the payment page. You can redirect the payer to this page to download the boleto.
ResponseMetadataOutPaymentExpirationDatedateDate when the payment will expire.
Format DD/MM/YYYY HH:MM:SS.

Payment page in Boleto

PrintScreen

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
    }
}
footer
Last modified December 20, 2024

© Bamboo | All rights reserved 2024