I have stripe elements code for subscription that follows this. https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements
The non 3ds credit cards work successfully. ie. 4242 4242 4242 4242.
Problem
for the 3ds case, I use the test card 4000000000003220 via here https://stripe.com/docs/payments/3d-secure/authentication-flow#three-ds-cards
- i create a subscription. a.k.a. backend
stripe_client().Subscription.create()function. - read the payment intent(via stripe dashboard) status = Payment started.
- I fill in the 3ds test card info.
<form><PaymentElements />... - Press Subscribe. a.k.a.
stripe.confirmPayment()function. - read the payment intent(via stripe dashboard) status = 3D Secure attempt failed The customer failed 3D Secure authentication.
- the 3d secure popup test window comes up. I did not press
CompleteorFail.
how is the payment intent failed 3ds even before the popup window for 3ds to perform happen?

Did you click on the cancel button on the top of the 3DS pop-up modal? If you did, it's also considered as a failed 3DS attempt.