Repository navigation
fix(connect): list linked bank accounts in Android account onboarding - #2856
Draft
guido-stripe wants to merge 1 commit into
Draft
guido-stripe wants to merge 1 commit into
guido-stripe wants to merge 1 commit into
Conversation
On Android, Connect embedded components collected bank accounts with the Financial Connections token flow. Sessions created by Connect have no bank account token, so the flow failed with "Could not extract Token from FinancialConnectionsSession." after the customer linked their accounts, and the payout step reset with an error. Use the session flow on Android, as the native Android Connect SDK does, and return the session's bank account token from it when there is one. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Committed-By-Agent: claude
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
On Android, Connect embedded components now collect bank accounts with the Financial Connections session flow (
collectFinancialConnectionsAccounts) instead of the token flow (collectBankAccountToken). The session flow now also returns the session's bank account token when the session has one, so Connect still receives it.iOS is unchanged.
Motivation
Fixes #2832.
In
ConnectAccountOnboardingon Android, the customer could link bank accounts through Financial Connections, reach the "Success" screen, and then land back on "Select an account for payouts" with "We encountered an error while loading data." The linked accounts only appeared after reopening onboarding.The token flow requires the session to carry a bank account token. Sessions created by Connect don't have one, so the Android SDK failed with
Could not extract Token from FinancialConnectionsSession.after the accounts were already linked. The native Android Connect SDK uses the session flow and attaches the session's token when there is one. iOS treats the token as optional. This change brings React Native on Android in line with both.Testing
Manual test: example app on an Android emulator (API 36),
ConnectAccountOnboardingwith a Custom test account, "Add bank account" → "link another account" → Test (Non-OAuth) → Connect accounts → exit without saving to Link.{ code: 'Failed', message: 'Could not extract Token from FinancialConnectionsSession.' }, connect-js loggedcollectFinancialConnectionsAccounts failed with error: null, and the payout step showed the error.success, there was no error, and the newly linked accounts were listed and selectable.Automated: two new
EmbeddedComponenttests cover the Android session flow with and without a token. They fail without this change.yarn test,yarn typescript, eslint and detekt pass.Screenshots
Documentation
Select one:
🤖 Generated with Claude Code