Skip to main content
To receive money by boleto, create a boleto charge (boleto-billing) on a wallet. Portão 3 registers the boleto at the bank and returns its digitable line and barcode, which you share with the payer — or send them the boleto’s PDF. When they pay, the amount is credited to the wallet. A boleto charge has no webhook: read it back to follow it.

Flow

Step 1: Create the charge

The bank registers the boleto right away, so the charge comes back CREATED, with the digitableLine and barcode:
The payer’s name and address are printed on the boleto as the bank keeps them — without accents, with the name cut to 50 characters, the street to 40 and the neighborhood to 20 — and the charge shows them that way. Rarely, the charge comes back INITIATED, still without digitableLine and barcode: read it back until it is CREATED. Reference: Create a boleto charge

Step 2: Share the boleto

Show the payer the digitableLine (linha digitável), which they type into their bank app, or render the barcode. To send them the boleto itself, download its PDF. The response is the PDF file encoded in base64, as plain text — decode it to save the file:
In a browser, prefix the text with data:application/pdf;base64, to open or download it. Reference: Download a boleto charge’s PDF

Step 3: Know when it’s paid

There is no webhook for a boleto charge. Read the charge to follow its status, or list the wallet’s charges filtered by status — for example ?status=PAID. A paid charge carries what was credited to the wallet in confirmedAmount (with any discount, fine or interest applied) and when in confirmedAt; the payment also appears in the wallet’s transactions. A charge can’t be cancelled through the API: an unpaid boleto stays payable until expiresAt, and the bank then writes it off (CANCELED).

Discount, fine and interest

Amounts are in centavos. Percentages are fractions of txnAmount: 0.02 is 2%, from 0.01 (1%) to 1 (100%).
PERCENT_POINT_PER_DAY_CALENDAR_DAYS and PERCENT_POINT_PER_DAY_WORKING_DAYS are accepted, but the boleto is issued with the same number as a rate per month: 0.01 is charged as 1% a month, not 1% a day. The charge comes back with the matching PERCENT_POINT_PER_MONTH_* type. Send a monthly rate instead.

Errors

When the bank refuses the boleto (a 4xx), the charge is also left PROCESSING; creating it again is safe. Each endpoint’s reference page lists every error it can return.

Next steps

Charge with PIX

Generate a Pix QR Code instead.

Recurring billing with Pix Automático

Charge a customer every month, with a boleto as the fallback.