#TuanPham
1 messages · Page 1 of 1 (latest)
Hi, just give me a minute to find it
here it is
req_pVXDrKTDDw2z3y
I just check in the dashboard, and figure out that there is a payment intent with this id : pi_3LVWPu2XVhDabw2S0bH3PvJb
One weird thing here is the next time I create a payment intent and attach this saved payment method with it . It works . Only the first time, I create the payment method and attach a payment intent with it .
Hi, just check if you are checking my request ? @languid quiver
ah sorry, forgot, looking now
it's because you created that PaymentIntent on a connected account but you didn't pass that account ID in your React Native app
https://stripe.com/docs/connect/authentication#adding-the-connected-account-id-to-a-client-side-application , React Native tab, you need to use your platform API key and the ID of the connected account(same way you pass the ID in the backend Node code).
You mean, the payment intent and payment method are also in my connect account and what I miss is not pass the connect account id to the confirmPayment, right ?
indeed
it's so strange
here is my confirmPayment
const result = await confirmPayment(
paymentIntentClientSecret,
{
type: "Card",
paymentMethodId: newPaymentMethod,
setup_future_usage: "off_session",
},
{
stripeAccount: stripeAccountId,
}
);
maybe stripeAccountId is null, you should check that
I have already added a check for it
and I found the stripeAccountId is acct_1LOGsD2XVhDabw2S
then it is able to call the confirmPayment
I found it weird because after the first time, I used saved payment method data
It works without any error
only the first time I create payment method and attach payment intent with it
not sure, this can only fail if you're not using the right StripeAccount value
hmm, let me check one more time
👋 taking over for my colleague. Let me know if there's any follow-up Qs I can answer!
yup, I just check with your colleague idea
yes take your time
hmm, It is still the same.
do you have the request id that's failing?
sure
here's how you can get one https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
req_4ePOdCNNoApJcX
I already checked in the dashboard and I saw there was a payment intent with that not found id ( pi_3LVYaI2XVhDabw2S0JeP7rAt )
it's the same error really, as I said earlier you must not be passing StripeAccount properly.
maybe make sure you set it globally in the StripeProvider component per the docs : https://stripe.com/docs/connect/authentication#adding-the-connected-account-id-to-a-client-side-application
it's weird . Because I still see the log and the stripe account .
hmm, I see the difference here
Any differences between StripeProvider and initStripe ?
isn't initStripe for our React-js library and not our React Native library?
I think you're mixing them up possibly
I'm using the package named stripe/stripe-react-native.
I also don't see that stripeAccount can be passed to confirmPayment in the RN library : https://stripe.dev/stripe-react-native/api-reference/index.html#confirmPayment , doesn't seem to be in the reference
cool then you want https://stripe.dev/stripe-react-native/api-reference/interfaces/InitStripeParams.html#stripeAccountId really
Documentation for @stripe/stripe-react-native
initStripe(key, accountId)
yup, I set it like
await initStripe({
publishableKey: Config.STRIPE_PUBLISH_KEY,
urlScheme: Config.URL_SCHEME,
stripeAccountId,
});
why not do stripeAccountId:stripeAccountId so you're sure it's passing to the right option?
hmm , cool
like maybe the string you pass is getting set to something unrelated like merchantIdentifier since you don't name the arugment
No, I already checked it, it is not null . If it is just test key, I can put a string which is not related to merchantIdentifier , right ?
What I found weird is that the second time, I use , I do not get that error
I don't really have an explanation I'm afraid, there must be something strange in your overall setup
I'd suggest doing a complete clean build and a new PaymentIntent and trying to clean things up a little
Yup