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

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

List tax returns

Request

▶️ Usage

With the List Tax Returns method, you can:

  1. List tax returns related to a specific link.id (using the link query parameter).
  2. Get the details of a specific tax-return.id (using the id query parameter).
  3. [Not Recommended] List all tax returns related to your Belvo account (without using any query parameters).

📖 Pagination

This method returns a paginated response (default: 100 items per page). You can use the page_size query parameter to increase the number of items returned to a maximum of 1000 items. You can use the page query parameter to navigate through the results. For more details on how to navigate Belvo's paginated responses, see our Pagination Tips article.

🔦 Filtering Responses

Please see the query list below for a list of fields that you can filter your responses by. For more information on how to use filters, see our Filtering responses article.

🔔 Multiple Schemas

As a link can have both yearly and monthly tax returns, the response will include a mix of these two types of tax returns (and thus difference schemas).

Query
linkstring(uuid)

The link.id you want to filter by.

ℹ️ We highly recommend adding the link.id filter in order to improve your performance.

Example: link=8848bd0c-9c7e-4f53-a732-ec896b11d4c4
page_sizeinteger(int32)[ 1 .. 1000 ]

Indicates how many results to return per page. By default we return 100 results per page.

ℹ️ The minimum number of results returned per page is 1 and the maximum is 1000. If you enter a value greater than 1000, our API will default to the maximum value (1000).

Default 100
Example: page_size=100
pageinteger(int32)>= 1

A page number within the paginated result set.

Example: page=1
omitstring

Omit certain fields from being returned in the response. For more information, see our Filtering responses DevPortal article.

fieldsstring

Return only the specified fields in the response. For more information, see our Filtering responses DevPortal article.

link__inArray of strings(uuid)

Return results only for these link.ids.

Example: link__in=5722d0ba-69d7-42dc-8ff5-33767b83c5d6
idstring(uuid)

Return information only for this resource id.

Example: id=24ccab1d-3a86-4136-a6eb-e04bf52b356f
id__inArray of strings(uuid)

Return information for these resource ids.

Example: id__in=6b3dea0f-be29-49d1-aabe-1a6d588642e6
created_atstring(date)

Return items that were last updated in Belvo's database on this date (in YYYY-MM-DD format).

Example: created_at=2022-05-05
created_at__gtstring(date)

Return items that were last updated in Belvo's database after this date (in YYYY-MM-DD format).

Example: created_at__gt=2022-05-05
created_at__gtestring(date)

Return items that were last updated in Belvo's database after or on this date (in YYYY-MM-DD format).

Example: created_at__gte=2022-05-04
created_at__ltstring(date)

Return items that were last updated in Belvo's database before this date (in YYYY-MM-DD format).

Example: created_at__lt=2022-04-01
created_at__ltestring(date)

Return items that were last updated in Belvo's database before or on this date (in YYYY-MM-DD format).

Example: created_at__lte=2022-03-30
created_at__rangeArray of strings(date)<= 2 items

Return accounts that were last updated in Belvo's database between two dates (in YYYY-MM-DD format).

Example: created_at__range=2022-03-03
ejerciciointeger= 4 characters>= 1900^[0-9]{4}$

Return tax returns for exactly this year (YYYY).

Example: ejercicio=2017
ejercicio__ltinteger= 4 characters>= 1900^[0-9]{4}$

Return tax returns for before this year (YYYY).

Example: ejercicio__lt=2017
ejercicio__lteinteger= 4 characters>= 1900^[0-9]{4}$

Return tax returns for this year and earlier (YYYY).

Example: ejercicio__lte=2017
ejercicio__gtinteger= 4 characters>= 1900^[0-9]{4}$

Return tax returns for after this year (YYYY).

Example: ejercicio__gt=2017
ejercicio__gteinteger= 4 characters>= 1900^[0-9]{4}$

Return tax returns for this year or later (YYYY).

Example: ejercicio__gte=2017
ejercicio__rangeArray of integers<= 2 items

