#teriyaki229
1 messages · Page 1 of 1 (latest)
Hello! When your customer adds a new card to replace their old one you need to set it as the default_payment_method on the Subscription: https://stripe.com/docs/api/subscriptions/update#update_subscription-default_payment_method
currently the customer changes/adds new card on the stripe billing portal. How do i incorporate these changes with that in mind?
Also in the billing portal it shows that the default payment method is set to the new added card but still the field returns as empty with the subscription
The portal is setting the default at the Customer level, not at the Subscription level.
You would need to listen for Events using a Webhook Endpoint and update the Subscriptions when a new Payment Method is added.
interesting
can you point me to the required documentation for this?
Which documentation do you want exactly? How to listen for Events with a Webhook Endpoint?
That would be here: https://stripe.com/docs/webhooks
I'll let you know if i encounter any issues
Sounds good!