#TuanPham

1 messages · Page 1 of 1 (latest)

languid quiver
#

do you have the request ID req_xxx from the error message?

burnt quail
#

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

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

burnt quail
#

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 ?

languid quiver
#

indeed

burnt quail
#

it's so strange

#

here is my confirmPayment

#

const result = await confirmPayment(
paymentIntentClientSecret,
{
type: "Card",
paymentMethodId: newPaymentMethod,
setup_future_usage: "off_session",
},
{
stripeAccount: stripeAccountId,
}
);

languid quiver
#

maybe stripeAccountId is null, you should check that

burnt quail
#

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

languid quiver
#

not sure, this can only fail if you're not using the right StripeAccount value

burnt quail
#

hmm, let me check one more time

hard marlin
#

👋 taking over for my colleague. Let me know if there's any follow-up Qs I can answer!

burnt quail
#

yup, I just check with your colleague idea

hard marlin
#

yes take your time

burnt quail
#

hmm, It is still the same.

hard marlin
#

do you have the request id that's failing?

burnt quail
#

sure

hard marlin
burnt quail
#

req_4ePOdCNNoApJcX

#

I already checked in the dashboard and I saw there was a payment intent with that not found id ( pi_3LVYaI2XVhDabw2S0JeP7rAt )

languid quiver
#

it's the same error really, as I said earlier you must not be passing StripeAccount properly.

burnt quail
#

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 ?

languid quiver
#

isn't initStripe for our React-js library and not our React Native library?

#

I think you're mixing them up possibly

burnt quail
#

I'm using the package named stripe/stripe-react-native.

languid quiver
#

initStripe(key, accountId)

burnt quail
#

yup, I set it like

#

await initStripe({
publishableKey: Config.STRIPE_PUBLISH_KEY,
urlScheme: Config.URL_SCHEME,
stripeAccountId,
});

languid quiver
#

why not do stripeAccountId:stripeAccountId so you're sure it's passing to the right option?

burnt quail
#

hmm , cool

languid quiver
#

like maybe the string you pass is getting set to something unrelated like merchantIdentifier since you don't name the arugment

burnt quail
#

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

languid quiver
#

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

burnt quail
#

Yup