Guides
Extratos

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

VersionBB (homologação)Mimicr
v1https://api.hm.bb.com.br/extratos/v1https://bb.mimicr.dev/extratos/v1
v2https://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):

bash
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:

bash
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):

json
{
  "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

Itemv1v2
Entry texttextoDescricaoHistoricotextoDescricaoSubHistorico
Sub-historynonecodigoSubHistorico
Counterparty CPF/CNPJnumeroCpfCnpjContrapartida (number)numeroCadastroPessoaFisicaCadastroNacPessoasJuridicasContrapartida (text)
Counterparty account check digittextoDvContaContrapartidatextoDigitoVerificadorContaContrapartida
ISPB, unique id, CNABnonenumeroISPB, textoIdentificadorUnicoTransacao, codigoConfederacaoNacionalBancos
Pageup 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

RuleError
Dates as DDMMYYYY integers, without leading zero (1092026 is 09/01/2026)5746385
Both dates or none; without dates, the last 30 days5746385
End date up to today5738445
Start date not after the end date5738481
Period of up to 31 days, counted inclusively5738678
Start date up to 5 years back6668872

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.

codigoHistoricoTextWhere
0Saldo AnteriorFirst line, dated the last day with movement before the period
0Saldo do diaAfter the last entry of each day with movement, except the last day
999S A L D OClosing 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

MovementSigncodigoHistoricocodigoSubHistoricoText
Pix received (cob, cobv or key)C82125001Pix - Recebido
Pix refundD14425000Pix - Enviado
Boleto settled by barcodeC6245172Crédito Cobrança
Batch: PixD14425000Pix - Enviado
Batch: credit to a BB accountD1442862Transferência enviada
Batch: TEDD3932863TED Fornecedor
Batch: boletoD1090Pagamento de Boleto
Batch: slips, GRU, DARF, GPSD619396Pagamento de Impostos
Batch: returned paymentC821 or 9768692 or 3045Pix - 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.