API Reference
Lote · Requests and release

Cancel payments

POST/pagamentos-lote/v1/cancelar-pagamentos
Base URL: https://bb.mimicr.dev · provider: https://api.hm.bb.com.br

Cancels entries by id. An entry can only be cancelled until the batch that contains it is released; after that, cancellation can't be guaranteed. The result comes per payment, always with HTTP 200.

OAuth scope: pagamentos-lote.cancelar-requisicao.

In Mimicr, payments already PAGO, REJEITADO, DEVOLVIDO, CANCELADO, BLOQUEADO or DEBITADO come back with indicadorCancelamento N.

Authorization

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

Query parameters

gw-dev-app-keystringrequired

Application key (developer_application_key) from the BB Developers Portal. Required on every call.

Body

application/json
numeroContratoPagamentointeger<int32>

Payment contract (convênio) number. Optional: when not given, the contract linked to the client is used. Homologação: 731030.

Example: 731030
agenciaDebitointeger<int32>

Debit agência, 4 digits without the check digit.

Example: 1607
contaCorrenteDebitointeger<int64>

Debit current account, without the check digit.

Example: 99738672
digitoVerificadorContaCorrentestring

Check digit of the debit account (1 character; may be X).

Example: "X"
listaPagamentosobject[]required

Payments to cancel (up to 400).

Show child attributes
codigoPagamentostringrequired

Payment id (17 digits), sent as a string.

Example: "90001210731030001"

Responses

200Success.
pagamentosobject[]

Result of each payment.

Show child attributes
codigoPagamentointeger<int64>

Payment id generated by BB: a 17-digit integer (from 90000000000000001 to 99999999999999999). Read it as int64 or string, never as a double.

indicadorCancelamentostring

S when cancelled, N when not.

SN
Example: "S"
estadoPagamentostring

Payment state after the request.

Example: "CANCELADO"
estadoCancelamentostring

Description of the result.

Example: "Cancelamento efetuado com sucesso."
400Invalid request (required field, date, debit account or contract), in the erros envelope.
errosobject[]required

List of errors.

Show child attributes
codigostring

Error code.

Example: "2"
versaostring

Message version.

Example: "1"
mensagemstring

Error description.

Example: "Requisição 9999999 não encontrada para este contrato."
ocorrenciastring

Occurrence id (32 hex characters), for BB support.

Example: "ad7661e506e077d533d3559c72a4ff34"
403Refused by the gateway, as plain text: Authentication parameters missing (no gw-dev-app-key) or Authentication failed (invalid app key, or token missing, expired or without the operation's scope).
string
Authentication parameters missingAuthentication failed
Example: "Authentication failed"
500System error.
errosobject[]required

List of errors.

Show child attributes
codigostring

Error code.

Example: "2"
versaostring

Message version.

Example: "1"
mensagemstring

Error description.

Example: "Requisição 9999999 não encontrada para este contrato."
ocorrenciastring

Occurrence id (32 hex characters), for BB support.

Example: "ad7661e506e077d533d3559c72a4ff34"