Skip to content

fix(connect): list linked bank accounts in Android account onboarding - #2856

Draft
guido-stripe wants to merge 1 commit into
masterfrom
guido/android-connect-fc-session
Draft

guido-stripe wants to merge 1 commit into
masterfrom
guido/android-connect-fc-session

Conversation

@guido-stripe

Copy link
Copy Markdown
Contributor

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 ConnectAccountOnboarding on 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

  • I tested this manually
  • I added automated tests

Manual test: example app on an Android emulator (API 36), ConnectAccountOnboarding with a Custom test account, "Add bank account" → "link another account" → Test (Non-OAuth) → Connect accounts → exit without saving to Link.

  • Before: the native call resolved { code: 'Failed', message: 'Could not extract Token from FinancialConnectionsSession.' }, connect-js logged collectFinancialConnectionsAccounts failed with error: null, and the payout step showed the error.
  • After: Financial Connections reported success, there was no error, and the newly linked accounts were listed and selectable.

Automated: two new EmbeddedComponent tests cover the Android session flow with and without a token. They fail without this change. yarn test, yarn typescript, eslint and detekt pass.

Screenshots

Before After
(screenshot to be attached) (screenshot to be attached)

Documentation

Select one:

  • I have added relevant documentation for my changes.
  • This PR does not result in any developer-facing changes.

🤖 Generated with Claude Code

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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant