Belvo API Docs (1.216.0)

Introduction

Reach new audiences and convert more users by easily and safely connecting to their financial data, understanding their behavior and enabling instant payments with open finance. Through our API, you can access:

Available Information and Payment Methods

Belvo is an open banking API for Latin America that allows companies to access banking and fiscal information in a secure as well as agile way.

Through our API, you can access:

  • Banking Information in Brazil
  • Employment Information in Brazil
  • Employment Information in Mexico
  • Fiscal Information in Mexico
  • Fiscal Information in Chile

You can also use our API to make payments in:

  • Brazil
  • Mexico

Data Dictionaries

If you woud like the response documentation in Excel or CSV form, please download them from our public GitHub Reposiitory: Belvo Open Finance Data Dictionaries.

Our EXCEL and CSV files are additionally localized into Spanish and Portuguese (Brazil).

Environments

We currently offer two environments: sandbox and production.

Sandbox

Available for:

  • 🟢 Aggregation and Enrichment
  • ⚪️ Payment Initiation

Use our Sandbox environment to build your integration. We offer dummy data that mimics that of real-world use cases, which means you can test out all the endpoints, use the widget, and implement webhooks - just as you would with real-world data!

All you need to get started with the Sandbox environment is to get your API keys. We really recommend that you start creating your integration in this environment.

Production

Available for:

  • 🟢 Aggregation and Enrichment
  • 🟢 Payment Initiation

After you have tested your integration in the Sandbox environment and are ready to go live, you'll need to request access to our Production environment. After you request access, our Sales Team will get in contact with you to schedule a meeting just to ensure your needs are met, and then you'll just need to go through a certification process with one of our engineers to make sure that your integration is running optimally. To prepare for the certification meeting, just follow our Integration checklist.

Once your integration is certified, all you'll need to do is:

  • Request Production API keys (and change your Sandbox API keys in the code to these new ones).
  • Change the base URL that you make requests to from sandbox.belvo.com to api.belvo.com.
  • If you're using webhooks, make sure to set a Production URL for your webhooks.

Response codes

We use the following HTTP status code in the response depending on the success or failure:

Status CodeDescription
200Success - The content is available in the response body.
201Success - The content was created successfully on Belvo.
204Success - No content to return.
400Bad Request Error - Request returned an error, detail in the content.
401Unauthorized - The Belvo credentials provided are not valid.
404Not Found - The resource you try to access cannot be found.
405Method Not Allowed - The HTTP method you are using is not accepted for this resource.
408Request Timeout - The request timed out and was terminated by the server.
428MFA Token Required - MFA token was required by the institution to connect.
500Internal Server Error - The detail of the error is available in the response body.

Error handling

Belvo API errors are returned in JSON format. For example, an error might look like this:

[
    {
      "request_id": "a6e1c493d7a29d91aed4338e6fcf077d",
      "message": "This field is required.",
      "code": "required",
      "field": "link"
    }
]

Typically, an error response will have the following parameters:

  • request_id: a unique ID for the request, you should share it with the Belvo support team for investigations.
  • message: human-readable description of the error.
  • code: a unique code for the error. Check the table below to see how to handle each error code.
  • field (optional): The specific field in the request body that has an issue.

Request identifier

When you need help with a specific error, include the request identifier (request_id) in your message to the Belvo support team. This will speed up investigations and get you back up and running in no time at all.

Error codes and troubleshooting

For a full list of errors and how to troubleshoot them, please see our dedicated Error Handling article.

Retry policy

50x errors

Implement an automated exponential backoff of up to five retries. We recommend using a base interval of three seconds with a factor of two. For example, the first retry should be after three seconds, the second retry after six seconds (2 * 3), the third retry after 12 seconds (2 * 6), the fourth retry after 24 seconds (2 * 12), and the fifth retry after 48 seconds (2 * 24).

40x errors

You should not retry making requests if you receive a 40x response, as this is a client error.

The only exception is the “Too Many Sessions” error, as it means that your end-user is accessing the account from another browser at the same time. In this case, please implement the same retry policy as with 50x errors.

Deprecated fields

In our schema, you may see that a field has been marked as deprecated. This means that this field is no longer maintained by the Belvo team. You may still receive data for this field depending on the institution, however, you should not rely on this field.

OpenAPI: required and nullable fields

In our API specification, you'll see that some response parameters will have a required annotation. According to the OpenAPI specification, when a response parameter is marked as required, this means that the response key must be returned. However, the value of that response parameter can be null.

📘 Info

In short, any response parameter marked as required will be returned by our API, but the value can be set to null.

Download OpenAPI description
Languages
Servers
Mock server
https://developers.belvo.com/_mock/apis/belvoopenapispec/
Sandbox
https://sandbox.belvo.com/

