#mel_webhooks

1 messages · Page 1 of 1 (latest)

winter micaBOT
#

👋 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.

candid ruin
#

Hello there

#

Entitlements allow you to know if a Subscription is active or not.

candid crown
#

Ok, so an active entitlement means that the subcription it is associated with must be active?

candid ruin
#

Yes

candid crown
#

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.

candid ruin
#

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.

candid crown
#

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?

candid ruin
#

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.

candid crown
#

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.

candid ruin
#

Yes it should.

candid crown
#

Okay - thanks so much for your help ☺️

candid ruin
#

Sure thing!