## Collect Financial Connections Accounts Use `stripe.collectFinancialConnectionsAccounts` in the [Add a Financial Connections Account to retrieve data](/financial-connections/other-data-powered-products.md) flow. When called, it will load the [Authentication Flow](/financial-connections/fundamentals.md#authentication-flow), an on-page modal UI which allows your user to securely link their external financial account(s). `stripe.collectFinancialConnectionsAccounts` returns a `Promise` which resolves with a `result` object. The object has either: * `result.financialConnectionsSession`: the updated [Financial Connections Session](/api/financial_connections/session) object. The `accounts` property will contain the list of accounts collected during this session. If the user chooses to link no accounts, or exits the Authentication Flow early, the `accounts` array will be empty. * `result.error`: there was an error launching the Authentication Flow. For example, the Financial Connections Session has expired, or the Financial Connections Session has already been used. **Syntax:** `stripe.collectFinancialConnectionsAccounts(...)` - `options` (object) **required** - `clientSecret` (string) **required** The `client_secret` of the [Financial Connections Session](/api/financial_connections/session.md). ### Collect Financial Connections Accounts ```js stripe.collectFinancialConnectionsAccounts({ clientSecret: '{FINANCIAL_CONNECTIONS_SESSION_CLIENT_SECRET}' }) .then(function(result) { if (result.error) { // Inform the customer that there was an error. console.log(result.error.message); // Handle next step based on length of accounts array } else if (result.financialConnectionsSession.accounts.length === 0) { console.log('No accounts were linked'); } else { console.log(result.financialConnectionsSession.accounts) } }); ``` ```es_next const result = await stripe.collectFinancialConnectionsAccounts({ clientSecret: '{FINANCIAL_CONNECTIONS_SESSION_CLIENT_SECRET}' }); if (result.error) { // Inform the customer that there was an error. console.log(result.error.message); // Handle next step based on length of accounts array } else if (result.financialConnectionsSession.accounts.length === 0) { console.log('No accounts were linked'); } else { console.log(result.financialConnectionsSession.accounts) } ```