Institutions

An institution is an entity that Belvo can access information from. It can be a:

  • bank institution, such as Banamex retail banking or HSBC business banking.
  • fiscal institution, such as the Servicio de Administración Tributaria (SAT) in Mexico.

You can see a complete list of institutions by either consulting our Institutions article or making a List request to this endpoint.

Operations

Widget Access Token

Operations

Generate a widget access token

Request

Generate a widget access token for the OFDA or Banking Aggregation widget.

Bodyapplication/jsonrequired
One of:
idstringrequired

Your Belvo secretId.

passwordstringrequired

Your Belvo secretPassword.

scopesstringrequired

The scopes parameter contains a list of permissions that allow your to create a link for the user. This is a required parameter and must be sent exactly as shown.

Example: "read_institutions,write_links,read_consents,write_consents,write_consent_callback,delete_consents"
stale_instring^\d{1,3}d$required

Indicates how long any user-derived data should be stored in Belvo's database for the link (both single and recurrent). For example, if you send through 90d, Belvo will remove any data from its database relating to the user after 90 days. For more information, check out the stale_in section of our Data retention controls article.

📘 Info

Belvo will only remove data for links that have not been updated in the period you provide in stale_in. Belvo will only remove data for links that have not been updated in the period you provide in stale_in.

By default Belvo stores user data for 365 days, unless the link is deleted.

Example: "42d"
fetch_resourcesArray of stringsrequired

An array of resources that you would like to receive a historical update for.

For banking institutions, you can select the following resources:

  • ACCOUNTS
  • OWNERS
  • TRANSACTIONS
  • BILLS (only for Brazil OFDA institutions)
  • INCOMES
  • RECURRING_EXPENSES
  • RISK_INSIGHTS
Items Enum"ACCOUNTS""TRANSACTIONS""OWNERS""BILLS"
Example: ["ACCOUNTS","TRANSACTIONS","OWNERS","BILLS"]
widgetobjectrequired

The widget object contains additional information about how to set up the widget, including custom branding, your terms and conditions, callback URLs, and information about the user you want to extract data for.

purposestringrequired

In the purpose parameter, you can customize the messaging that is displayed to your user regarding for what use case you are requesting their data For more information, check out the purpose section in our Hosted Widget (OFDA) guide.

Example: "Soluções financeiras personalizadas oferecidas por meio de recomendações sob medida, visando melhores ofertas de produtos financeiros e de crédito."
openfinance_featurestringrequired

The openfinance_feature parameter indicates that the end user will go through the OFDA flow. It must be set to consent_link_creation

Example: "consent_link_creation"
callback_urlsobjectrequired

In the callback_urls object, you must add links to where your user should be redirected to in the following cases:

  • success (your user successfully connected their accounts)
  • exit (your user exited the widget before they completed the process)
  • event (an error occurred during the connection process)

For more information, check out the callback_urls section in our Hosted Widget (OFDA) guide.

📘 Callback Events

Belvo will also send additional event information depending on the event. For more information, please make sure to check out the Handling callback events section of the Hosted Widget (OFDA) guide.

successstringrequired

The URL your user is redirected to when they successfully connects their account.

Example: "your_deeplink_here://success"
exitstringrequired

The URL your user is redirected to when they exit the process before connecting their account.

Example: "your_deeplink_here://exit"
eventstringrequired

The URL your user is redirected to when they encounter an error while connecting their account.

Example: "your_deeplink_here://error"
brandingobjectrequired

In the branding object, you must add your:

You can also optionally add a custom background color for when the widget opens, as well as disable Belvo's messaging regarding how many accounts have been connected.

For more information about the branding and customization options of the widget, check out our dedicated guide.

company_iconstring(uri)required

You can add your company icon to the widget to make it more aligned with your brand. For more information, see the company_icon section of our Branding and customization (OFDA) guide.

Example: "https://mysite.com/icon.svg"
company_logostring(uri)required

You can add your company logo to the widget to make it more aligned with your brand. For more information, see the company_icon section of our Branding and customization (OFDA) guide.

Example: "https://mysite.com/logo.svg"
company_namestringrequired

You can add your company name to be displayed when the widget first starts. By default, it'll just display "Link your account". When you add your company name, the message will follow the format "[company_name] uses Belvo to connect your account". For more information, see the company_name section of our Branding and customization (OFDA) guide.

Example: "ACME"
company_terms_urlstring(uri)required

You can add a link to your privacy policy (or terms and conditions) on the initial screen of the widget that, when clicked, will redirect your users to the linked webpage. This helps your users better understand what your use case is regarding the data you are requesting. For more information, see the company_terms_url section of our Branding and customization (OFDA) guide.

Example: "https://belvo.com/terms-service/"
overlay_background_colorstring

You can add a custom overlay color for when the widget loads in your desktop application. For more information, see the overlay_background_color section of our Branding and customization (OFDA) guide.

Example: "#F0F2F4"
social_proofboolean

You can choose to hide the "Mais de 5 milhões de usuários já conectaram com segurança suas contas." message that appears when your user selects their institution in the widget. For more information, see the social_proof section of our Branding and customization (OFDA) guide.

Example: true
themeArray of objects

You can optionally add your brand colors to the widget using the theme parameter.

For more information regarding where these colors will appear in the widget, check out the dedicated Add custom colors to the widget section of our Branding guide.

consentobjectrequired

The consent object is unique to the OFDA widget and must be sent through.

terms_and_conditions_urlstring(uri)required

In the terms_and_conditions_url parameter, you must provide a link to your company's terms and conditions.

Example: "https://www.your_terms_and_conditions.com"
identification_infoArray of objects[ 1 .. 2 ] itemsrequired

In the identification_info array, you need to provide the identification information of the user that you want to retrieve information for. The information that you provide here must match the information that the regulated institution has for the user (for example, for businesses, the CPF and name must be for a user with access to the business account).

  • For individuals, you just need to provide the CPF and name.
  • For businesses, you need to provide both the CPF and CNPJ information.

For more information, check out the identification_info section of our Hosted Widget (OFDA) guide.

typestringrequired

The identifier type. Can be either CPF or CNPJ.

Example: "CPF"
numberstringrequired

The CPF or CNPJ number of the individual or company associated with the identification.

Example: 76109277673
namestringrequired

Name of the individual or company associated with the identification.

Example: "Ralph Bragg"
curl -i -X POST \
  -u <username>:<password> \
  https://developers.belvo.com/_mock/apis/belvoopenapispec/api/token/ \
  -H 'Content-Type: application/json' \
  -d '{
    "id": "string",
    "password": "string",
    "scopes": "read_institutions,write_links,read_consents,write_consents,write_consent_callback,delete_consents",
    "stale_in": "42d",
    "fetch_resources": [
      "ACCOUNTS",
      "TRANSACTIONS",
      "OWNERS",
      "BILLS"
    ],
    "widget": {
      "purpose": "Soluções financeiras personalizadas oferecidas por meio de recomendações sob medida, visando melhores ofertas de produtos financeiros e de crédito.",
      "openfinance_feature": "consent_link_creation",
      "callback_urls": {
        "success": "your_deeplink_here://success",
        "exit": "your_deeplink_here://exit",
        "event": "your_deeplink_here://error"
      },
      "branding": {
        "company_icon": "https://mysite.com/icon.svg",
        "company_logo": "https://mysite.com/logo.svg",
        "company_name": "ACME",
        "company_terms_url": "https://belvo.com/terms-service/",
        "overlay_background_color": "#F0F2F4",
        "social_proof": true
      },
      "theme": [
        {
          "css_key": "--color-primary-base",
          "value": "#907AD6"
        }
      ],
      "consent": {
        "terms_and_conditions_url": "https://www.your_terms_and_conditions.com",
        "identification_info": [
          {
            "type": "CPF",
            "number": 76109277673,
            "name": "Ralph Bragg"
          }
        ]
      }
    }
  }'

Responses

Successful operation

Bodyapplication/json
accessstring

The access token to be used to authenticate the widget.

Example: "eyJhbGciOiJIUzUxM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5UUyJdLCJpc3MiOiJzYW5kYm94LmJlbHZvLmNvbSJ9.DaQ8xVTEjA4BD-0SbBCQDylO3NrjhsHiWXTaoPdKWRucS2E0jxNUHC5lwrejrz73-GytgcXTeiI1fhZBYW719A", "refresh": "eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsImV4cCI6MjM0OTQzODk5NSwiaWF0IjoxNzI3MzU4OTk1LCJqdGkiOiI2YmUyMGFmNTcxZDU0NjQzYjA0Y2U3YTVhNjI5ZDRiMSIsInVzZXJfaWQiOiI2ZTliZTg4NC00NzgxLTQxNDMtYjY3My1hY2EwMjQ3NWVlOGMiLCJvcmdhbml6YXRpb25fbmFtZSI6IkRvbWluaWsgQ2hvbGV3c2tpJ3MgdGVhbSIsIm9yZ2FuaXphdGlvbl9pZCI6IjZlOWJlODg0LTQ3ODEtNDE0My1iNjczLWFjYTAyNDc1ZWU4YyIsInNjb3BlcyI6WyJyZWFkX2luc3RpdHV0aW9ucyIsIndyaXRlX2xpbmtzIl0sImVudmlyb25tZW50Ijoic2FuZGJveCIsImFwaV91cmwiOiJzYW5kYm94LmJlbHZvLmNvbSIsImNyZWRlbnRpYWxzX3N0b3JhZ2UiOiIzMGQiLCJzdGFsZV9pbiI6IjM2NWQiLCJmZXRjaF9yZXNvdXJjZXMiOlsiT1dORVJTIiwiRU1QTE9ZTUVOVFMiXSwiaXNzIjoic2FuZGJveC5iZWx2by5jb20ifQ.T-tnX2BwAjQI0MaYCO686bZD6H7EMIgi_CbOWtHDexGIiTKLer0d7RJGisXJqM6oA_L4y_A_774LEj8NNb7YXQ" }

