Skip to main content
Banco do Brasil is one of Brazil’s largest banks. This connector uses Banco do Brasil’s Extratos API (version 2) to bring the statement of your company’s checking accounts to the Catalog: every posted entry with its counterparty, the daily balances, a snapshot of the current balance and limits on each run, and the entries that are not posted yet. It is meant for bank reconciliation and cash management.
The connector only reads data. It never creates, changes or pays anything in Banco do Brasil.

Prerequisites

Banco do Brasil gives API access to the company itself, so your team prepares the access in the Banco do Brasil developer portal before creating the source. The access is requested with the CPF of the company’s representative, technical lead or developer.
  • An application in the developer portal with the Extratos API (v2) enabled. The portal gives each application its credentials for the test (homologation) environment and, after approval, for production: Client ID, Client Secret and Application Key (developer_application_key).
  • The company’s A1 digital certificate (a .pfx file, usually the e-CNPJ, or a certificate issued only for this integration). Banco do Brasil requires it on every request (mutual TLS). Upload the same certificate to the application in the developer portal (Certificates tab), in each environment you use.
  • The adhesion term (termo de adesão) signed by a legal representative of the company registered at Banco do Brasil. It is required for production.
  • The checking accounts to extract: branch (agência) and account number, without the check digits.
Credentials, application key and certificate belong to one environment. Homologation credentials do not work in production and vice versa. When you move to production, update the source with the production credentials and select the production environment.

Configuring Banco do Brasil as a Source

In the Sources tab, click on the “Add source” button located on the top right of your screen. Then, select the Banco do Brasil option from the list of connectors. Click Next and you’ll be prompted to add your access.

1. Add account access

The following configurations are available:
  • Environment: homologation to test with Banco do Brasil’s test accounts, or production for your real accounts.
  • Client ID and Client Secret: the credentials of your application in the developer portal, for the selected environment.
  • Application Key: the application key (gw-dev-app-key) of your application, for the selected environment.
  • Certificate file (.pfx / .p12): the company’s A1 certificate file (.pfx or .p12), uploaded exactly as issued. It must be the certificate registered in the developer portal.
  • Certificate password: the password of the .pfx file.
  • Accounts: the checking accounts to extract, one per item, written as BRANCH/ACCOUNT with digits only and without the check digits. For example, branch 1234-5 and account 56789-0 become 1234/56789.
  • Start date: the first statement day to extract. Banco do Brasil provides up to five years of statement; an older date starts at the oldest day available.
  • Test client code (homologation only): in homologation, Banco do Brasil identifies its test account by a client code (MCI) sent with each request. Use the code of the test account you received from Banco do Brasil (or listed in its documentation). It is ignored in production.
  • Lookback days (advanced, default 3): how many days before the last day read each run reads again. It catches entries posted late or with a retroactive date, and fills in the transaction identifier that the bank only provides on the next day.
  • Include current day (advanced, default off): also load today’s entries into Statement Entries. Banco do Brasil may still change the current day’s entries overnight, which can leave a duplicated or outdated row for today, so by default each run loads closed days up to yesterday.
If you prefer to provide the certificate as text instead of uploading the .pfx file, use the advanced settings Client certificate (PEM) and Private key (PEM). They are used only when no .pfx file is uploaded. Once you’re done, click Next.

2. Select streams

Choose which data streams you want to sync. For faster extractions, select only the streams that are relevant to your analysis.
Tip: The stream can be found more easily by typing its name.
Select the streams and click Next.

3. Configure data streams

Customize how you want your data to appear in your catalog. Select the desired layer where the data will be placed, a folder to organize it inside the layer, a name for each table (which will effectively contain the fetched data) and the type of sync.
  • Layer: choose between the existing layers on your catalog. This is where you will find your new extracted tables as the extraction runs successfully.
  • Folder: a folder can be created inside the selected layer to group all tables being created from this new data source.
  • Table name: we suggest a name, but feel free to customize it. You have the option to add a prefix to all tables at once and make this process faster!
  • Sync Type: you can choose between INCREMENTAL and FULL_TABLE.
    • Incremental: every time the extraction happens, we’ll get only the new data, which is good if, for example, you want to keep every record ever fetched.
    • Full table: every time the extraction happens, we’ll get the current state of the data, which is good if, for example, you don’t want to have deleted data in your catalog.
Keep Current Balances as INCREMENTAL. It stores one balance snapshot per run, and a full table sync replaces all earlier snapshots with the latest one.
Once you are done configuring, click Next.

4. Configure data source

Describe your data source for easy identification within your organization, not exceeding 140 characters. To define your Trigger, consider how often you want data to be extracted from this source. A daily trigger is enough for reconciliation; run it more often if you follow the current balance during the day. Optionally, you can define some additional settings:
  • Configure Delta Log Retention and determine for how long we should store old states of this table as it gets updated. Read more about this resource here.
  • Determine when to execute an Additional Full Sync. This will complement the incremental data extractions, ensuring that your data is completely synchronized with your source every once in a while.
