Stripe for Expo React-Native Web

I’ve searched everywhere for suggestions on how to integrate my react-native web/ios/android app with Stripe. All of the advice seems to point to Expo Stripe. But that does not work with web apps.

When I install @stripe/stripe-react-native it kills the web version with myriad errors even if I do not use it. Has anyone been successful at possibly conditionally installing the package for just ios and android? I do not have a good solution moving forward.


Hi @dk253

Could you elaborate on what you mean by “even if I do not use it”?

If I create a new Expo app and run expo install @stripe/stripe-react-native then I can run expo start --web without errors.

Maybe you could do something like the following: Create a file called YourScreen.web.js with the web-specific code (which does not import @stripe/stripe-react-native) alongside your YourScreen.js with the code to run on Android/iOS.

Thanks @wodin ! I’ll try this and get back.

1 Like

Thanks @wodin . The errors did not pop up the 2nd time I installed. Must have been something else I was doing at the same time. Multitasking! Your advice helped.

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.