#Gadbit - RN initialize stripe

1 messages · Page 1 of 1 (latest)

flint sandBOT
tall ibex
#

Gadbit - RN initialize stripe

honest bone
#

Yes. I've instantiated like that. However, i want to charge my customers for subscriptions and enable them to accept payments in my app (Stripe Connect)

#

So, i can't use Stripe Provider globally.

#

I need to instantiate stripe with my PK in one screen. But i also need to instantiate Stripe with connectedAccount id in other screen.

#

So i would like to know what do i need to import in my js file in order to use Stripe('pk_asdfg'); in React Native

tall ibex
#

In that case you would want to defer instantiation until you need to accept payment. For all instances

honest bone
#

Yeah, but i need to know what shoud i importin React Native

#

For example...

#

I need to import import { StripeProvider } from '@stripe/stripe-react-native';

#

In order to use StripeProvider

low dagger
#

Hi, stepping in as snufkin had to step away. You would still use the Stripe Provider, you would use it to only wrap the payment portion of your code. Like so:

<StripeProvider publishableKey="pk_test_XXXXXX" urlScheme="your-url-scheme" // required for 3D Secure and bank redirects merchantIdentifier="merchant.com.{{YOUR_APP_NAME}}" // required for Apple Pay > // instead of whole app, just the payment forms go here </StripeProvider>

honest bone
#

So, how can i set the Connected Account ID?

low dagger
#

All of our Connect documentations should have React Native samples so I'd highly recommend going through our documents.

honest bone
low dagger