## Use Financial Connections to collect a bank account Token for payouts Use `stripe.collectBankAccountToken` in the [Add a Financial Connections Account to a US Custom Connect account](/financial-connections/connect-payouts.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 for payouts. `stripe.collectBankAccountToken` returns a `Promise` which resolves with a `result` object. If an external financial account was successfully collected, the result object will contain: * `result.token`: a bank account [Token](/api/tokens). * `result.financialConnectionsSession`: the updated [Financial Connections Session](/api/financial_connections/session) object. The `accounts` array will contain a single Financial Connections Account (representing the same external financial account used for `result.token`). If there was an error launching the Authentication Flow, the result object will contain: * `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. If the user chooses to link no accounts, or exits the Authentication Flow early, the result object will contain: * `result.financialConnectionsSession`: the updated [Financial Connections Session](/api/financial_connections/session) object. The `accounts` array will be empty. **Syntax:** `stripe.collectBankAccountToken(...)` - `options` (object) **required** - `clientSecret` (string) **required** The `client_secret` of the [Financial Connections Session](/api/financial_connections/session.md). ### Use Financial Connections to collect a bank account Token for payouts ```js stripe.collectBankAccountToken({ 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); } else if (result.token) { // Use result.token to set your user's external payout account console.log(result.token) } }); ``` ```es_next const result = await stripe.collectBankAccountToken({ clientSecret: '{FINANCIAL_CONNECTIONS_SESSION_CLIENT_SECRET}' }); if (result.error) { // Inform the customer that there was an error. console.log(result.error.message); } else if (result.token) { // Use result.token to set your user's external payout account console.log(result.token) } ```