Belvo API Docs (1.222.0)
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:
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
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).
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.
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
toapi.belvo.com
. - If you're using webhooks, make sure to set a Production URL for your webhooks.
We use the following HTTP status code in the response depending on the success or failure:
Status Code | Description |
---|---|
200 | ✅ Success - The content is available in the response body. |
201 | ✅ Success - The content was created successfully on Belvo. |
204 | ✅ Success - No content to return. |
400 | ❌ Bad Request Error - Request returned an error, detail in the content. |
401 | ❌ Unauthorized - The Belvo credentials provided are not valid. |
404 | ❌ Not Found - The resource you try to access cannot be found. |
405 | ❌ Method Not Allowed - The HTTP method you are using is not accepted for this resource. |
408 | ❌ Request Timeout - The request timed out and was terminated by the server. |
428 | ❌ MFA Token Required - MFA token was required by the institution to connect. |
500 | ❌ Internal Server Error - The detail of the error is available in the response body. |
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.
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.
For a full list of errors and how to troubleshoot them, please see our dedicated Error Handling article.
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).
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.
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.
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.
https://developers.belvo.com/_mock/apis/belvoopenapispec/
https://sandbox.belvo.com/
Institutions
An institution is an entity that Belvo can access information from. It can be a:
- bank institution, such as Nubank Brazil.
- fiscal institution, such as the Servicio de Administración Tributaria (SAT) in Mexico.
- employment institutions, such as Instituto Mexicano del Seguro Social (IMSS) in Mexico or Instituto Nacional do Seguro Social (INSS) in Brazil.
Links
A Link is a set of credentials associated to an end-user's access to an institution. You will need to register a Link before accessing information from that specific end-user, such as account or transaction details.
We recommend using the Belvo Hosted Widget to manage the connection process.
Request
Update the credentials of a specific link. If the successfully updated link is a recurrent one, we automatically trigger an update of the link. If we find fresh data, you'll receive historical update webhooks.
👍 Use our Connect Widget
We recommend using our Connect Widget to handle updating
invalid
ortoken_required
links.
The end-user's password used to log in to the institution.
The end-user's second password used to log in to the institution.
📘 Info
This is only required by some institutions. To know which institutions require a second password, see our List institution request and check the
form_fields
array in the response.
- Mock server
https://developers.belvo.com/_mock/apis/belvoopenapispec/api/links/{id}/
- Sandbox
https://sandbox.belvo.com/api/links/{id}/
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
-u <username>:<password> \
'https://developers.belvo.com/_mock/apis/belvoopenapispec/api/links/{id}/' \
-H 'Content-Type: application/json' \
-d '{
"password": "password",
"password2": "pin",
"token": "1234ab"
}'
Ok
Belvo's unique identifier for the current item.
The link type. For more information, see our Links article. We return one of the following enum values:
single
recurrent
null
The ISO-8601 timestamp of Belvo's most recent successful access to the institution for the given link.
The ISO-8601 timestamp of when the data point was created in Belvo's database.
An additional identifier for the link, provided by you, to store in the Belvo database. Cannot include any Personal Identifiable Information (PII). Must be at least three characters long.
If we identify that the identifier contains PII, we will force a null
value. For more information, see our Link creation article.
📘 Info
Only applicable for links created after 08-02-2022.
A unique 44-character string that can be used to identify a user at a given institution.
📚 Check out our Avoiding duplicated links DevPortal article for more information and tips on how to use it.
The current status of the link. For more information, see our Link article in the devportal. We return one of the following values:
valid
invalid
unconfirmed
token_required
The unique ID for the user that created this item.
The update refresh rate for the recurrent link. For more information, check out our recurrent link documentation in our DevPortal. We return one of the following enum values:
6h
12h
24h
7d
(default)30d
(once a month)null
(for single links)
Indicates whether or not to store credentials (and the duration for which to store the credentials).
- For recurrent links, this is set to
store
by default (and cannot be changed). - For single links, this is set to
365d
by default.
Can be either:
store
to store credentials (until the link is deleted)nostore
to not store credentials- Any value between
1d
and365d
to indicate the number of days you want the credentials to be stored.
For more information, check out the credentials_storage section of our Data retention controls article.
An array of resources that you will receive a historical update for.
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 instale_in
.
By default Belvo stores user data for 365 days, unless the link is deleted.
{ "id": "0d3ffb69-f83b-456e-ad8e-208d0998d71d", "institution": "erebor_mx_retail", "access_mode": "recurrent", "last_accessed_at": "2021-03-09T10:28:40.000Z", "created_at": "2022-02-09T08:45:50.406032Z", "external_id": "56ab5706-6e00-48a4-91c9-ca55968678d9", "institution_user_id": "sooE7XJWEKypZJR603ecaWYk-8Ap0oD8Nr1pBQ4eG9c=", "status": "valid", "created_by": "bcef7f35-67f2-4b19-b009-cb38795faf09", "refresh_rate": "7d", "credentials_storage": "27d", "fetch_resources": [ "ACCOUNTS", "TRANSACTIONS" ], "stale_in": "42d" }
Request
Delete a specific link and all the associated data (for example: transactions, accounts, invoices, tax returns, employments, and so on) for that link from your Belvo account. This action is irreversible, and you will not be able to recover the deleted data.
We highly recommend setting the X-Belvo-Request-Mode
header to async
to enable asynchronous deletion. This way, you will avoid the rate limit of 5 deletions per minute. When set, the endpoint will respond with a 202 Accepted
status and provide a request ID for tracking the deletion process. Once the process is complete, you will receive a link_deleted
webhook notification.
If you do not set this header, the endpoint will respond with a 204 No Content
status, but you will be subject to the rate limit of 5 deletions per minute. If you exceed this limit, you will receive a 429 Too Many Requests
error.
- Mock server
https://developers.belvo.com/_mock/apis/belvoopenapispec/api/links/{id}/
- Sandbox
https://sandbox.belvo.com/api/links/{id}/
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
-u <username>:<password> \
'https://developers.belvo.com/_mock/apis/belvoopenapispec/api/links/{id}/' \
-H 'X-Belvo-Request-Mode: async'
{ "request_id": "266ea41d-adf5-480b-af50-15b940c2b846" }
Request
To prevent duplicate requests, this endpoint has a 10-minute cooldown period per link. If you attempt to refresh the same link within 10 minutes of a previous request, you will receive a 409 Conflict
error with the message "The link has already been refreshed. Please wait X minutes before trying again."
.
Use this method to trigger a historical update for a specific link (single or recurrent). Use the fetch_resources
parameter to specify which resources you want to update. If you do not specify this parameter, the historical update will be performed for all resources supported by the institution that the link is associated with.
On a successful request, our API will respond with a 202
status code and a request_id
that you can later use to associate a given historical_update
webhook to this request.
This endpoint does not update the link definition itself, only the historical data for the specified resources. If you want to change the link's fetch_resources
permanently, you should use the Modify a link's data retrieval method instead.
An array of resources that you would like to receive a historical update for. If you do not specify this field, the historical update will be performed for all resources supported by the institution.
If you specify a resource that is not supported by the institution, we return a 400 Bad Request
error, specifying which resources are supported for the given link.
- Mock server
https://developers.belvo.com/_mock/apis/belvoopenapispec/api/links/{id}/refresh/
- Sandbox
https://sandbox.belvo.com/api/links/{id}/refresh/
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
https://developers.belvo.com/_mock/apis/belvoopenapispec/api/links/e4bb1afb-4a4f-4dd6-8be0-e615d233185b/refresh/ \
-H 'Content-Type: application/json' \
-d '{
"fetch_resources": [
"ACCOUNTS",
"TRANSACTIONS",
"OWNERS"
]
}'
{ "request_id": "b5d0106ac9cc43d5b36199fe831f6bbe" }
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
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.
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)
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)
Current Employments Mexico
The Current Employments resource provides real-time access to the current employment status of individuals in Mexico. This resource offers detailed information about whether an individual is currently employed or unemployed, along with their active employment records.
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.
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.
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).
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 theform_fields
array, you must send through this value in your PATCH request.