#ibgoldbergs-subscription-failedpayments

1 messages ยท Page 1 of 1 (latest)

blazing kestrelBOT
cedar gyro
#

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.

glacial wing
#

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?

cedar gyro
#

If you want to wait until the Invoice is generated to check for this, then yes that will work.

glacial wing
#

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.

cedar gyro
#

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.

glacial wing
#

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"

cedar gyro
#

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)

glacial wing
#

Yeah makes sense. Thanks for the feedback

glacial wing
#

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?

blazing kestrelBOT
cedar gyro
#

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.

glacial wing
#

ok thanks i think that answers my questions for now. super helpful convo

marble rose
#

ibgoldbergs-subscription-failedpayments

#

Glad to hear this resolved all your questions! I'm taking over for toby so I'm going to archive this thread but if you have follow up questions please ask in #dev-help and we'd be happy to help ๐Ÿ™‚