#Danik
1 messages · Page 1 of 1 (latest)
Hi there!
When you create the PaymentIntent, you can set setup_future_usage to be able to reuse the card later https://stripe.com/docs/api/payment_intents/create?lang=curl#create_payment_intent-setup_future_usage
No this not an option for me, because I create PaymentIntent -> elements.create("payment") -> then user can set checkbox "Save for future payments"
I create PaymentIntent before user can choose to save for Future payement or not
and I cannot show this checkbox before PaymentIntent, because user can choose something else beside card (iDeal, a wallet, etc)
I want to create setup_future_usage only after successful card payment, if he paid with wallet, then I don't neet to create it
When when the user check the box, you could:
- Update the PaymentIntent to include
setup_future_usage - And then refresh the Payment Element with https://stripe.com/docs/js/elements_object/fetch_updates
ok, I'll try it