Return tax returns for this range of years (YYYY).

Example: ejercicio__range=2017
tipo_declaracionstring

Return tax returns with this declaration type.

Example: tipo_declaracion=Normal
tipo_declaracion__inArray of strings

Return tax returns with these declaration types.

Example: tipo_declaracion__in=Commercial
curl -i -X GET \
  -u <username>:<password> \
  'https://developers.belvo.com/_mock/apis/belvoopenapispec/api/tax-returns/?created_at=2022-05-05&created_at__gt=2022-05-05&created_at__gte=2022-05-04&created_at__lt=2022-04-01&created_at__lte=2022-03-30&created_at__range=2022-03-03&ejercicio=2017&ejercicio__gt=2017&ejercicio__gte=2017&ejercicio__lt=2017&ejercicio__lte=2017&ejercicio__range=2017&fields=string&id=24ccab1d-3a86-4136-a6eb-e04bf52b356f&id__in=6b3dea0f-be29-49d1-aabe-1a6d588642e6&link=8848bd0c-9c7e-4f53-a732-ec896b11d4c4&link__in=5722d0ba-69d7-42dc-8ff5-33767b83c5d6&omit=string&page=1&page_size=100&tipo_declaracion=Normal&tipo_declaracion__in=Commercial'

Responses

Ok

Bodyapplication/json
countinteger(int32)

The total number of results in your Belvo account.

Example: 130
nextstring or null(uri)

The URL to next page of results. Each page consists of up to 100 items. If there are not enough results for an additional page, the value is null.

In our documentation example, we use {endpoint} as a placeholder value. In production, this value will be replaced by the actual endpoint you are currently using (for example, accounts or owners).

Example: "https://sandbox.belvo.com/api/{endpoint}/?link=1bd948f7-245d-4313-b604-34d1044cb908page=2"
previousstring or null(uri)

The URL to the previous page of results. If there is no previous page, the value is null.

Example: null
resultsArray of Tax Return Personal (Yearly) (object) or Tax Return Personal (Monthly) (object) or Tax Return Business (Yearly) (object) or Tax Return Business (Monthly) (object)

An array of:

  • Tax Return Personal (Yearly) objects
  • Tax Return Personal (Monthly) objects
  • Tax Return Business (Yearly) objects
  • Tax Return Business (Monthly) objects

🚧 Multiple Schemas

As a link can have both yearly and monthly tax returns, the response will include a mix of these two types of tax returns (and thus difference schemas).

Response
application/json

Example of a list of personal tax returns

{ "count": 101, "next": "https://sandbox.belvo.com/api/{endpoint}/?link=1bd948f7-245d-4313-b604-34d1044cb908page=2", "previous": null, "results": [ {} ] }

Retrieve tax returns for a link

Request

Retrieve tax return information for a specific fiscal link.

Query
omitstring

Omit certain fields from being returned in the response. For more information, see our Filtering responses DevPortal article.

fieldsstring

Return only the specified fields in the response. For more information, see our Filtering responses DevPortal article.

Bodyapplication/jsonrequired
One of:

Request body for monthly tax returns

linkstring(uuid)required

The link.id you want to retrieve information for.

Example: "c81a1dea-6dd6-4999-8b9f-541ee8197058"
attach_pdfboolean

When set to true, you will receive the PDF in binary format in the response.

Default false
Example: true
save_databoolean

Indicates whether or not to persist the data in Belvo. By default, this is set to true and we return a 201 Created response.

When set to false, the data won't be persisted and we return a 200 OK response.

Default true
Example: true
typestringrequired

The type of tax return to return. For monthly tax returns, this field must be set to monthly.

Default "monthly"
date_fromstring(date)= 10 characters^\d{4}-\d{2}-\d{2}$required

The date from which you want to start getting data for, in YYYY-MM-DD format.

⚠️ The value of date_from cannot be greater than date_to.

