Documentation

Look up and cancel boletos

List, read and cancel boletos through the API, track their status at the bank and send the payer the boleto's public page.

Before you start

Lookups use the organization token and return only that organization's boletos (Brazilian bank payment slips). No X-Credential-Key is needed: each boleto is checked and canceled at the bank through the credential that issued it. To issue one, see Issue a boleto.

HeaderRequiredValue
AuthorizationyesBearer <organization token>
MethodPathUse
GET/v1/boletoslists the boletos
GET/v1/boletos/:idreads a boleto
PATCH/v1/boletos/:id/cancelasks the bank to cancel it; requires an active subscription

List boletos

curl "https://api.intopays.com/v1/boletos?status=OPEN&pageNumber=0&pageSize=50" \
  -H "Authorization: Bearer $INTOPAYS_TOKEN"
ParameterRequiredValues
pageNumbernopage, from 0 (default)
pageSizenoitems per page; default 100
statusnoone of the values in the Status section
payerNamenopart of the payer's name
payerDocumentnopart of the payer's CPF or CNPJ (taxpayer ID)
referenceCodenopart of your number
withCountsnotrue includes totals per situation

The list comes newest boleto first. payerName, payerDocument and referenceCode match on part of the value; when you send more than one, a boleto is included if it matches any of them. status always narrows the result.

The response has data (the page's boletos, with the same fields as reading by id), pageNumber, pageSize and total (how many match the filters, across all pages).

With withCounts=true, it also carries counts, computed over the same search, without the status filter:

{
  "data": [],
  "pageNumber": 0,
  "pageSize": 50,
  "total": 0,
  "counts": { "paid": 212, "pending": 18, "processing": 1, "cancelled": 9 }
}
FieldCounts
paidPAID boletos
pendingOPEN boletos
processingPROCESSING boletos
cancelledthe rest: CANCELLED, EXPIRED and OVERDUE

Read a boleto

Use the id returned on issue:

curl https://api.intopays.com/v1/boletos/0193a1b2-7c4d-7e8f-9a0b-1c2d3e4f5a6b \
  -H "Authorization: Bearer $INTOPAYS_TOKEN"

The API answers 200 with the boleto: the fields sent on issue and the ones returned by the bank.

FieldUse
statusthe boleto's situation
digitableLinethe typeable line (linha digitável)
barcodebarcode
qrcodethe boleto's Pix copy-and-paste code (Pix is Brazil's instant payment system), at the banks that return it
integrationBankingCode"nosso número", the number assigned by the bank
referenceCodeyour number
credentialIdid of the credential that issued it; null on older boletos
createdAt, updatedAtissue and last change

Status

statusMeaning
OPENOpen, waiting for payment
PAIDPaid
PROCESSINGCancellation requested, waiting for the bank's confirmation
CANCELLEDWritten off at the bank
EXPIREDExpired at the bank
OVERDUEPast due

EXPIRED and OVERDUE are reported only by Inter. At the other banks, a past-due boleto stays OPEN until it is paid or written off.

The status changes when Intopays checks the boleto at the bank:

WhenWhat happens
OPEN or PROCESSING boletochecked at the bank once a day, up to 120 times
Read by idthe response carries the stored status and triggers a check at the bank right after; a different status shows on the next read

The list checks nothing at the bank. Every status change fires the boleto.update event on the organization's webhooks, registered under Integração → Webhooks (Integration → Webhooks).

Cancel

curl -X PATCH https://api.intopays.com/v1/boletos/0193a1b2-7c4d-7e8f-9a0b-1c2d3e4f5a6b/cancel \
  -H "Authorization: Bearer $INTOPAYS_TOKEN"

The request has no body. Intopays asks the bank to write off the boleto and answers 200 with the boleto in PROCESSING. The status becomes CANCELLED when the bank confirms the write-off, on the next check. Intopays checks each open boleto with the bank at most once an hour, and also when the bank sends a payment notice (Santander).

A PAID boleto cannot be cancelled: the answer is 400 with Boleto já pago: não pode ser cancelado. (already paid, cannot be cancelled). A boleto that is already CANCELLED comes back as it is, without calling the bank.

The request fires the boleto.delete event on the organization's webhooks. The bank's confirmation fires boleto.update.

Boleto page

Each boleto has a public page for the payer, with the typeable line, the barcode and the Imprimir Boleto (Print boleto) button:

https://intopays.com/payment/<id>/boleto

The page needs no sign-in: anyone with the link sees the boleto. Send the link only to the payer. In the dashboard, the same boleto is under Banking → Boletos, with the print and cancel actions.

Errors

StatusResponseFix
401missing or invalid token; on cancel, also an inactive subscriptionSee Authentication
403{ "status": false }The boleto does not exist or belongs to another organization. Check the id and the token
the bank's statuson cancel, the status and body returned by the bankThe bank refused the write-off. Check the boleto's situation at the bank
500Internal server errorThe cancellation failed before reaching the bank. Check that the credential that issued the boleto still exists

Missing something on this page? Contact support from the dashboard and we'll update the docs.