BR Integrations

How to Mock Open Finance Brasil APIs

Develop against the Open Finance standard (Brazilian Central Bank) — consent, accounts and transactions — without credentialing your app for real.

Why mock Open Finance instead of using the official sandbox

Open Finance Brasil is the Central Bank-regulated standard for sharing financial data between institutions, with the user's explicit consent. Integrating for real requires credentialing in the participant directory, mTLS certificates and a full OAuth 2.0 flow — a process that takes weeks, not something you want to wait for just to build your app's consent screen.

This guide shows the general endpoint pattern of Open Finance Brasil (public, documented at openfinancebrasil.org.br) — not any specific institution's API, since each participant implements the standard with its own URLs and credentialing.

1. Consent flow

// Mock Rule: POST /open-banking/consents/v2/consents → 201
{
  "data": {
    "consentId": "urn:examplebank:C1DD33123",
    "status": "AWAITING_AUTHORISATION",
    "statusUpdateDateTime": "{{now}}",
    "permissions": ["ACCOUNTS_READ", "ACCOUNTS_BALANCES_READ", "ACCOUNTS_TRANSACTIONS_READ"]
  }
}

2. Accounts and balances

// Mock Rule: GET /open-banking/accounts/v2/accounts → 200
{
  "data": [
    { "accountId": "{{uuid}}", "brandName": "Example Bank", "type": "CONTA_DEPOSITO_A_VISTA", "accountSubType": "INDIVIDUAL" }
  ]
}

3. Transactions

// Mock Rule: GET /open-banking/accounts/v2/accounts/:accountId/transactions → 200
{
  "data": [
    { "transactionId": "{{uuid}}", "amount": "{{faker.price}}", "transactionName": "{{faker.company}}", "type": "DEBITO" }
  ]
}

Combine with Faker BR to generate plausible CPF/CNPJ, names and amounts in account data, without using anyone's real data.

🔒
Transparency note: the payloads above follow the general structure published by Open Finance Brasil, but are illustrative — each participating institution has its own base URL, API version and field quirks. For real integration, always use the specific participant's official documentation and sandbox. If the general structure changed, let us know.
Ready to implement? Check the full technical documentation with API reference, code examples and detailed parameters.
View docs →