4 years ago

Cashier - How to execute a function once, when account expires?

Posted 4 years ago by raphadko

I'm using Cashier on my application.

Cashier has a simple way of verifying if the user is subscribed:


Cashier stores on the users table a field "stripe_active" to check if the user has an active subscription. Now, I'm trying to do something kinda simple, but didn't find in the documentation.

When the user subscription expires, I want to run a function that will disable some stuff on his account and save it to the database. I don't want to check and run it at every login , I want it to fire only once, when the account expires.

Stripe has a webhook that does that when payment fails. But I did not find one when the account expires. Can someone help out?

Please sign in or create an account to participate in this conversation.