Once you are ready, click Next to finalize the setup.

5. Check your new source

You can view your new source on the Sources page. If needed, manually trigger the source extraction by clicking on the arrow button. Once executed, your data will appear in your Catalog.
For you to be able to see it on your Catalog, you need at least one successful source run.

Streams and Fields

Available streams

Each run reads the statement from a few days before the last day read (see Lookback days) up to yesterday, the last closed day, in Brasília time. Today’s entries appear on the next day’s run (or on the same day with Include current day). Banco do Brasil gives each statement line no identifier of its own, so Nekt creates entry_key from the line’s account, dates, origin branch, batch, document, history, type, sign and amount. Two lines identical in all of these on the same day (two equal fees, for example) are told apart by occurrence.
Posted entries of the checking-account statement. Incremental by entry_date.Identification:
  • entry_key - Identifier created by Nekt for the line (primary key)
  • occurrence - Position of the line among identical lines of the same day
  • branch_number / account_number - The account, without check digits
  • entry_date - Entry date (replication key)
  • movement_date - Movement date, informed for entries posted with a retroactive date
Entry:
  • amount - Amount in BRL, always positive
  • sign - C for credit, D for debit
  • signed_amount - Amount with its direction: positive for credits, negative for debits
  • history_code / history_description - Bank history code and description
  • sub_history_code / sub_history_description - Sub-history code and description, when sent
  • complementary_info - Complementary information
  • document_number / batch_number / origin_branch_code - Document, originating system and branch
  • unique_transaction_id - Unique transaction identifier, filled in by the bank from the next day on
  • entry_type_indicator - Line type as sent by the bank (1 for posted)
Counterparty:
  • counterparty_document - CPF or CNPJ of the counterparty
  • counterparty_person_type - F for individual, J for company
  • counterparty_bank_code / counterparty_ispb - Counterparty bank (COMPE code and ISPB)
  • cnab_code - CNAB code (for example 240). Banco do Brasil still sends it empty
  • counterparty_branch_code / counterparty_account_number / counterparty_account_check_digit - Counterparty account
Raw data:
  • raw_payload - The line exactly as returned by the bank (JSON)
One row per account and closed day with the balance at the end of that day. Incremental by balance_date; today is not included because the day is not closed yet (see Current Balances).The statement brings several balance lines: the previous balance (“Saldo Anterior”) and partial balances of each day (history 0), and the final balance of the period read (history 999). When more than one gives the balance of the same day, Nekt keeps, in this order: the final balance of a period ending that day, then the partial balance of that day, then the previous balance of the period starting the next day.
  • branch_number / account_number - The account
  • balance_date - Day the balance refers to (replication key)
  • end_of_day_balance - Balance at the end of the day in BRL, negative when the account is overdrawn
  • balance_source - Line used: period_final_balance, day_partial_balance or previous_balance
  • amount / sign - Balance as sent by the bank (always positive) and its direction
  • history_code / history_description - 0 or 999, and the line’s description
  • raw_payload - The line used, exactly as returned by the bank (JSON)
One snapshot per account per run, taken from the balance lines of today’s statement. Incremental by extracted_at.
  • branch_number / account_number - The account
  • extracted_at - When Nekt read the balance (replication key)
  • balance_date - Day of the statement the balance came from
  • current_balance - Current balance
  • available_balance - Available balance, including available limits
  • available_limit / contracted_limit / used_limit - Overdraft limit available, contracted and in use
  • automatic_redemption_balance - Balance available through automatic investment redemption
  • extra_limit / provisioned_amount - Extra limit and provisioned amount
  • period_final_balance - Final balance of today’s statement so far, when present
  • balance_lines - The balance lines exactly as returned by the bank (JSON)
Entries that are not posted yet. The table is replaced on every run, so it always shows what is pending now.
  • entry_key / occurrence - Identifier created by Nekt for the line
  • branch_number / account_number - The account
  • pending_status - future (scheduled), processing or blocked
  • entry_date - Date the entry is expected or was registered
  • extracted_at - When Nekt read the pending entries
  • Plus the same entry and counterparty fields as Statement Entries

Limitations

  • Proofs of payment (comprovantes) are not part of the Extratos API. Banco do Brasil provides them only for payments made through its Payments API (or in the return file of payments sent by file).
  • Automatic statement files (CNAB 240 via VAN / BB-Sia) are a separate file-transfer service and are not covered by this connector.
  • The bank answers at most 31 days per request and no future dates; the connector splits longer periods on its own.
  • If an account had no movement in the period read, the bank returns no lines and the run log shows a warning for that account. Check the branch and account numbers if you expected movement.