MongoDB powers open finance with flexible data integration, built-in security, and scalable financial services.
Use cases: App Driven-Analytics
Industries: Financial Services
Products and tools: Aggregation Pipeline, MongoDB Atlas
Solution Overview
Open finance is transforming the financial industry, enabling seamless data sharing across banks, fintech companies, and third-party providers. However, integrating diverse financial data while ensuring security, compliance, and scalability is a major challenge.
MongoDB provides the ideal foundation for open finance with its flexible document model, native JSON support, and powerful aggregation framework. These features allow institutions to unify data from multiple sources and ensure secure and compliant data management.
By leveraging MongoDB, financial institutions can accelerate innovation, offer personalized financial insights, and adapt to evolving regulations without the complexity of traditional relational databases.

Figure 1. Open finance application with MongoDB
Reference Architectures
This example focuses on a fictional demo bank, Leafy Bank, which allows users to connect external bank accounts securely.
First, the user initiates a request to connect their external bank accounts. This requires explicit user consent, ensuring security and compliance with regulations like PSD2. To authenticate, Leafy Bank emulates OAuth 2.0, generating Bearer tokens for secure communication between institutions.
Once authorized, Leafy Bank communicates with external banks through APIs. These banks expose financial data such as accounts, transactions, and balances through their microservices. The response is returned in JSON format, ensuring compatibility and seamless data exchange.
The financial data is then pushed into MongoDB Atlas, where it is centrally stored. MongoDB's flexible document model lets you handle diverse data structures from different banks. From here, Leafy Bank can use aggregation pipelines to analyze and enrich the data, giving users a holistic financial view while enabling the bank to offer personalized financial insights.
Figure 2. Open finance architecture diagram
Data Model Approach
In the demo solution, the data model is a simplified design that emulates real-world financial data integration. The approach leverages MongoDB's flexible document model to handle diverse data structures from different financial entities.
Components
Collection | Description | Sample Document | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Stores Bearer tokens used for authenticating and authorizing API requests between Leafy Bank and external banks. |
| ||||||||||||||||||||
| Stores information about external bank accounts linked by users. |
| ||||||||||||||||||||
| Stores information about financial products (such as loans and mortgages) associated with users. |
|
In a real-world scenario, these collections would involve more complex security mechanisms and detailed information. Additionally, each financial entity would have its own data model definitions, which could vary significantly. You would need to consider the following factors:
- Data mapping and relationships
- Implementing a robust data mapping and relationship layer to translate diverse data models from different financial entities into a unified format.
- Security and compliance
- Ensuring data security and compliance with regulations such as GDPR, PSD2, and other local financial regulations. This includes encryption, access controls, and audit trails.
- Scalability and performance
- Designing the data model to handle large volumes of data efficiently, with considerations for indexing, sharding, and performance optimization.
- Integration and interoperability
- Building APIs and microservices that can integrate with various external systems, ensuring interoperability and real-time data exchange.
By using MongoDB's flexible document model, the demo solution showcases how financial institutions can unify and manage diverse data sources. However, a production-grade implementation would require addressing the complexities and nuances of real-world financial data integration.
Build the Solution
For detailed setup instructions, follow the steps outlined in the Industry Solutions public GitHub repository. This repository hosts the backend for Leafy Bank's open finance demo service. It demonstrates integration with third-party banks and showcases secure data exchange. MongoDB serves as the central data store. The code may include simplified or emulated components for demonstration purposes.
To build the solution step-by-step, follow these instructions:
Solution Frontend
The frontend for this solution is available in the Leafy Bank UI repository. The different components of Leafy Bank are designed as microservices. The UI repository serves as the main hub and provides an overview of all integrated services.
Key Learnings
Central data store: MongoDB acts as a flexible and efficient central data store that supports open finance ecosystems.
Secure data management: MongoDB provides secure data management with built-in encryption, granular access controls, and high availability, helping organizations protect sensitive information and comply with evolving regulatory requirements.
Authors
Luis Pazmino Diaz, MongoDB
Ainhoa Mugica, MongoDB
Julian Boronat, MongoDB
Andrea Alaman Calderon, MongoDB