capacitor-community / stripe

Stripe Mobile SDK wrapper for Capacitor
https://capacitor-community-stripe.netlify.app/
MIT License
196 stars 77 forks source link

Use Card Saved with Setup Intent for Later Payment #189

Closed briangitrepo closed 2 years ago

briangitrepo commented 2 years ago

I am using this plugin for my Ionic Capacitor App meant for iOS and Andrdoid. So far I have been able to succesfully save a customer's card to their stripe customer account using createPaymentFlow with a Setup Intent.

The idea is that a user will enter their credit card info when they register but not actually process a payment until later. How can I use the stored credit card to process a payment later without the user having to enter again their credit card information.

Should I use createPaymentSheet or createPaymentFlow? And how do I tell those methods to use the existing payment method stored for the stripe customer?

rdlabo commented 2 years ago

@briangitrepo Thanks for using this plugin, and feedback. At later payment, we may be able to implements only api implement:

https://stripe.com/docs/payments/save-and-reuse?platform=web#charge-saved-payment-method

If you have customer account and saving card information, you don't need this plugin. please try this. Thanks.

briangitrepo commented 2 years ago

@rdlabo Thank you for the quick response. I do need this plugin to save the card details, that's what I am doing currently. I am using the createPaymentFlow with a Setup Intent to save the card details. That part of the plugin is working correctly for me. So there is no way to use createPaymentFlow or createPaymentSheet with an existing payment method (previously saved card details)?

rdlabo commented 2 years ago

Stripe doesn't provide UI that select saved credit card UI. So you should provide select saved credit card UI, like amazon:

スクリーンショット 2022-06-10 午前9 20 24

Thanks.

briangitrepo commented 2 years ago

Thanks for the feedback, I found another way to do it.

paweuz commented 1 year ago

Thanks for the feedback, I found another way to do it.

Hi @briangitrepo Could you please share a solution you used? I'm using saved card ID when creating intent on server-side but Stripe plugin / SDK ignores it and pre-selects default card for that customer.

indraraj26 commented 1 year ago

Thanks for the feedback, I found another way to do it.

Can you share your way, I did it with setup intent but I do not get the option save card checkbox