#Naveed | Web3Auth
1 messages · Page 1 of 1 (latest)
Hi there!
Can you share the ID (req_xxx) of the failing API request?
https://support.stripe.com/questions/finding-the-id-for-an-api-request
req_0PVnrT0U7D0jaZ
You are confirming a PaymentIntent without passing a PaymentMethod,
You cannot confirm this PaymentIntent because it's missing a payment method. To confirm the PaymentIntent with cus_NjGtshgBa6Ps8z, specify a payment method attached to this customer along with the customer ID.
Are you using Stripe Elements ?
Yes but in this case I am passing client secret directly because customer already has a default payment method
The confirm payment method can be used in both ways you can either pass the elements or the secret
You need to pass both the customerId and the PaymentMethod.
https://stripe.com/docs/js/payment_intents/confirm_payment here it mentions either elements or client secret
why is it that the first time i call the function it works as expected bringing up 3d secure pop up
and on the 3d secure i click on fail
Then i click on the button which calls the same function again
it should show 3d secure again but alas no
first request req_YHGCsgr3flLCeQ
second one req_0PVnrT0U7D0jaZ
if you have the customerId and the PaymentMethod Id, simply make a call to the confirm API :
https://stripe.com/docs/api/payment_intents/confirm
Let me check the two requests..
The issue is that when the first request attempt, the PaymentIntent's status become to requires_action. When you tried to confirm the PaymentIntent again, the PaymentIntent wasn't in a valid status. Try using this js function, when the PaymentIntent status in a requires_action and the customer want to reconfirm it again:
https://stripe.com/docs/js/payment_intents/handle_next_action
Oh wow great find
I’ll try it out tomorrow and open a new thread if I face any issues. Thanks 😊