If you want to listen to specifically when a subscription ends you'd want the customer.subscription.deleted
event.
However it sounds like you instead want to downgrade your user to a free tier rather than cancel the subscription outright, in which case you'd want to listen to the customer.subscription.updated
event.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…