Loading...
Loading...
Build a production-ready connector that uses multiple data aggregators (Plaid, MX, Finicity, Akoya) for better reliability and coverage.
Time: ~30 minutes Level: Intermediate Framework: Next.js
Single-aggregator approaches have limits:
Quiltt's unified API lets you use multiple aggregators while writing code once.
New to financial data aggregation? We'll explain key concepts as we go.
Quiltt supports four major aggregators, each with different strengths:
| Aggregator | Best For |
|---|---|
| Plaid | Developer-friendly APIs, major institutions |
| MX | Credit unions, smaller regional banks (US/Canada) |
| Finicity | Direct OAuth, payments, lending |
| Akoya | Direct OAuth to top 100+ US banks |
Key differences:
You don't need to pick one—Quiltt lets users choose, and your code stays the same.
Create a Next.js project:
Install dependencies:
Add credentials from the Dashboard:
Authentication Required
This tutorial requires Session tokens for GraphQL queries. See the Authentication Tutorial for setup.
Initialize in your root layout:
Before writing any code, you'll need to configure your connector in the Quiltt Dashboard. This will determine which aggregators and products are available to your users.
Authentication configurationEnrollment configurationConnect section:
ExitRedirect section to:
Redirect URL to http://localhost:3000/loginSend TokenLet's implement the core connection components:
The ConnectAccounts component provides a general-purpose button that launches the Quiltt connector dialog, allowing users to connect any supported financial institution:
The PrefilledConnector component demonstrates how to pre-select a specific institution (Chase in this example) for a more streamlined connection experience:
After a successful connection, the Quiltt Connector redirects users to your login page with an authentication token. Let's implement the login handler:
After implementing this login page:
http://localhost:3000/login?token={authToken}useQuilttSession processes and stores the token/connectionsThis completes the connection flow and prepares us for accessing financial data in the next section.
The journey from initiating a connection to accessing financial data involves several key steps. Let's break this down into a clear process.
The Quiltt Connector SDK provides a comprehensive callback system that lets you track every step of the connection process. These events are crucial for implementing a robust multi-aggregator strategy, as they allow you to:
Here's a robust implementation of a connection manager:
The key events you'll want to handle are:
Open: Triggered when the connector modal opensLoad: Fired when an aggregator is selected and loadedExitSuccess: Indicates a successful connection, providing the connectionIdExitAbort: Triggered if the user cancels the processExitError: Fired if there's an error during connectionThe @quiltt/react package provides hooks for handling data fetching and caching through GraphQL. The primary hooks you'll use are:
useQuery: For fetching datauseSubscription: For real-time updatesuseQuilttClient: For direct cache access and modificationsThese hooks provide several powerful features:
Server-Side Data Fetching
While this tutorial uses React hooks for client-side data fetching, you can also implement your own server-side GraphQL client using fetch.
This might be preferred if you need to keep sensitive data server-side or want to implement your own caching strategy.
Check out our API Reference for details on implementing a custom client.
Now we can create our accounts list component that handles both initial data loading and real-time updates:
Quiltt provides real-time updates through GraphQL subscriptions. Here's how to implement comprehensive real-time functionality:
This implementation provides several benefits for a multi-aggregator strategy:
Alternative Real-Time Updates
While GraphQL subscriptions provide the most seamless real-time experience, you can also implement real-time updates using webhooks. This approach might be preferred for server-side architectures or when you need to integrate with existing event-processing systems. See our Webhooks Documentation for details on setting up webhook-based updates.
When working with multi-aggregator connections, follow these best practices:
By following this structured approach to data access, you'll be able to maintain reliable connections across multiple aggregators while providing a smooth user experience.
The home page (./src/app/page.tsx) serves as the entry point for users to initiate new connections:
The connections page (./src/app/connections/page.tsx) provides a dashboard view of all connected accounts and their current status:
The connection details page (./src/app/connections/[id]/page.tsx) shows detailed information for a specific connection, including all linked accounts and repair options if needed:
Financial data connections can become disrupted for various reasons:
Authentication Changes
Institution Changes
Aggregator Issues
Maintaining reliable connections requires robust error handling and repair capabilities. Let's implement comprehensive error handling:
First, we'll define our connection status handling using the types generated from our GraphQL schema:
ConnectionStatus
The ConnectionStatus type is generated using @graphql-codegen/typescript.
For detailed instructions on setting up GraphQL Code Generator with Quiltt, see our GraphQL Tooling Tutorial.
Let's create a reusable component to display connection status:
Implementing a multi-aggregator strategy with Quiltt is like building a resilient financial data infrastructure. By following this guide, you've created:
The implementation provides:
Continue Learning:
Related Tutorials:
Reference Documentation: