#mochi-defaultpm-subscription
1 messages ยท Page 1 of 1 (latest)
mochi-defaultpm-subscription
Hey @pastel temple try to provide actionable information all in one place. Also please don't share picture of codes, we're both developers, way easier to help you with real text
What I need for now is a clear example of an exact Subscription id sub_123 where it didn't work
sub_1MRjERBPM36OC3gXCk7z0ReI
thanks looking
it's all working totally fine
The screenshot you shared is for the Customer. The option you're using sets the default on the Subscription
if you look at that Subscription in the Dashboard it does have the right default
https://dashboard.stripe.com/test/events/evt_1MRjEdBPM36OC3gXiKC49A26 shows that default_payment_method is being set properly as expected too
so does that mean come next billing cycle it will use that card again?
also what if the customer has a default payment method which one is used?
so does that mean come next billing cycle it will use that card again?
the reason I ask is because i forgot to set this and for subscriptions that were renewing now all the payments failed.
so I've been manually setting the default payment on the customer to fix this
also is there any easier way then to do this manually?
The link I just gave above explains the priority and how it will work. So yes it will work for future invoices
And you can write a script that will list all your subscriptions and for each one properly set the right PaymentMethod as the default based on what you see on the Customer.
Or do this at the Customer level.
Does that make sense?
I'm looking at the pm api and I can fiind a method which takes customer id and returns their payment methods
Hi there ๐ taking over for @south isle
Is there a question that I'm overlooking here?
yea I was wondering how to get the payment methods for an existing customer
in all the api requests I have to pass in the pm
but I dont have a way of getting them
?
Taking a look now
I mean, you can get the Payment Methods vie the List Customer's PaymentMethods API: https://stripe.com/docs/api/payment_methods/customer_list
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.