Financial Institutions represent your customer’s financial accounts (bank accounts) that can be used to withdraw or receive funds.
You can add external accounts through:- Financial Institutions API
- Plaid
Create through the Financial Institutions API
Link your customer’s bank account by adding it to their Account. POSThttps://api.brale.xyz/accounts/{account_id}/financial-institutions/external
Request
Fetching Financial Institutions
Retrieve details of a linked financial institution by ID. GEThttps://api.brale.xyz/accounts/{account_id}/financial-institutions/{id}
Response
Create Financial Institutions through Plaid
This guide walks you through how to enable your customers to securely link their bank accounts via Plaid. After linking, the new Financial Institutions can be used for ACH pulls (debits).Overview of the Flow
- Request a Plaid Link Token from Brale.
- Initialize Plaid Link in your front-end using the
link_token. - Plaid returns a
public_tokenonce the user successfully links their account. - Exchange the
public_tokenwith Brale to finalize the linking process. - Fetch the newly created Financial Institutions for the end user, then proceed with transfers.
Request a Plaid Link Token
POSThttps://api.brale.xyz/accounts/{account_id}/financial-institutions/plaid/link_token
Request
Response
| Parameters | Description |
|---|---|
link_token | The token you will use to launch Plaid Link in your front-end or mobile app. |
expiration | Time at which the link_token will no longer be valid. |
callback_url | The endpoint to which you should send the public_token to finalize the exchange. |
Render the Plaid Link SDK
In your front-end, initialize Plaid Link using the link_token you received. For production apps, it’s recommended you send the public_token to your own backend (over HTTPS), and then have your backend call our exchange endpoint. That way, you avoid exposing your own platform API keys in the browser.Register Financial Institution (exchange the public token)
Send us the public_token you received from Plaid Link. Brale securely exchanges it for a Plaid access_token server-side and creates/updates a Financial Institution on the specified Account. POSThttps://api.brale.xyz/accounts/{account_id}/financial-institutions/register-account
Request
Response
Check for newly created Financial Institutions
Shortly after exchanging the public token, the user’s bank accounts are idempotently created as Financial Institutions which you can query. GEThttps://api.brale.xyz/accounts/{account_id}/financial-institutions/{id}
Response
Handling Re-Authentication
When Plaid signals that an Item requires user action (e.g., credentials changed), Brale can notify you via webhook and you can present a Plaid update Link flow to the user.Receive Brale webhook
Brale willPOST a JSON payload when re-auth is required to the customer_webhook you provide during the exchange step.
Example payload
Check status
GEThttps://api.brale.xyz/accounts/{account_id}/financial-institutions/{fi_id}/status
Response
Request an updated link token
POSThttps://api.brale.xyz/accounts/{account_id}/financial-institutions/{fi_id}/update-link-token
Response
link_token. Plaid will streamline the flow and only ask the user to re-authenticate. Run Step 3 again with the new public_token (same endpoint). The existing Financial Institution is updated in place and retains the same financial_institution_id.