#pavan-subscriptions
1 messages · Page 1 of 1 (latest)
@hardy quiver I don't really understand what you mean, since SetupIntents don't complete payments, they're for saving a payment method to the customer, not sure where you are bringing them in here.
the way it works with subscriptions if you create the Subscription, the first invoice has a PaymentIntent with a client_secret, as you said, and then you confirm that PaymentIntent on the frontend using Elements, which a)charges the card b) pays the invoice) c) attaches the payment method to the customer, all at once. No SetupIntent involved.
Update Subscription: 1. Collect quantities to update from frontend 2. Update subscription params in backend. 3. If payment details has to be updated then setupIntent is required to update payment. Similarly in creation flow to update payment method can i use setupIntent ?
if you're creating the subscription then you don't need to update the payment method, like I said, you use the Invoice's PaymentIntent with confirmCardPayment+Elements, it attaches the card to the customer. No SetupIntent involved.
That i agree. Is there any issue if i involve setupintent in that which attaches card to customer ?
there's no reason to use a SetupIntent here
If we use paymentIntent and complete payment step from frontend, will that card by default will be taken for deducting amount in recurring transaction ? Or should we update as default payment in webhooks ?
Or should we update as default payment in webhooks ?
yep you have to do that.
(that's the guide you should be following in general)
If we do this via SetupIntent, do we still need to do that ?
you would yes, Setup/PaymentIntents only attach the card, marking it as the default always has to be done separately
Hey what does setupIntent do in the background ?