#ibgoldbergs-subscription-failedpayments
1 messages ยท Page 1 of 1 (latest)
Hi ๐ if you're setting the default payment method at the Subscription level, and that is what is being changed, then I would recommend listening for customer.subscription.updated Events.
If the default payment method is instead being controlled at the Customer object level, I would suggest listening for customer.updated Events.
Thanks. Do you not think listening to invoice.created makes a bit more sense, and checking to see if a payment method is attached to the subscription?
If you want to wait until the Invoice is generated to check for this, then yes that will work.
So you're saying that if we listen to customer.subscription.updated and check for payment method removed, then we can get ahead of it and start a campaign to let them know way ahead of time.
Exactly, you can look for the default_payment_method field changing to a null or empty value, and then trigger your flows to prompt for a new payment method to be provided.
When will the subscription go from unpaid to some other status like incomplete expired?
I'm using a test clock and after going forward 5 months on a monthly subscription its still just "unpaid"
It won't go to incomplete_expired that state is reached when a Subscription is completed with an incomplete status initially, and then remains in that status for 23-24 hours. If you would rather have the Subscription be automatically canceled instead of going into an unpaid state, then you will want to change the settings in the manage failed payments section here to do so:
https://dashboard.stripe.com/settings/billing/automatic
(please note the settings on that page are global and will impact both live and test mode Subscriptions)
Yeah makes sense. Thanks for the feedback
Another question... does the system attempt to make a charge on an invoice if there is no payment method on file?
I see that there is an event on the invoice for "Payment failed", but would it hit the webhook event for failed charge?
I don't recall exactly offhand, and would recommend testing the flow with Test Clocks so you can see exactly what Events are triggered.
https://stripe.com/docs/billing/testing/test-clocks
I believe Charges aren't created when there isn't a Payment Method present to be charged, but may be mistaken.
ok thanks i think that answers my questions for now. super helpful convo