API Reference
Cobranças · Boleto with Pix

Generate the boleto's Pix

POST/cobrancas/v2/boletos/{id}/gerar-pix
Base URL: https://bb.mimicr.dev · provider: https://api.hm.bb.com.br

Links a dynamic Pix QR Code to an open boleto that never had a Pix. It cannot be linked again after a cancellation. The QR is a charge with due date (cobv) of the API Pix with txid BOLETO…DATA….

Scope: cobrancas.boletos-requisicao.

Authorization

Bearer token in the Authorization: Bearer <token> header. See Authentication.

Path parameters

idstringrequired

The boleto's nosso número: 20 digits, 000 + convênio (7) + control number (10). It is the numero returned on registration.

Example: "00031285570031443497"

Query parameters

gw-dev-app-keystringrequired

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.

Example: "<app-key>"

Body

application/json
numeroConveniointegerrequired

The boleto's convênio.

Example: 3128557

Responses

200Pix linked.
pixobject
Show child attributes
chavestring

The receiver's Pix key.

qrCodeobject

The boleto's Pix QR Code. Empty ("" in each field) when the boleto has no Pix.

Show child attributes
urlstring

Pix payload URL (location), without scheme.

Example: "qrcodepix.bb.mimicr.dev/pix/v2/cobv/69bd55c0-bf68-4ed8-b0a0-fe4450b03ae7"
txIdstring

txid of the boleto's Pix charge: BOLETO + nosso número without the 3 zeros + DATA + registration date (ddmmaaaa).

Example: "BOLETO31285570031443497DATA23102026"
emvstring

Pix copy-and-paste code (EMV BR Code).

400Boleto that already had a Pix (4010074) or is not open (4007954).
errosobject[]required
Show child attributes
codigostringrequired

Error message code (the API's error table).

Example: "4874915"
versaostringrequired

Message version.

Example: "1"
mensagemstringrequired

Error text.

Example: "Nosso Número já incluído anteriormente."
providenciastring

How to fix it; empty when BB gives no hint.

Example: "Informar outro Nosso Número."
ocorrenciastringrequired

BB's occurrence id (trace), not an HTTP code. N/A on generic errors.

Example: "000000000000000000221327"
401Missing, invalid or expired token.
statusCodeinteger
Example: 401
errorstring
Example: "Unauthorized"
messagestring
Example: "Bad credentials"
attributesobject
Show child attributes
errorstring
Example: "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
detailstring

Gateway error description.

Example: "A chave de aplicacao (AppKey) nao foi informada"
userHelpstring

How to solve it.

errorCodestring
Example: "403"
bbMsgobject
Show child attributes
categoriastring
Example: "SISTEMA"
tipostring
Example: "ERRO"
Escopo
statusCodeinteger
Example: 401
errorstring
Example: "Unauthorized"
messagestring
Example: "Bad credentials"
attributesobject
Show child attributes
errorstring
Example: "Bad Credentials"
404Boleto not found (4010673).
errosobject[]required
Show child attributes
codigostringrequired

Error message code (the API's error table).

Example: "4874915"
versaostringrequired

Message version.

Example: "1"
mensagemstringrequired

Error text.

Example: "Nosso Número já incluído anteriormente."
providenciastring

How to fix it; empty when BB gives no hint.

Example: "Informar outro Nosso Número."
ocorrenciastringrequired

BB's occurrence id (trace), not an HTTP code. N/A on generic errors.

Example: "000000000000000000221327"