#tal.arbetov
1 messages · Page 1 of 1 (latest)
let me take a look
we're using setup_intent to generate the payment, will it help?
pi_3MTOoeDcjknP7llF04ulNYU0
That error is expected:
- you created a subscription with
payment_behavior: "error_if_incomplete" - the payment required 3DS, so it failed
- which means the subscription creation failed
We recommend to follow this flow to create subscripitons, which will avoid this issue:
https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements
right, I'm using err_if_incomplete to make sure the subscription will not be created if the invoice is not paid/payment fails
the payment does require 3DS, when the CC is entered in the client side, Stripe opens an iframe with 3DS authentication
even though I complete the 3DS authentication, for some reason the payment is not marked as complete, and 'more action required'
for the record, i'm using the 3DS2 testing card 4000000000003220
the payment does require 3DS, when the CC is entered in the client side, Stripe opens an iframe with 3DS authentication
When does that happen? After you created the subscription? Or before when you used a SetupIntent to save the card?
after filling the credit card + exp + cvv input, stripe sends a request to confirm the setup intent, the response includes the setup intent client secret and a statue = 'requires_action'
after this we send the request to https://api.stripe.com/v1/3ds2/authenticate
the 3DS authentication iframe opens up, and the user completes the authentication, in turn the request to https://api.stripe.com/v1/3ds2/challenge_complete is being made
at this point, we fetch the setup intent once more, and the status received is 'succeded'
after this I'd expect the invoice to require no additional action, but when I press the confirm payment button, it fails with the error mentioned above 'subscription_payment_intent_requires_action'
I'm sorry but your integration is wrong on many different levels. What you should do instead is read the doc I shared earlier. At a hight level:
- First create the subscription with
payment_behavior: 'default_incomplete' - Retrieve the
latest_invoice.payment_intent.client_secretfrom the subscription - Send the client secret to the frontend to collect the payment information
- If 3DS is requires, there will be a popup to go thought the 3DS flow
- Then the subscription will become active
thanks, i'll take a look at the document