#sumit-subs-default-pm

1 messages · Page 1 of 1 (latest)

broken elbowBOT
#

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.

silent condor
#

Hello 👋
How can I help?

fallow raven
#

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?

silent condor
#

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

fallow raven
#

yes, i did that also

silent condor
#

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 ?

fallow raven
#

I want to keep default payment method at customer level only.

silent condor
#

I don't understand what you mean by that.
Can you elaborate? Specific examples would help

broken elbowBOT
#

sumit-subs-default-pm

fallow raven
#

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.

silent condor
#

When you say update the payment method, how exactly do you do that?
By updating customer.invoice_settings.default_payment_method ??

fallow raven
#

yes

silent condor
#

Okay, in that case any subscription that uses customer's default payment method should use the new payment method automatically

fallow raven
#

I already did the implementation as we discussed but it is not working as expected

silent condor
#

Can you share an example subscription ID?