#Gadbit

1 messages · Page 1 of 1 (latest)

abstract mulchBOT
floral egret
#

Hi 👋

How are you instantiating the Stripe library?

fair ivy
#

I'm using <StripeProvider publishableKey={publishableKey}/> on the App.js

floral egret
#

In that case you will need to use the PK for the Connect Account

fair ivy
#

In the App i'm receiving payments on my account, but i also want to enable other business to accept payments in my app

#

So i still need to use my PK on the Stripe Provider in order to confirm SetupIntents and PaymentIntents

floral egret
#

If the Payment exists on your account then you would not include a different Stripe Account on the front end

fair ivy
#

There is a section in my app for business to subscribe to my app, so i need those payment intents in my account. But also i need to enable those business to receive payments in my app.

#

Currently i'm using my PK in the Stripe Provider in the App.js and it's working fine.

#

But now, i will need to use Stripe Connect in order to enable the connected business to accept payments in my app

#

How can i instantiate the Stripe Provider to allow both types of Payments?

floral egret
#

You will need to do either one or the other

#

At the time you instantiate Stripe.js

#

So the parameter you are looking for is stripeAccount.

#

But if the payments exist on other accounts you may still have an issue with using your Account's PK

fair ivy
#

OK, I'm currently using StripeProvider in the App.js globally, so i didn't need to instantiate on every Screen in the App. So, let's say i have two screens (Subsriptions and Tickets). Can i instantiate Stripe with stripeAccount on the Tickets Screen even though a global instance already exists (used for Subscriptions)?

#

That is, can I continue using the global instance for Subscriptions Screen and also create a new instance (with stripeAccount) on the Ticket Screen?

floral egret
#

In that case I would delay instantiation in your app until you needed to collect payment details as a way to avoid collisions between two objects with the same name

fair ivy
#

OK OK

#

I have another question...

#

In React Native i was not using return_url to confirm Payment Intents, but now, reading Stripe Connect docs, i noticed that it's using return_url in the confirmParams, is it something exclusive for Stripe Connect, is it optional or is it required?

floral egret
#

It's not exclusive, it's just good behavior since any payment method that requires will fail without it

fair ivy
#

Oh OK

#

Forgive my ignorance, but if my app is only for mobile (React Native, there is no web) do i still need to use return_url?

#

Or what should i set on return_url for the mobile app?

#

The only payment method accepted in my app is Card.

floral egret
#

On a mobile app you can use it to deep link to a part of your app after something like a 3DS auth challenge

fair ivy
#

OK, I really appreciate your help. Thanks a lot.