#idhruv-setup-intents

1 messages · Page 1 of 1 (latest)

winter fog
blissful anvil
#

okay

#

so we are basically creating setup_intent and then retrieving payment_method from it, so is it correct to use payment_method retrieved from setup_intent

#

?

winter fog
#

Yes, exactly!

blissful anvil
#

ook

#

also, what can be an alternative for this code:

const resp = await stripe.confirmCardSetup(setupIntent, { payment_method: { card: this.card, }, });

we always create a setupIntent first and then pass that intent to this code which triggers 3ds authentication, and I want to eliminate this approach

#

so apparently we are creating setupIntents and then assigning paymentMethods first is to save a new card, but it completely jumbles up our workflow for 3DS as discussed in thread before

uneven grail
#

as I say yesterday you'd just create the PaymentIntent and use that instead

#

customer comes to your site and wants to pay —> generate a PaymentIntent on the backend, send it to the frontend and which displays our Elements frontend and calls confirmCardPayment when the user hits a button. If you create the PaymentIntent with the right fields then that function will present 3D Secure, charge the customer, and save the card to them for future use.