Boleto

How to process Boleto transactions correctly with our API?

Boleto is one of the popular cash payment methods in Brazil. Even though its use is declining following the introduction of PIX, it still holds a sizable market share to be considered in your checkout.

Boleto payment method is a little strict in terms of collected user input, and requires you implement strict validations, as well as a method to display the payment slip at the end of the checkout.

In case you would like to avoid building your own checkout, you can also use our low codeCreate a checkout API, where all the data handling is done by our side.

How to create a payment with Boleto?

Using the Payments API, send a valid request to rest/payment endpoint to create a valid
Boleto slip to be paid.

Once you have a valid response, display the returned slip_id barcode to your customers download and pay. You may also choose to send the slip over an e-mail, SMS or any other communication methods of your choice.

In case you choose to display the slip, we recommend Boleto JS Javascript library which we also internally use in our Checkout solution.

Once the customer has paid the slip, your system will receive a Webhook-Postback notification from our payment gateway.

What should you keep in mind in terms of data validation?

When creating Boleto payments you should:

  1. Send payment_type: boleto_b2b in case it's being paid by the company, and boleto otherwise.
  2. Make sure the full postal address of the customer is passed, as well as the phone number and the e-mail.
  3. Address should include state as two letter code. For example, RJ for Rio de Janeiro.
  4. Phone numbers should exclude the country code.
  5. Pass in company_vat_id as tax id for both type of customers. In case payment type is boleto, this value should follow CPF tax id format, while for boleto_b2b CNPJ tax id format is applicable.
  6. Only BRL currency and BR country is accepted as parameters

In test environment, follow boleto test data guide to make successful payments.