I was wondering if there’s any best practice on updating a user’s claims based upon a monthly payment schedule and when the user decides to cancel.
A user signs up and gets on a recurring payment plan. Each month when the payment is auto-processed (thanks to stripe), it looks like you need to create an api endpoint for stripe to ping when payment has been successful.
When this is successful, you ensure the user’s claim is set to “active” (or whatever) and a update the end date in the db.
When a user cancels or payment unsuccessful, a stripe response is sent to your api endpoint to notify the system of cancellation and you update the claims, and db.
However, my question is, how do you keep that account active for only 6 more days if the user cancels on the 25th of the month? And how do you auto shut it down? A check at login?