API Reference
Register a boleto
/cobrancas/v2/boletoshttps://bb.mimicr.dev · provider: https://api.hm.bb.com.brRegisters a collection boleto, with or without a Pix QR Code (indicadorPix: "S"). One boleto per request. The response carries the nosso número (numero), the typeable line, the barcode and, with Pix, the qrCode.
The boleto starts open (codigoEstadoTituloCobranca 1, NORMAL) and can be paid right away. In Mimicr, the sandbox's and the homologação convênio (3128557), carteira 17 and variations 35 and 19 are accepted, and any CPF or CNPJ with valid check digits is accepted as payer.
Scope: cobrancas.boletos-requisicao.
Authorization
Bearer token in the Authorization: Bearer <token> header. See Authentication.
Query parameters
Your application's key (developer_application_key) in the Developers Portal. In Mimicr, the sandbox's (GET /v1/bb). Without it the gateway answers 403.
"<app-key>"Body
application/jsonCobrança convênio number (7 digits). Homologação: 3128557. In Mimicr, the sandbox's convênio is also accepted.
3128557Collection portfolio. Only carteira 17 registers via the API.
17Portfolio variation. Homologação: 35.
351 Simples, 4 Vinculada.
141Issue date, dd.mm.aaaa. Cannot be after today.
"23.10.2026"Due date, dd.mm.aaaa. Cannot be before the registration date.
"12.11.2026"Boleto amount in reais, greater than zero and greater than discounts + abatimento.
150Abatimento (reduction) in reais.
Days until protest: 0, 3 to 29, 35, 40 or 45.
Calendar days after the due date for credit-bureau listing.
10 SERASA, 11 QUOD.
S accepts payment after the due date up to numeroDiasLimiteRecebimento; N doesn't.
SNDays after the due date during which the boleto can still be paid; less than 360 (4882713). In Mimicr, without it the limit is 360 days.
A accepted, N not accepted.
AN"A"Kind of bill: 1 cheque, 2 duplicata mercantil, 3 duplicata mercantil por indicação, 4 duplicata de serviço, 5 duplicata de serviço por indicação, 6 duplicata rural, 7 letra de câmbio, 8 nota de crédito comercial, 9 nota de crédito à exportação, 10 nota de crédito industrial, 11 nota de crédito rural, 12 nota promissória, 13 nota promissória rural, 14 triplicata mercantil, 15 triplicata de serviço, 16 nota de seguro, 17 recibo, 18 fatura, 19 nota de débito, 20 apólice de seguro, 21 school fee, 22 consortium installment, 23 federal outstanding debt, 24 state outstanding debt, 25 municipal outstanding debt, 31 credit card, 32 boleto proposta, 33 boleto aporte, 99 other. Missing: 400 4012111 "Espécie não informada.". In Mimicr, a value outside this table also answers 4012111 (BB documents no code for an invalid kind).
29 values
12345678910111213141516171819202122232425313233992Free description of the kind.
"DM"S allows partial payment; N doesn't.
SNSeu número: up to 15 characters (A–Z, 0–9, -, ', space).
"12501"Beneficiary free field: up to 25 uppercase characters, no special characters or double spaces (4678420).
Nosso número: 000 + convênio (7) + control number (10). A repeated one answers 4874915. In Mimicr, when omitted, the bank numbers it.
"00031285570031443497"Message printed on the boleto (up to 165 characters, no line breaks).
First discount.
Show child attributes
Discount type: 0 none, 1 fixed amount until the date, 2 percentage until the date, 3 per day of early payment.
0123Discount deadline, dd.mm.aaaa. Required when tipo > 0 and must be before the due date.
"02.11.2026"Discount percentage (type 2).
Discount amount in reais (type 1).
5Second or third discount. It has no tipo: it inherits the first discount's type.
Show child attributes
Deadline, dd.mm.aaaa, after the previous discount's date.
Percentage (when the first discount is type 2).
Amount in reais (when the first discount is type 1).
Second or third discount. It has no tipo: it inherits the first discount's type.
Show child attributes
Deadline, dd.mm.aaaa, after the previous discount's date.
Percentage (when the first discount is type 2).
Amount in reais (when the first discount is type 1).
Late interest, computed on the original amount minus the abatimento.
Show child attributes
0 waive, 1 amount per day late, 2 monthly rate, 3 exempt.
01232Monthly rate in % (type 2).
1Amount per day late in reais (type 1).
Late fine.
Show child attributes
0 waive, 1 fixed amount, 2 percentage.
0122Date from which the fine applies, dd.mm.aaaa, after the due date.
"13.11.2026"Percentage (type 2).
2Amount in reais (type 1).
The boleto's payer.
Show child attributes
1 CPF, 2 CNPJ.
121CPF (11 digits) or CNPJ (14, alphanumeric allowed), with or without mask. A JSON number is also accepted. An invalid document answers 4500431 (CPF) or 4500947 (CNPJ).
"96050176876"Payer name (up to 60).
"VALERIO DE AGUIAR ZORZATO"Address (up to 60).
Postal code, no leading zeros.
74715715City (up to 30).
District (up to 30).
State, 2 letters.
"GO"Phone (up to 30).
E-mail to send the boleto to. An invalid e-mail does not fail registration: observacao says it was not sent.
Final beneficiary (sacador avalista).
Show child attributes
1 CPF, 2 CNPJ.
12CPF or CNPJ of the final beneficiary (sacador avalista).
Name (up to 30).
S registers the boleto with a dynamic Pix QR Code (hybrid boleto); any other value registers it without Pix. In Mimicr, the Pix Automático modes (A, B, C) are not simulated and behave as N.
SN"S"Responses
201Boleto registered.
Beneficiary (convênio owner) with its registered address.
Show child attributes
330186319The boleto's Pix QR Code. Empty ("" in each field) when the boleto has no Pix.
Show child attributes
Pix payload URL (location), without scheme.
"qrcodepix.bb.mimicr.dev/pix/v2/cobv/69bd55c0-bf68-4ed8-b0a0-fe4450b03ae7"txid of the boleto's Pix charge: BOLETO + nosso número without the 3 zeros + DATA + registration date (ddmmaaaa).
"BOLETO31285570031443497DATA23102026"Pix copy-and-paste code (EMV BR Code).
The boleto's nosso número (20 characters). Use it as {id} in the other operations.
"00031285570031443497"1735Client code (the convênio).
3128557Typeable line (47 digits, no dots).
"00190000090312855700031443497172516280000015000"Barcode (44 digits).
"00195162800000150000000003128557003144349717"Collection contract number.
BB page with the boleto's PDF copy.
Notice about the registration, e.g. boleto not e-mailed; empty when there is none.
400Invalid data: missing required field, convênio/carteira/variação not registered (4432632), dates, discounts, interest, fine, CPF/CNPJ (4500431, 4500947), invalid (4494380, 4023524) or repeated (4874915) nosso número, invalid JSON (999).
Show child attributes
Error message code (the API's error table).
"4874915"Message version.
"1"Error text.
"Nosso Número já incluído anteriormente."How to fix it; empty when BB gives no hint.
"Informar outro Nosso Número."BB's occurrence id (trace), not an HTTP code. N/A on generic errors.
"000000000000000000221327"401Missing, invalid or expired token.
401"Unauthorized""Bad credentials"Show child attributes
"Bad Credentials"403Missing or invalid application key (gateway shape), or a token without the operation's scope (Application key is not allowed to call this resource method).
Gateway
Gateway error description.
"A chave de aplicacao (AppKey) nao foi informada"How to solve it.
"403"Show child attributes
"SISTEMA""ERRO"Escopo
401"Unauthorized""Bad credentials"Show child attributes
"Bad Credentials"500Internal error.
Show child attributes
Error message code (the API's error table).
"4874915"Message version.
"1"Error text.
"Nosso Número já incluído anteriormente."How to fix it; empty when BB gives no hint.
"Informar outro Nosso Número."BB's occurrence id (trace), not an HTTP code. N/A on generic errors.
"000000000000000000221327"