#Parth R. Jangid (Pseudo Bugs)

1 messages · Page 1 of 1 (latest)

thin mountainBOT
torn nebula
#

I think yes, but you could play with the parameters on Test mode and see!

marsh spindle
#

I see but then if it attaches the paymentMethod to that customer is there a way to retrieve that paymentMethod's id? Like I am trying to save card details so instead of using SetUpIntent I am considering to just set setup_future_usage. Is this a bad idea?

torn nebula
#

Not really a bad idea, just different. SetupIntent will save card without charging customer. setup_future_usage is to save card details after you actually charge for something

marsh spindle
#

So once the user is charged and now that paymentMethod is attached to that customer. Is there a way to actually retrieve the PaymentMethod's Id? I am asking this because I want to keep track of this and store it in my database

torn nebula
#

Yes, on the webhook event payment_intent.succeeded you should have the Payment Method Id

marsh spindle
#

oh. I don't have knowledge about web hooks but I will look into that. Thanks!
Just one last question do you know of any other alternate to web hooks?

torn nebula
#

You can for example list all the PaymentMethod of that Customers. But it will be tricky if your customer has 100 successful saved card and you don't know which specific card to use

marsh spindle
#

Hmm. Got it. Thanks for the help!