Example: "2020-08-05"
date_tostring(date)= 10 characters^\d{4}-\d{2}-\d{2}$required

The date you want to stop getting data for, in YYYY-MM-DD format.

⚠️ The value of date_to cannot be greater than today's date (in other words, no future dates).

Example: "2020-10-05"
curl -i -X POST \
  -u <username>:<password> \
  'https://developers.belvo.com/_mock/apis/belvoopenapispec/api/tax-returns/?fields=string&omit=string' \
  -H 'Content-Type: application/json' \
  -d '{
    "link": "c81a1dea-6dd6-4999-8b9f-541ee8197058",
    "attach_pdf": true,
    "save_data": true,
    "type": "monthly",
    "date_from": "2020-08-05",
    "date_to": "2020-10-05"
  }'

Responses

Ok (when save_data=false)

Bodyapplication/jsonArray [
One of:
idstring(uuid)

Belvo's unique identifier for the current item.

Example: "0d3ffb69-f83b-456e-ad8e-208d0998d71d"
linkstring or null(uuid)

The link.id the data belongs to.

Example: "30cb4806-6e00-48a4-91c9-ca55968576c8"
collected_atstring(date-time)required

The ISO-8601 timestamp when the data point was collected.

Example: "2022-02-09T08:45:50.406032Z"
created_atstring(date-time)

The ISO-8601 timestamp of when the data point was created in Belvo's database.

Example: "2022-02-09T08:45:50.406032Z"
informacion_generalobject or nullrequired

General information on the tax return (year, RFC, return type, person/company name, and so on).

sueldos_salariosobject or nullrequired

Details regarding the income information together combined with withheld taxes.

servicios_profesionalesobject or nullrequired

Details regarding the income and tax information from professional services provided.

deducciones_personalesobject or nullrequired

List of all personal tax deductions.

determinacion_impuestoobject or nullrequired

Details regarding the final tax return.

retencionesobject or nullrequired

Details on the already withheld taxes.

dividendosobject or nullrequired

Details regarding dividends.

datos_informativosobject or null

Extra informative data on the tax return.

pdfstring or null(binary)required

Tax return PDF as a binary.

Example: "=PDF-STRING="
receipt_pdfstring or null(binary)required

The acknowledgement receipt from the fiscal institution confirming that they received the tax return.

Example: "=PDF-STRING="
property name*anyadditional property
]
Response
application/json

Example of a list of personal tax returns

[ { "id": "02589c41-ba22-4d44-8558-8111cc751318", "link": "19697249-01b8-443e-a451-76bfc5fbeebf", "collected_at": "2022-02-09T08:45:50.406032Z", "created_at": "2022-02-09T08:46:20.406032Z", "informacion_general": {}, "sueldos_salarios": {}, "servicios_profesionales": {}, "deducciones_personales": {}, "determinacion_impuesto": {}, "retenciones": {}, "dividendos": {}, "datos_informativos": {}, "pdf": "=PDF-STRING=", "receipt_pdf": "=PDF-STRING=" } ]

Get a tax return's details

Request

Get the details of a specific tax return.

Path
idstring(uuid)required

The tax-return.id you want to get detailed information about.

Query
omitstring

Omit certain fields from being returned in the response. For more information, see our Filtering responses DevPortal article.

fieldsstring

Return only the specified fields in the response. For more information, see our Filtering responses DevPortal article.

curl -i -X GET \
  -u <username>:<password> \
  'https://developers.belvo.com/_mock/apis/belvoopenapispec/api/tax-returns/{id}/?fields=string&omit=string'

Responses

Ok

Bodyapplication/json
One of:
idstring(uuid)

Belvo's unique identifier for the current item.

Example: "0d3ffb69-f83b-456e-ad8e-208d0998d71d"
linkstring or null(uuid)

The link.id the data belongs to.

Example: "30cb4806-6e00-48a4-91c9-ca55968576c8"
collected_atstring(date-time)required

The ISO-8601 timestamp when the data point was collected.

