#sumit-subs-default-pm
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- sumit-customer-defaultpaymentmethod, 1 day ago, 19 messages
Hello 👋
How can I help?
I want to provide a functionality that customer can update his payment method any time he wants, So I have implemented the stripe apis for that create payment method and attach that payment method to the customer. One customer has subscription with card payment method and he updated his card details, but at the time of renewal it is taking older one card details i.e. the customer has used at the time of subscription.
how could this happens?
It depends on how the subscription was created as well as if you're setting the new payment method as the default one on customer under customer.invoice_settings.default_payment_method
yes, i did that also
If the subscription used customer's default payment method then you'd need to update the default payment method on the customer after you attach it by calling the Update Customer API
https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method
If the subscription had a payment method set on to itself (NOT using the default payment method on the customer) then you'd need to update the payment method on the subscription by calling update subscriptions API
https://stripe.com/docs/api/subscriptions/update#update_subscription-default_payment_method
does the above make sense @fallow raven ?
I want to keep default payment method at customer level only.
I don't understand what you mean by that.
Can you elaborate? Specific examples would help
sumit-subs-default-pm
I want to keep default payment method at customer level only not subscription level.
if I update the update the payment method and attach to customer then it should get applied for all subscription that the customer is having.
When you say update the payment method, how exactly do you do that?
By updating customer.invoice_settings.default_payment_method ??
yes
Okay, in that case any subscription that uses customer's default payment method should use the new payment method automatically
I already did the implementation as we discussed but it is not working as expected
Can you share an example subscription ID?