Boleto Pay
Pays a boleto someone else issued. The account is the payer. Issuing a boleto for your own account is Boleto Issuance Guide.
Boleto is the other cash out available on v2 (on v1 these endpoints answered
503). There are three routes: one to read the boleto before paying, one to
pay, and one to check the outcome.
Step 1: Preview (read the boleto)
Resolves the payment line at the partner and returns 200 with the details of
the bill (beneficiary, payer, amount, due date) so you can show it before
debiting.
The canonical field is line; barcode is accepted as an alias. A boleto the
partner cannot find returns 404 not_found.
Pay totalUpdated, not amount
amount is the face value — the very number encoded in the barcode.
totalUpdated is what the settlement bank accepts today: face + interest +
fine − discount.
On an overdue slip the two differ, and the settlement bank rejects any value
other than the updated one (boleto_amount_mismatch). Since charges accrue by
the day, yesterday’s totalUpdated is already stale: run the preview on the day
you pay, and fund the account for the updated amount, not the face value.
Step 2: Pay
A divergent amount comes back as boleto_amount_mismatch (422), and the message
carries the amount the settlement bank expects — re-run the preview and resend
with it.
The response is always 202, never 200: the payment runs asynchronously
and the body carries paymentId (= boletoId, shaped bol_{uuid}),
status: "PROCESSING" and a Location header pointing at the status lookup.
The boletoId is derived from (accountId, Idempotency-Key), so repeating the
request with the same key returns the same paymentId and reuses the run in
flight — no double debit.
Step 3: Check the outcome
Accepts both the canonical paymentId (bol_...) and the partner reference.
While the partner has not returned a reference yet, the route answers 200 with
the last known local status (PROCESSING) instead of an error.
The outcome also arrives by webhook: boleto.paid and boleto.failed (see
Webhooks). Settling a boleto can take hours — up to the next
business day — so treat PROCESSING as a normal, long-lived state rather than a
failure.