Example: "2022-02-09T08:45:50.406032Z"
created_atstring(date-time)

The ISO-8601 timestamp of when the data point was created in Belvo's database.

Example: "2022-02-09T08:45:50.406032Z"
informacion_generalobject or nullrequired

General information on the tax return (year, RFC, return type, person/company name, and so on).

sueldos_salariosobject or nullrequired

Details regarding the income information together combined with withheld taxes.

servicios_profesionalesobject or nullrequired

Details regarding the income and tax information from professional services provided.

deducciones_personalesobject or nullrequired

List of all personal tax deductions.

determinacion_impuestoobject or nullrequired

Details regarding the final tax return.

retencionesobject or nullrequired

Details on the already withheld taxes.

dividendosobject or nullrequired

Details regarding dividends.

datos_informativosobject or null

Extra informative data on the tax return.

pdfstring or null(binary)required

Tax return PDF as a binary.

Example: "=PDF-STRING="
receipt_pdfstring or null(binary)required

The acknowledgement receipt from the fiscal institution confirming that they received the tax return.

Example: "=PDF-STRING="
property name*anyadditional property
Response
application/json

Example of a list of personal tax returns

{ "id": "02589c41-ba22-4d44-8558-8111cc751318", "link": "19697249-01b8-443e-a451-76bfc5fbeebf", "collected_at": "2022-02-09T08:45:50.406032Z", "created_at": "2022-02-09T08:46:20.406032Z", "informacion_general": { "ejercicio": 2018, "fecha_hora_presentacion": "2020-01-07T17:28:00-05:00", "numero_operacion": "00000000001", "periodo_declaracion": "Del Ejercicio", "rfc": "ABCD111111A11", "tipo_declaracion": "Normal", "nombre": "JOHN DOE" }, "sueldos_salarios": { "retenedores": [], "impuesto_retenido": 19497, "ingreso_anual": 118263, "ingresos_acumulables": 115998, "ingresos_exentos": 2265, "subsidio_empleo": 0 }, "servicios_profesionales": { "deducciones_autorizadas": {}, "ingresos": {}, "resultado_fiscal": {}, "pagos_provisionales": {}, "retenciones_isr": {} }, "deducciones_personales": { "honorarios_medicos_dentales_hospitalarios": [], "donativos": [], "aportaciones_voluntarias_complementarias_al_sar": [], "primas_por_seguros_de_gasto_medico": [] }, "determinacion_impuesto": { "base_gravable": 126864, "deducciones_personales": 23264, "ingresos_acumulables": 150128, "isr_favorable": 10308, "isr_conforme_tarifa_final": 13789, "isr_retenido": 24097, "num_clabe": "000000000000000001", "nombre_banco": "BANCO SA", "pagos_provisionales": 0, "titular_clabe_permite_verificacion": "SÍ", "accion_saldo_a_favor": "DEVOLUCIÓN" }, "retenciones": { "sueldos_salarios": [], "dividendos": [], "servicios_profesionales": [] }, "dividendos": { "monto_acumulable_dividendos_utilidades": null, "monto_total_isr_pagado_sociedad": null }, "datos_informativos": { "credito_fiscal_autorizado_proyectos_investigacion_desarrollo": 0, "credito_fiscal_autorizado_proyectos_apoyo_deporte_alto_rendimiento": 0, "credito_fiscal_autorizado_proyectos_inversion_artes": 0, "credito_fiscal_autorizado_inversion_equipos_fijos": 0, "credito_fiscal_autorizado_produccion_distribucion_cinematografica": 0, "saldo_credito_fiscal_autorizado_anteriores_investigacion_desarrollo": 0, "saldo_credito_fiscal_anteriores_proyectos_inversion_artes": 0, "saldo_credito_fiscal_anteriores_produccion_distribucion_cinematografica": 0 }, "pdf": "=PDF-STRING=", "receipt_pdf": "=PDF-STRING=" }

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