#amankumar_24191
1 messages · Page 1 of 1 (latest)
👋 happy to help
Can't I call a function from confirm method, just like I am able to do it on a failed payment?
would you mind elaborating a bit more?
When someone clicks on pay after entering their details I want to attach the payment method to the customer so that I can charge them later
you should be using setup_future_usage then
this guide explains how
https://stripe.com/docs/payments/save-during-payment
I have already done that.
if you have and if you passed the customer ID when creating the payment then the payment method will be attached
It saves on the stripe side but I would the payment method id to make it default and charge again
then you need to run this in the webhooks
ok, thanks