#umethi
1 messages · Page 1 of 1 (latest)
Hello!
@mild palm Please use the this thread I have open for you
You should be using default_payment_method. default_payment_method will take precedence over default_source (which is the older, legacy param we don't recommend using anymore) - we mention this in the API reference (https://stripe.com/docs/api/subscriptions/object#subscription_object-default_payment_method)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Thank you!
Are we able to test this in test mode with this default_payment_method key?
The cards I'm using in test mode always output the **default_source ** key
Yes, you should be able to use default_payment_method in test mode
When I'm updating a PAST_DUE subscription's payment method, the subscription.updated event's previous attributes only show default_source
Can you share one of those event IDs with me?
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Ah, you're doing this through the dashboard , not the API?
Correct through the Dashboard
I don't know the details of the dashboard logic (it sometimes uses default_payment_method and sometimes uses default_source)
Backing up for a second - what is your handler doing? Are you checking the customer.subscription.updated event to see if the default has been updated and then paying the invoice if it's been changed?
Gotcha - so then you need to be checking for ALL the places that can affect the default payment method/source
There's four (I know it's a lot):
default_payment_methodon the Subscriptiondefault_sourceon the Subscriptioninvoice_settings.default_payment_methodon the Customerdefault_sourceon the Customer