#raju_42209
1 messages · Page 1 of 1 (latest)
👋 happy to help
yes you can use Payment Elements with both PaymentIntents and SetupIntents
the only difference would be in the confirmation function
in the first case you'd use confirmPayment whereas in the second you'd use confirmSetup
I have paymentIntent already. How can i use it for setupIntent? I mean, which method like update, retrieve etc I have to use in setupIntent?
Tarzan, I have already been to above link, where I can only see how to create setupIntent. but, my requirement is, how to use paymentIntentId with setupIntent, which setupintent method to be used to consume paymentIntent into setupIntent
that's not possible
you need to have 2 separate logics
depending on the choice of your users
so you meant, paymentIntentId cannot be used with setupIntent, right?
and wise-versa
correct, they are different object types.
Okay. Is there any way to accomplish above task like making payment using Payment Element and making payment using zero charge but save card-on-file?
above two tasks have to happened with paymetn element only
no, a PaymentIntent has a minumum amount, it can't be zero
you just have an if-statement somewhere and if the page is being visited with the intention of making a payment, you get a PaymentIntent from your backend and call confirmPayment , if it's being visited with the intention of saving a card, you get a SetupIntent from your backend and call confirmSetup