#TuanPham-payment-intent

1 messages ยท Page 1 of 1 (latest)

karmic hound
austere trellis
#

Hi, it is
req_dwtrmTYcoBJhZp

austere trellis
#

Hi, just checking you are still here ?

karmic hound
#

sorry! discord is busy at the moment

#

looking into it now

austere trellis
#

it's ok, take your time

karmic hound
#

pi_3LOFLk2XG6TkfKUb1C5YdDqh is created on account acct_1LODXC2XG6TkfKUb, but you used it in acct_1Kbju8FTrOem3yhG in this request instead

#

it looks like your SDK uses key from a different account

austere trellis
#

u mean , maybe the public key in my app or back-end is different , right ?

karmic hound
#

yup! they belong to different accounts

austere trellis
#

๐Ÿ‘€ hmm, I will take a look at it

karmic hound
#

i double check and pi_3LOFLk2XG6TkfKUb1C5YdDqh was created with platform key with Stripe-Account header, so the Payment Intent stays in connected account. In req_dwtrmTYcoBJhZp, it confirmed the Payment Intent directly using platform key (without Stripe-Account header), so the request can't find Payment Intent in the platform

#

Which client library are you using?

austere trellis
#

hmm

#

I use stripe-react-native

#

I just change from the old keypair, already delete the old accounts and create a new one , new product => Then, I got this error

karmic hound
#

Yup, it looks like it's due to Stripe-Account header since you use direct charges

#

let me check how to confirm payment with Stripe-Account header in react-native library

austere trellis
#

okay. It's just so weird to me because before I change the keypair, I still use it normally

karmic hound
#

did it work before?

austere trellis
#

yes

karmic hound
#

could you share the working Payment Intent?

austere trellis
#

you mean from the old keypair ?

karmic hound
#

yup!

austere trellis
#

pi_3LKzLr2ELzgUanaa1R5VbUMz

#

this is one of them

#

don't know why but I still create subscription with the new keypair

#

maybe because the payment intent is created from the subscription

karmic hound
#

oh! pi_3LKzLr2ELzgUanaa1R5VbUMz is correctly confirmed via Stripe-Account header

austere trellis
#

yup

#

It can come to the function confirmPayment and then return error no such payment intent

#

What confused me was when I check it in connect account payments , I see the payment intent id which the error returns, still appear here

#

๐Ÿ˜…

karmic hound
#

Can you share the code where you confirm the payment, including StripeProvider?

#

From the error, it looks like the confirmPayment doesn't have Stripe-Account for connected account in the header, which supposed to be set in stripeAccountId in StripeProvider

austere trellis
#

okay

#

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

#

this is my function confirmPayment

#

hey, i just found something

#

My steps before were

#

create a stripe account but when I login it says I already have saved data with this email => so, I create with that information

#

=> Is this information relate to my old keypair account platform ?

#

I have just created a new one which is completely new account => after finish the setup, I create a product => Then, I buy it => It works ( currently, the new keypair )

karmic hound
#

Can you share the new PI that works?

austere trellis
#

pi_3LOHBN2XVhDabw2S138ZuhRX

karmic hound
#

Did you change any code at client?

austere trellis
#

no

karmic hound
#

This looks working perfectly fine

austere trellis
#

yup

karmic hound
#

The confirm call picks up the stripe account header correctly

austere trellis
#

yup, as it should be

#

i'm sorry but I did not find anything different in my codes...

karmic hound
#

That's strange, but glad that it works now

austere trellis
#

๐Ÿ‘ yup, hope it won't die next time ...

#

btw, can you keep this thread open for a while

#

I think I should self check one more time to make sure everytime alright