API Reference
Cobranças · Boleto with Pix

Cancel the boleto's Pix

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

Cancels the Pix linked to an open boleto. The boleto can still be paid by barcode. The response carries the cancelled QR's 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 cancelled.
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).

400The boleto has no active Pix or is not open (4010074).
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"