#Naveed | Web3Auth

1 messages · Page 1 of 1 (latest)

fiery torrentBOT
strong skiff
#

Hi there!

#

So when I tried to simply run the confirmPayment function above again it doesn't work.
Can you clarify what you mean by "it didn't work"? Can you share the request ID (req_xxx)? You can find it here https://dashboard.stripe.com/test/logs

manic lance
#
  1. 1st time clicking confirm and 3d secure pops up but i purposely fail it req_LSha6nxRnRTUtw

  2. 2nd time clicking confirm but error req_YTXQooKNvB00Ar

strong skiff
#

I think the error message is pretty clear:

You cannot confirm this PaymentIntent because it's missing a payment method.

#

If the PaymentIntent is requires_payment_method, you need to collect a payment method first

manic lance
#

But i do have a payment method with which i am confirming the intent

#

i mean this error is only coming up when i fail the 3d secure on purpose

#

and then try it again

#

but if i simply went for confirming it and suceeding in the 3d secure itd go ahead as expected

strong skiff
#

Are you using the Payment Element? If so the flow should look like this:

  • Customer submit the form
  • The 3DS popup appears
  • The fail the 3DS flow
  • The Payment Element is still displayed with their card information <= this step is important, since the PaymentIntent needs a payment method
  • You confirm the PaymentIntent
  • The 3DS popup appears
manic lance
#

in my case I do not need to show the payment element to input card details

#

because the subcription charges default payment method, in this case its already available for the customer

#

so thats why all im doing is confirming payment and passing the client secret which is from the incomplete subscriptions invoice payment intent

strong skiff
manic lance
#

so how come in the beginning i dont need to do this

#

but only upon failing 3d secure and trying again i need to do it

strong skiff
#

Because, like you said at the beginning, after 3DS fails the PaymentIntent status is requires_payment_method. And as its name implies, it needs a PaymentMethod.

fiery torrentBOT
manic lance
#

in the stripe js function confirmPayment

coral cedar
#

Hey, taking over here. Let me know if there's any follow-up Qs I can answer!