#mmilleruva
1 messages · Page 1 of 1 (latest)
Hi there
So the only thing you are missing from the above to actually create a charge attempt is confirm: true
When you are charging saved cards it is up to you to build your UI
For instance, Payment Element will not display saved cards.
We are working on supporting that in the future, but don't currently.
You also want to remove setup_future_usage from the above request if you have already set up the PaymentMehtod in the past.
Got it, and when confirm:true , It seems like the payment is processed as soon as my server creates the intent?
Correct
You could also confirm via a separate server-side request if you want.
Or a client-side request using Stripe.JS if you pass the PaymentMethod and client_secret to the frontend and use confirmCardPayment
Up to you really
But cleanest way is to just create/confirm on your server in one request
If I pass the payment method to the frontend, how do I put that into the stripe.confirmPayment call?
You would use stripe.confirmCardPayment() instead: https://stripe.com/docs/js/payment_intents/confirm_card_payment#stripe_confirm_card_payment-existing
Ah I see, Looks like it is a different method stripe.confirmCardPayment
But like I said, much simpler to just confirm on the backend
👍 , Thank you
Will Stripe remove expired cards or cards that can't be processed from the list of saved payment methods?
No we don't detach PaymentMethods from your Customers from our side