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
.pfxfile, 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.
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:
homologationto test with Banco do Brasil’s test accounts, orproductionfor 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 (
.pfxor.p12), uploaded exactly as issued. It must be the certificate registered in the developer portal. - Certificate password: the password of the
.pfxfile. - Accounts: the checking accounts to extract, one per item, written as
BRANCH/ACCOUNTwith digits only and without the check digits. For example, branch 1234-5 and account 56789-0 become1234/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.
.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.
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.
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.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.
Statement Entries
Statement Entries
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 daybranch_number/account_number- The account, without check digitsentry_date- Entry date (replication key)movement_date- Movement date, informed for entries posted with a retroactive date
amount- Amount in BRL, always positivesign- C for credit, D for debitsigned_amount- Amount with its direction: positive for credits, negative for debitshistory_code/history_description- Bank history code and descriptionsub_history_code/sub_history_description- Sub-history code and description, when sentcomplementary_info- Complementary informationdocument_number/batch_number/origin_branch_code- Document, originating system and branchunique_transaction_id- Unique transaction identifier, filled in by the bank from the next day onentry_type_indicator- Line type as sent by the bank (1 for posted)
counterparty_document- CPF or CNPJ of the counterpartycounterparty_person_type- F for individual, J for companycounterparty_bank_code/counterparty_ispb- Counterparty bank (COMPE code and ISPB)cnab_code- CNAB code (for example 240). Banco do Brasil still sends it emptycounterparty_branch_code/counterparty_account_number/counterparty_account_check_digit- Counterparty account
raw_payload- The line exactly as returned by the bank (JSON)
Daily Balances
Daily Balances
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 accountbalance_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 overdrawnbalance_source- Line used:period_final_balance,day_partial_balanceorprevious_balanceamount/sign- Balance as sent by the bank (always positive) and its directionhistory_code/history_description- 0 or 999, and the line’s descriptionraw_payload- The line used, exactly as returned by the bank (JSON)
Current Balances
Current Balances
One snapshot per account per run, taken from the balance lines of today’s statement. Incremental by
extracted_at.branch_number/account_number- The accountextracted_at- When Nekt read the balance (replication key)balance_date- Day of the statement the balance came fromcurrent_balance- Current balanceavailable_balance- Available balance, including available limitsavailable_limit/contracted_limit/used_limit- Overdraft limit available, contracted and in useautomatic_redemption_balance- Balance available through automatic investment redemptionextra_limit/provisioned_amount- Extra limit and provisioned amountperiod_final_balance- Final balance of today’s statement so far, when presentbalance_lines- The balance lines exactly as returned by the bank (JSON)
Pending Entries
Pending Entries
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 linebranch_number/account_number- The accountpending_status-future(scheduled),processingorblockedentry_date- Date the entry is expected or was registeredextracted_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.