I noticed your starter kit was missing two events that I've found necessary to have on my projectplannerai project:
invoice.payment_succeeded - this is sent after the initial payment but also future months when the subscription is renewed. checkout.session.completed is only called once after they first subscribe, so we can't depend on the subscription_end_date on just that event
customer.subscription.updated - this is called after stripe successfully updates the subscription object's subscription_end_date. The reason we want to listen for this is because the event has the latest version of the subscription in the event, so we can trust the end_date more so than invoice.payment_succeeded because sometimes when we fetch the subscription it'll have old data until it updates in the stripe database.
I noticed your starter kit was missing two events that I've found necessary to have on my projectplannerai project:
be sure to double check my logic
honestly, now that I look into other project examples, I think just listening for subscription.created / updated / deleted might be enough: https://github.com/vercel/nextjs-subscription-payments/blob/main/app/api/webhooks/route.ts