Guides
Extratos
Get the checking account statement in v1 and v2, with balance lines, paging and BB's date rules.
The Extratos API has a single resource: the checking account statement by branch (agência) and account (conta). BB keeps two live versions, v1 and v2, with the same path and the same scope, extrato-info. There is no balance endpoint: balances arrive as lines of the statement itself. There are no webhooks either.
In Mimicr, the statement is derived from the sandbox's movements: Pix received, refunds, settled boletos and batch payments show up as entries, with BB's history codes.
Hosts
| Version | BB (homologação) | Mimicr |
|---|---|---|
| v1 | https://api.hm.bb.com.br/extratos/v1 | https://bb.mimicr.dev/extratos/v1 |
| v2 | https://extratos.mtls.api.hm.bb.com.br/v2 (mTLS) | https://bb.mimicr.dev/extratos/v2 or https://extratos.bb.mimicr.dev/v2 |
The path after the base is the same: /conta-corrente/agencia/{agencia}/conta/{conta}. Mimicr does not require an mTLS certificate. BB plans to shut v1 down on 20/11/2026; prefer v2 for new integrations.
Get a token
Request a token with the extrato-info scope (see Authentication):
curl --request POST \ --url https://oauth.bb.mimicr.dev/oauth/token \ --header 'Authorization: Basic <base64(client_id:client_secret)>' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'grant_type=client_credentials' \ --data-urlencode 'scope=extrato-info'
Get the statement
Use your sandbox's branch and account (GET https://api.mimicr.dev/v1/bb shows account.agencia and account.conta), without check digit and without leading zeros:
curl --request GET \ --url 'https://bb.mimicr.dev/extratos/v2/conta-corrente/agencia/3301/conta/86319?gw-dev-app-key=<app-key>&dataInicioSolicitacao=19102026&dataFimSolicitacao=23102026' \ --header 'Authorization: Bearer <token>'
Response (abridged):
{
"numeroPaginaAtual": 1,
"quantidadeRegistroPaginaAtual": 18,
"numeroPaginaAnterior": 0,
"numeroPaginaProximo": 0,
"quantidadeTotalPagina": 1,
"quantidadeTotalRegistro": 18,
"listaLancamento": [
{
"indicadorTipoLancamento": "1",
"dataLancamento": 22092026,
"codigoHistorico": 0,
"codigoSubHistorico": 0,
"textoDescricaoSubHistorico": "Saldo Anterior",
"valorLancamento": 50000,
"indicadorSinalLancamento": "C",
"textoIdentificadorUnicoTransacao": ""
},
{
"indicadorTipoLancamento": "1",
"dataLancamento": 23102026,
"codigoAgenciaOrigem": 0,
"numeroLote": 9903,
"numeroDocumento": 230157509787753,
"codigoHistorico": 821,
"codigoSubHistorico": 25001,
"textoDescricaoSubHistorico": "Pix - Recebido",
"valorLancamento": 90,
"indicadorSinalLancamento": "C",
"textoInformacaoComplementar": "23/10 01:57 93492239293 VICTOR LOPES D",
"numeroCadastroPessoaFisicaCadastroNacPessoasJuridicasContrapartida": "93492239293",
"indicadorTipoPessoaContrapartida": "F",
"textoIdentificadorUnicoTransacao": "BB002202610236727509787753"
}
]
}Reference: Get a statement (v1) and Get a statement (v2).
v1 and v2
| Item | v1 | v2 |
|---|---|---|
| Entry text | textoDescricaoHistorico | textoDescricaoSubHistorico |
| Sub-history | none | codigoSubHistorico |
| Counterparty CPF/CNPJ | numeroCpfCnpjContrapartida (number) | numeroCadastroPessoaFisicaCadastroNacPessoasJuridicasContrapartida (text) |
| Counterparty account check digit | textoDvContaContrapartida | textoDigitoVerificadorContaContrapartida |
| ISPB, unique id, CNAB | none | numeroISPB, textoIdentificadorUnicoTransacao, codigoConfederacaoNacionalBancos |
| Page | up to 200 lines (default 200) | up to 120 lines (default 120) |
| Business errors | {"erros":[…]} | {"code","message","variaveisMonitoradas"} |
The v2 names follow BB's OpenAPI 2.0.1. The table in BB's documentation spells some fields differently; Mimicr emits the OpenAPI names.
Dates and period
| Rule | Error |
|---|---|
Dates as DDMMYYYY integers, without leading zero (1092026 is 09/01/2026) | 5746385 |
| Both dates or none; without dates, the last 30 days | 5746385 |
| End date up to today | 5738445 |
| Start date not after the end date | 5738481 |
| Period of up to 31 days, counted inclusively | 5738678 |
| Start date up to 5 years back | 6668872 |
All of them answer 400. An account with no entries in the period answers 404.
Balance lines
The statement carries balances as lines, which count in quantidadeTotalRegistro and in paging. Filter them out if you only want the entries.
codigoHistorico | Text | Where |
|---|---|---|
0 | Saldo Anterior | First line, dated the last day with movement before the period |
0 | Saldo do dia | After the last entry of each day with movement, except the last day |
999 | S A L D O | Closing balance of the period |
When the period reaches today, the statement ends with indicadorTipoLancamento SA (Saldo Atual, current balance) and SD (Saldo Disponível, available balance).
The amount in valorLancamento is always positive; the sign is in indicadorSinalLancamento (C or D).
Mimicr history codes
| Movement | Sign | codigoHistorico | codigoSubHistorico | Text |
|---|---|---|---|---|
| Pix received (cob, cobv or key) | C | 821 | 25001 | Pix - Recebido |
| Pix refund | D | 144 | 25000 | Pix - Enviado |
| Boleto settled by barcode | C | 624 | 5172 | Crédito Cobrança |
| Batch: Pix | D | 144 | 25000 | Pix - Enviado |
| Batch: credit to a BB account | D | 144 | 2862 | Transferência enviada |
| Batch: TED | D | 393 | 2863 | TED Fornecedor |
| Batch: boleto | D | 109 | 0 | Pagamento de Boleto |
| Batch: slips, GRU, DARF, GPS | D | 61 | 9396 | Pagamento de Impostos |
| Batch: returned payment | C | 821 or 976 | 8692 or 3045 | Pix - Devolvido or TED Devolvida |
The Pix received codes come from BB's official example; the others are Mimicr's choices from BB's history code table. A boleto paid by its Pix QR shows up as Pix - Recebido, not as a collection credit.
Unique id (v2)
textoIdentificadorUnicoTransacao has two forms:
BB001+ branch (4) + account (11) + date YYYYMMDD + origin + lote + sequence + document + history + sub-history, 64 characters, for entries of previous days.BB002+ date YYYYMMDD + online sequence (13), 26 characters, for same-day entries.
It is not the Pix EndToEndId. It is empty on balance lines. Reconcile Pix and boletos by amount, date, counterparty document and the complement text.
BB test accounts
BB's three test accounts answer when you send the x-br-com-bb-ipa-mciteste header with the right MCI: 26968930 (551/5087), 178961031 (1505/1348) and 704950857 (452/123873). Without the header they answer 403 6646500. In Mimicr they have no movements, so they answer 404. Use your sandbox's account to see entries.
Paging
Request pages with numeroPaginaSolicitacao (from 1) and keep the same quantidadeRegistroPaginaSolicitacao on every page. Follow numeroPaginaProximo until it is 0. A page past the last one answers 404. See Formats and paging.
Test it
Create movements to see new lines: pay a charge with the pix.pay_cob action, receive a Pix with pix.receive or settle a batch. Advance the sandbox clock to move entries to previous days and get BB001 ids. See Sandbox control.