API Reference
Lote · Taxes without barcode

Create a DARF batch

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

Creates a payment request for DARF normal (preto), without barcode. The request number goes in the id field. A DARF with several revenue codes is sent as separate entries. DARF sends no webhook.

OAuth scope: pagamentos-lote.pagamentos-guias-sem-codigo-barras-requisicao.

In Mimicr, the response is always 201 (BB's swagger declares 200 for most POSTs and 201 for boletos; clients such as ACBr expect 201). About 2 seconds later the bank validates the batch: with consistent entries the request moves to state 4 (waiting for release) and the entries to PENDENTE; inconsistent entries become REJEITADO. With autoRelease on in the homologação rules, the batch is released as it arrives.

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
idinteger<int32>required

Request number (on this route the field is called id), from 1 to 9999999, single use per contract.

Example: 1215
codigoContratointeger<int64>

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

Example: 731030
numeroAgenciaDebitointeger<int32>required

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

Example: 1607
numeroContaCorrenteDebitointeger<int64>required

Debit current account, without the check digit.

Example: 99738672
digitoVerificadorContaCorrenteDebitostringrequired

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

Example: "X"
lancamentosobject[]required

DARFs of the request (up to 100).

Show child attributes
dataPagamentointeger<int32>required

Payment date, ddmmaaaa as an integer. Can't be before today (error 53); scheduling up to 180 days ahead.

Example: 23102026
valorPagamentonumber<float>required

Payment amount in reais.

Example: 128.01
numeroDocumentoDebitostring

Debit document number (text in the request, integer in the response).

codigoSeuDocumentostring

Client's own reference (seu documento).

textoDescricaoPagamentostring

Free-text payment description (up to 40 characters).

codigoReceitaTributointeger<int32>required

Tax revenue code.

Example: 6106
codigoTipoContribuinteinteger<int32>required

Taxpayer type: 1 CNPJ, 2 CPF.

Example: 1
numeroIdentificacaoContribuintestringrequired

Taxpayer's CPF or CNPJ.

Example: "75224842000126"
codigoIdentificadorTributostringrequired

Tax identifier: 16 other revenues, 18 Simples.

Example: "18"
dataApuracaointeger<int32>

Assessment period, ddmmaaaa.

Example: 30112021
numeroReferenciainteger<int64>

Reference number; required for the revenue codes that demand it (error 67).

Example: 1
valorPrincipalnumber<float>required

Principal amount.

Example: 128.01
valorMultanumber<float>

Fine amount.

valorJuroEncargonumber<float>

Interest and charges amount.

dataVencimentointeger<int32>required

Due date, ddmmaaaa.

Example: 31122021

Responses

201Request received, with the validation result of each DARF.
idinteger<int32>

Request number.

Example: 1215
codigoEstadointeger

Request state: 1 all entries with consistent data; 2 at least one entry with inconsistent data; 3 all entries with inconsistent data; 4 waiting for the client (payment not authorized yet); 5 being processed by the Bank; 6 processed; 7 rejected; 8 preparing an unreleased batch; 9 released via API; 10 preparing a released batch. States 6 and 7 are final.

12345678910
Example: 1
quantidadeLancamentosinteger<int32>

Number of entries in the request.

valorLancamentosnumber<float>

Total amount of the request's entries.

quantidadeLancamentosValidosinteger<int32>

Number of valid (accepted) entries.

valorLancamentosValidosnumber<float>

Total amount of the valid entries.

lancamentosobject[]

DARFs, in the order sent.

Show child attributes
codigoIdentificadorPagamentointeger<int64>

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

nomeConvenentestring

Biller's name (returned by the Bank).

Example: "RECEITA FEDERAL"
dataPagamentointeger<int32>

Payment date, ddmmaaaa as an integer. Can't be before today (error 53); scheduling up to 180 days ahead.

Example: 23102026
valorPagamentonumber<float>

Payment amount in reais.

Example: 128.01
numeroDocumentoDebitointeger<int64>

Debit document number (shown on the debited account's statement).

codigoSeuDocumentostring

Client's own reference (seu documento).

textoDescricaoPagamentostring

Free-text payment description (up to 40 characters).

codigoReceitaTributointeger<int32>

Tax revenue code.

Example: 6106
codigoTipoContribuinteinteger<int32>

Taxpayer type: 1 CNPJ, 2 CPF.

Example: 1
numeroIdentificacaoContribuintestring

Taxpayer's CPF or CNPJ.

Example: "75224842000126"
codigoIdentificadorTributostring

Tax identifier: 16 other revenues, 18 Simples.

Example: "18"
dataApuracaointeger<int32>

Assessment period, ddmmaaaa.

Example: 30112021
numeroReferenciainteger<int64>

Reference number; required for the revenue codes that demand it (error 67).

Example: 1
valorPrincipalnumber<float>

Principal amount.

Example: 128.01
valorMultanumber<float>

Fine amount.

valorJuroEncargonumber<float>

Interest and charges amount.

dataVencimentointeger<int32>

Due date, ddmmaaaa.

Example: 31122021
indicadorMovimentoAceitostring

S when the entry was accepted; N when it has inconsistent data (see the error codes).

SN
Example: "S"
errosinteger[]

Error codes of the entry (up to 10), from the API's error table. Empty when accepted.

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"
422Request number already used for this contract (code 4).
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"
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"