#jwerre
1 messages · Page 1 of 1 (latest)
That's happening when the subscription is created
How are you creating these and what are you trying to achieve?
Note that we now support you specifying when you want the new payment method to be saved as the subscription default payment method following payment:
https://stripe.com/docs/api/subscriptions/create#create_subscription-payment_settings-save_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.
So you might not need to do this manually at all
maybe invoice.payment_succeeded is better? I'm just setting the default payment method on the subscription.
Hopefully the above gives you exactly what you need to simplify and not worry about this