#sumit-customer-defaultpaymentmethod
1 messages ยท Page 1 of 1 (latest)
Hi ๐
Do you have a question about integrating Stripe APIs?
I have questions on payment methods of customer
My requirement is e.g. one customer can subscribe for multiple products and on every checkout session page he/she can enter the card details, so I want to set default payment method for all subscription that he/she has subscribed.
What is stopping you from doing that?
how it will happen for all subscriptions that is already he/she subscribed and if I updated the customer payment method then also it should get applied there...
You would set the Customer's default_payment_method and that will be used by default for all existing Subscriptions
how it will happen on checkout session?
You cannot make this happen automatically with the Checkout Session. You will need to handle this in your server-side code
in webhook you mean?
As a response to a webhook is where I would recommend adding that logic, yes.
default_payment_method means default_source right?
No
then ??
If you are creating Payment Methods
Then you need to update the invoice_settings.default_payment_method here: https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method
ok. will check and apply.. Thanks
Happy to help ๐