#lerp

1 messages · Page 1 of 1 (latest)

empty isleBOT
empty hill
#

Hey there

#

It looks like an authentication_required decline when you attempt to charge the PaymentIntent off_session

#

You can test this easily by using the 4000002760003184 test card

obtuse blaze
#

Ok, so the payment intent will have an authentication_requiredstatus? How do we initiate a re-authorization once we have the user back on-platform?

empty hill
obtuse blaze
#

The client secret from the original setup intent?

empty hill
#

From the PaymentIntent

#

That is how you designate which PaymentIntent should be used

obtuse blaze
#

Ok. So first we fetch the payment intent using the client secret and payment method ID, and then we check for a requires_payment_methodstatus. Are there any other data points on the payment intent we should look at to determine if it's a 3DS reauthorization scenario?

empty hill
#

Well you don't really want to check for requires_payment_method as a status -- that is the base status for a PaymentIntent so it doesn't necessarily indicate that 3DS is required.

obtuse blaze
#

I see

empty hill
#

Which should be authentication_required

obtuse blaze
#

Cool that makes sense

#

Ok so we check that, and if 3DS is required we call confirmPayment on the client with the client secret and the payment method ID. That'll trigger another 3DS authorization flow, and if that is successful the payment will confirm and all will be well with the world. Sound about right?

empty hill
#

Yep

#

Recommend testing it out!

obtuse blaze
#

Groovy, we'll give that a try. Thanks bismarck!