Skip to content

Conversation

@gimenete-stripe
Copy link

@gimenete-stripe gimenete-stripe commented Oct 31, 2025

Summary

This PR adds support for Connect embedded components. In particular it adds support for 3 components:

  • Account onboarding
  • Payments
  • Payouts

New components can easily be added.

Most of the work is done using just React Native but I need to use native code for a couple of things:

  • Handling "secure webviews"
  • Rendering the navigation bar to match the look and feel of the system (e.g. liquid glass) when opening the onboarding embedded component, which needs to be shown in a modal.

Question: this API is not ready for GA yet. How do we prevent users to think it's production ready? Should I add an unstable_ prefix or a PrivatePreview suffix to the API or something like that?

Motivation

https://docs.google.com/document/d/1tEm_mtsbHgbyhBoctYGLjmmLth0nI4b24osTIxN8_gM/edit?usp=sharing

Testing

  • I tested this manually
  • I added automated tests

I updated the backend to have an additional endpoint to return a client secret for the embedded components and added 3 screens to the example app.

Documentation

Select one:

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

@gimenete-stripe gimenete-stripe marked this pull request as ready for review November 25, 2025 12:12
@gimenete-stripe gimenete-stripe requested review from a team as code owners November 25, 2025 12:12
Copy link

@maragues-stripe maragues-stripe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I focused on the Android part

Comment on lines +1342 to +1351
val uri = android.net.Uri.parse(url)
val builder =
androidx.browser.customtabs.CustomTabsIntent
.Builder()

// Set toolbar color for better UX
builder.setShowTitle(true)
builder.setUrlBarHidingEnabled(true)

val customTabsIntent = builder.build()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: You can probably move this outside of runOnUiThread

if (manifestFile.exists()) {
def manifest = manifestFile.text

// Add launchMode="singleTask"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MainActivity with launchMode=singleTask will destroy all activities that previously existed on top of it.

Is that what we want?

In any case, can't we define a standard AndroidManifest.xml file, instead of doing this?

Copy link
Author

@gimenete-stripe gimenete-stripe Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

launchMode=singleTask is necessary for deep linking with React Navigation:
https://reactnavigation.org/docs/deep-linking/#setup-on-android

And deep linking is necessary for using "secure webviews" (implemented with chrome tabs on Android) to return back to the app.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And we can't use AndroidManifest.xml file, instead of modifying the manifest in the build.gradle?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants