#Jkas
1 messages ยท Page 1 of 1 (latest)
Hello ๐
I believe you should be able to by calling the API and updating default_source on the customer
https://stripe.com/docs/api/customers/object#customer_object-default_source
Ah you meant using the dashboard..
I'm trying to test the behavior of when Stripe automatically updates a customer's source - I forget where that's mentioned in the docs - but we're handling customer.source.updated events for even old, inactive customers with expired CCs due to these automatic customer source updates on Stripe's side. Can you help point out the doc that talks about this behavior?
Ah I think you're referring to automatic card updates!
https://stripe.com/docs/saving-cards#automatic-card-updates
It triggers payment_method.automatically_updated event instead
https://stripe.com/docs/api/events/types#event_types-payment_method.automatically_updated
Unfortunately there's no way to trigger this event via the dashboard OR the API
Hmm. That's interesting. I thought I saw them coming in as customer.source.updated events. Let me try to find an example in production.
๐
Interesting.. looking into it..
Thanks!
Ah I think it was triggered due to this underlying event where card was automatically updated
https://dashboard.stripe.com/events/evt_1MumgLEkTO8kaKcKAd43EaOl
That's correct, that's the automatic update event I was originally talking about. These are happening all the time, even for inactive customers.
I just wrote some code to better handle these type of events on our end. But I'm unsure how to trigger one in test mode to manually test it.
When I update a default payment on a customer in the UI it triggers a source.updated event instead.
I see. Yeah unfortunately, there's no way to trigger these underlying *,automatically_updated events.
You can trigger customer.source.updated events by updating the source on the customer but its shape might be a bit different than what you'd see with Stripe updating payment methods automatically.
So they're no way for me to test trigger the automatic update from Stripe?
Unfortunately, not at the moment ๐ฆ
Ok. Thanks for letting me know!
NP! ๐ Happy to help
Can you point me to the docs that discuss this event?
Apparently it's confusing for many of us ๐ I'd like to read up on why these automatic updates are happening and how it's triggering the customer.source.updated event.
I'd at least like to include a link to those docs where we're handling thse in our code.
Its the same link as I shared earlier
https://stripe.com/docs/saving-cards#automatic-card-updates
We deprecated payment_method.card_automatically_updated in favor of payment_method.automatically_updated in newer API version
https://stripe.com/docs/upgrades#:~:text=Deprecate the payment_method.card_automatically_updated webhook in favor of payment_method.automatically_updated
But since your account is on an older API version, you're receiving payment_method.card_automatically_updated instead
I see, thanks!
NP!
I have what I need - have a great day!