#George Farhat

1 messages · Page 1 of 1 (latest)

gleaming cosmosBOT
green egret
#

if it were me I would just ask the customer their location upfront and then redirect to the payment page.

But otherwise you can check the issued country via https://stripe.com/docs/api/payment_methods/object#payment_method_object-card-country , but of course to do that you have to create a PaymentMethod object, which means you already have to have picked a Stripe account; and then if that was not the right account, you have to ask the customer for their card again to create a new PaymentMethod.

upper aspen
#

right that was gonna be my follow up

#

ok i see

#

thanks for the info!

green egret
#

technically the cloning solution works but the problem you'll have is getting this integration to work is really hard if you don't know Stripe really well already. For example getting the PaymentMethod before confirming a PaymentIntent is quite hard(we've traditionally designed that to be impossible since you should do client-side confirmation), and while we released a new flow this month(https://stripe.com/docs/payments/accept-a-payment-deferred) that is designed to help with that use case, it's not available in our mobile SDKs yet and you say you're using RN. There's also all sorts of problem with re-initialising the global stripe.js objects with a different Stripe account, and the same with re-initialising things like the <StripeProvider> in the RN library; this is overall not a well-trod path.

#

so if it were me I'd really just ask the customer upfront some information to determine which entity you want to charge them with and then redirect to the payment page initialised with the credentials of the chosen account, it's the easiest option.

upper aspen
#

Ok I will do that

#

we generally want the server to capture the payment intent after we have just confirmed it on the client side

#

So i think what we will do is ask the customer, then if all goes well after they submit their info, we capture serverside

#

thank you for your help!

gleaming cosmosBOT