Consents

Operations

Owners

An owner represents the person who has access to a Link and is the owner of all the accounts inside the Link.

You can use this endpoint in order to get useful information about your client, such as:

  • their full name
  • key contact information
  • information about the ID document they used when opening the account
Operations

Accounts

An account is the representation of a bank account inside a financial institution. A user can have one or more accounts in an institution.

For example, one user (or link) can have a checking account, several credit cards, and a loan account.

Querying for a user's account information is useful as you can get information regarding:

  • what types of accounts the user has.
  • the balance for each account (savings, checking, credit card, loan, and so on).
  • detailed information regarding their credit card spending.
  • the current situation of any loans they may have.
Operations

Balances

Operations

Transactions

A transaction contains the detailed information of each movement inside an account. For example, a purchase at a store or a restaurant.

Operations

Bills

A bill refers to the credit card bill a user receives for given account.

Note: Only available for OFDA.

Operations

Investments Brazil

Operations

Investment Transactions Brazil

Operations

Employments Brazil

Our employments resource for Brazil lets you get a comprehensive view of your user's current employment history and salary information.

For each user, we return the:

  • work history (including occupations and employer data)
  • historical and current salary information (per employer)

At the moment, the employments resource is available for:

  • 🇧🇷 Brazil (INSS)
Operations

Employment Records Mexico

Our employment records resource for Mexico lets you get a comprehensive view of your user’s current social security contributions and employment history.

With Belvo's employment records resource for Mexico, you can access information about your user's current social security contributions and employment history. For the each user, we return the:

  • personal data
  • work history
  • historical and current daily base salary
  • and more!

At the moment, the employment records resource is available for:

  • 🇲🇽 Mexico (IMSS)
  • 🇲🇽 Mexico (ISSSTE)
Operations

Invoices

Operations

Tax compliance status

Operations

Tax returns

Operations

Tax retentions

Operations

Tax status

Operations

Financial Statements

Operations

Invoices Chile

Operations

Tax Status Chile

Operations

Debt Reports Chile

Operations

Incomes

Use the Incomes endpoint to gather insights on an account's income sources for the past 365 days. The endpoint is particularly useful when you want to verify a person's income.

📘 Info

The incomes resource is only available for Checking and Savings accounts associated with banking links.

Operations

Recurring Expenses

Belvo's Recurring Expenses API allows you to identify a user's regular payments for subscription services, such as Netflix or gym memberships, as well as utility payments, such as electricity or phone bills. We return information for up to 365 days.

📘 Info

The recurring expenses resource is only available for Checking, Savings and Credit Card accounts associated with banking links.

Operations

Risk Insights

Operations

Employment Metrics

Operations

Payment Institutions (Brazil)

A payment institution is an entity that Belvo can access information from. You can see a complete list of institutions available for payments by making a List request to this endpoint.

Operations

Customers (Brazil)

A customer is the payer that's going to push funds into your bank account. You need to create a customer in order to receive inflow payments to your organization's bank account.

Operations

Bank Accounts (Brazil)

To receive inflow payments to your organization's bank account, you must register the bank accounts (individual and business) using Belvo's Payments API.

  • Individual bank accounts must be created for each payer (your customer).
  • Business bank accounts need to be created for the beneficiary of the payment (your organization).
Operations

Payment Intents (Brazil)

A payment intent is a single point of access to create payments using any payment method offered by Belvo.

A payment intent captures all payment information (such as the amount to be charged, the description of the payment, the provider, and so on) and guides your customers through the payment flow.

Note: For institutions that require the username_type in the form_fields array, you must send through this value in your PATCH request.

Operations

Biometric Pix Widget Access Token (Brazil)

Use the Biometric Pix Widget Token requests to create a access token for Biometric Payments.

Operations

Payment Transactions (Brazil)

Each time you receive an inflow payment from your customer, a transaction is created in the Belvo database.

You can use the Payment Transactions resource in order to get useful information about a transaction as well as the specific charge associated with it.

Operations