#Ian Kaplan-subscription-default-pm
1 messages · Page 1 of 1 (latest)
Hello! Is this a custom integration or are you using Checkout?
Sorry, you said Payment Element 🤦
If you want to set default_payment_method on the Subscription object, you'll need to do that manually: https://stripe.com/docs/billing/subscriptions/build-subscription?ui=elements#default-payment-method
ok do you recommend doing that on a webhook event?
Hmm, you could do. Just not sure which event would be best suited for that 🤔
Where you'd need both the Subscription object ID and the Payment Method object ID
I think that's likely why that document recommends doing to synchronously in your server-side code. There's likely not a single event that fits the requirements
found it. it says listen to the invoice.payment_succeeded event
Ha, not sure how I missed that 😆
hah
a
it would be nice when confirming a payment intent it set the default payment method if one didnt exist
my question would then be do you know what happens if a subscription invoice fails, my customer then confirms that paymentIntent with a different card to pay the invoice and restore the active subscription status, I assume the default_payment_method would not be changed and they would be charged on the bad card again the following month?
unless i set the default payment method again