#mel_webhooks
1 messages · Page 1 of 1 (latest)
👋 Welcome to your new thread!
⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1342166677672169513
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Ok, so an active entitlement means that the subcription it is associated with must be active?
Yes
https://docs.stripe.com/billing/entitlements?dashboard-or-api=api&lang=node#entitlements
As long as a customer maintains an active subscription for a feature, they retain an active entitlement. Make sure you provision access in your system for any users entitled to this feature.
Gotcha!
So it sounds like I should be covered without needing to check the Subscription Status directly - I can just use the active_entitlements endpoint & webhook, plus checking that invoices are being paid to extend general customer access for that subscription.
Yeah I mean really you shouldn't even need to check invoice.paid unless they don't have an associated entitlement (maybe that is what you mean).
But yes, entitlements are meant to simplify the provisioning with Subscriptions.
Yeah, I was originally planning to just base all user access on active entitlements, but then I quite liked the example given in the docs for an approach that uses (and updates) access expiry date for access to our app as a whole, for monthly recurring subscriptions. It sounded a little more robust / intuitive?
Yep that makes sense -- if you want that then invoice.paid or customer.subscription.updated work as Events to listen to.
They accomplish the same thing really in that sense.
OK. If I did decide to only use Entitlements, when would the entitlements for an unpaid / cancelled subscription disappear / become inactive? We're using cancel_at_period_end, rather than instant cancel.
Yes it should.
To be 100% sure you should test this all out using Test Clocks: https://docs.stripe.com/billing/testing/test-clocks
Okay - thanks so much for your help ☺️
Sure thing!