You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The [entitlement migration](#DOCS_CHANGE_LOG/premium-apps-entitlement-migration-and-new-subscription-api) which began on **October 1, 2024**, has been successfully completed as of **November 1, 2024**.
9
+
10
+
### What's Changed
11
+
12
+
- The documentation has been updated to reflect the new entitlement system as the standard behavior.
13
+
-`ENTITLEMENT_UPDATE` event for subscription-related entitlements now only occur when the subscription ends.
14
+
- The `ends_at` value on the [entitlement object](#DOCS_RESOURCES_ENTITLEMENT/entitlement-object) is now set when the subscription ends.
15
+
- To determine when a subscription was canceled, listen for `SUBSCRIPTION_UPDATE` events or use the [Subscription API](#DOCS_RESOURCES_SUBSCRIPTION) to retrieve the subscription's `status` and `canceled_at` timestamp.
16
+
17
+
For more details about the migration process, please refer to the [migration guide](#DOCS_CHANGE_LOG/updates-to-entitlement-migration-guide).
Copy file name to clipboardExpand all lines: docs/events/Gateway_Events.mdx
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -587,18 +587,19 @@ Sent when a message is pinned or unpinned in a text channel. This is not sent wh
587
587
588
588
#### Entitlement Create
589
589
590
+
> warn
591
+
> Note: The`ENTITLEMENT_CREATE` event behavior changed on October 1, 2024. Please see the [Change Log and Entitlement Migration Guide](#DOCS_CHANGE_LOG/premium-apps-entitlement-migration-and-new-subscription-api) for more information on what changed.
592
+
590
593
Sent when an entitlement is created. The inner payload is an [entitlement](#DOCS_RESOURCES_ENTITLEMENT/entitlement-object) object.
591
594
592
595
#### Entitlement Update
593
596
594
-
> danger
595
-
> Starting on October 1, 2024, the `ENTITLEMENT_UPDATE` event behavior will be changing. You will no longer receive an `ENTITLEMENT_UPDATE` event on successful renewal When a user cancels, you will receive an `ENTITLEMENT_UPDATE` events with an `ends_at` value when the subscription ends. See the [Change Log and Entitlement Migration Guide](#DOCS_CHANGE_LOG/premium-apps-entitlement-migration-and-new-subscription-api) for more information.
597
+
> warn
598
+
> Note: The`ENTITLEMENT_UPDATE` event behavior changed on October 1, 2024. Please see the [Change Log and Entitlement Migration Guide](#DOCS_CHANGE_LOG/premium-apps-entitlement-migration-and-new-subscription-api) for more information on what changed.
596
599
597
600
Sent when an entitlement is updated. The inner payload is an [entitlement](#DOCS_RESOURCES_ENTITLEMENT/entitlement-object) object.
598
601
599
-
For subscription entitlements, when a user's subscription is renewed you will receive an `ENTITLEMENT_UPDATE` event with a new `ends_at` date that reflects the end of the new billing period.
600
-
601
-
If a user cancels their subscription, you will stop receiving `ENTITLEMENT_UPDATE` events that update the `ends_at` value.
602
+
For subscription entitlements, this event is triggered only when a user's subscription ends, providing an `ends_at` timestamp that indicates the end of the entitlement.
Copy file name to clipboardExpand all lines: docs/monetization/Implementing_App_Subscriptions.mdx
+5-27Lines changed: 5 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,18 +18,6 @@ When creating subscriptions, you will need to choose between user or guild subsc
18
18
19
19
## How App Subscriptions Work
20
20
21
-
> danger
22
-
> **Starting on October 1st, 2024**, the`ENTITLEMENT_CREATE` and `ENTITLEMENT_UPDATE` event behavior described below is changing. Please see the [Change Log and Entitlement Migration Guide](#DOCS_CHANGE_LOG/premium-apps-entitlement-migration-and-new-subscription-api) for more information on what is changing and how to prepare.
23
-
24
-
- When a user purchases your subscription SKU, Discord creates an [Entitlement](#DOCS_RESOURCES_ENTITLEMENT) for the user (or guild) and that specific Subscription [SKU](#DOCS_RESOURCES_SKU).
25
-
- You will receive an `ENTITLEMENT_CREATE` event via the Gateway.
26
-
- This entitlement will be available via the `LIST Entitlements` API endpoint.
27
-
- This entitlement will be available on `Interaction Payloads` initiated from the entitled user or users in a guild (for guild subscriptions).
28
-
- This subscription will be available via the `LIST Subscriptions` API endpoint.
29
-
- This entitlement is granted and updated with a new `ends_at` date for each succesful billing interval until the user decides to cancel their subscription.
30
-
- When a user cancels their subscription, you will **not** receive an `ENTITLEMENT_UPDATE` with a new `ends_at` value, the entitlement will just expire at the current `ends_at` value.
31
-
32
-
<Collapsibletitle="How App Subscriptions Work - Starting October 1st, 2024"icon="warning">
33
21
- When a user purchases your subscription SKU, Discord creates an [Entitlement](#DOCS_RESOURCES_ENTITLEMENT) for the user (or guild) and that specific Subscription [SKU](#DOCS_RESOURCES_SKU).
34
22
- You will receive an `ENTITLEMENT_CREATE` event via the Gateway.
35
23
- This entitlement will be available via the `LIST Entitlements` API endpoint.
@@ -39,8 +27,6 @@ When creating subscriptions, you will need to choose between user or guild subsc
39
27
- When a user cancels their subscription, your app will not receive any entitlement events.
40
28
- When a subscription ends, the entitlement to the subscription will end. Developers will receive an `ENTITLEMENT_UPDATE` event with an `ends_at` timestamp indicating when the subscription ended.
41
29
42
-
Please see the [Change Log and Entitlement Migration Guide](#DOCS_CHANGE_LOG/premium-apps-entitlement-migration-and-new-subscription-api) for more information on what is changing and how to prepare.
43
-
44
30
### Using Subscription Events for the Subscription Lifecycle
45
31
46
32
Because entitlements are granted indefinitely and don't update on renewal or cancellation, you can use subscription events to track the lifecycle of a subscription.
@@ -57,32 +43,24 @@ Because entitlements are granted indefinitely and don't update on renewal or can
57
43
|`SUBSCRIPTION_UPDATE`| Subscription ends |`status` is `2 (inactive)`, this event is processed asynchronously and will not be immediate |
58
44
|`SUBSCRIPTION_UPDATE`| Subscription is resumed/uncanceled by user |`status` is `0 (active)`|
59
45
60
-
> info
61
-
> These docs will be incorporated into the main documentation on November 1, 2024.
62
-
63
-
</Collapsible>
64
-
65
46
---
66
47
67
48
## Working with Entitlements
68
49
69
-
When a user purchases a subscription, an entitlement is created. [Entitlements](#DOCS_RESOURCES_ENTITLEMENT) represent the user's access to your consumable or durable item.
50
+
When a user purchases a subscription, an entitlement is created. [Entitlements](#DOCS_RESOURCES_ENTITLEMENT) represent the user's access to your app's premium features.
70
51
71
-
Depending on your app's features, you can use a combination of [Gateway events](#DOCS_EVENTS_GATEWAY_EVENTS/entitlements), the [Entitlement HTTP API](#DOCS_RESOURCES_ENTITLEMENT), and [interaction payloads](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING) to keep track of user and guild entitlements and grant perks to users who have subscribed to your app.
52
+
Depending on your app's features, you can use a combination of [Gateway events](#DOCS_EVENTS_GATEWAY_EVENTS/entitlements), the [Entitlement HTTP API](#DOCS_RESOURCES_ENTITLEMENT), and [interaction payloads](#DOCS_INTERACTIONS_RECEIVING_AND_RESPONDING) to keep track of user and guild entitlements and grant features to users who are subscribed to your app.
72
53
73
54
### Accessing Entitlements with Gateway Events
74
55
75
-
> danger
76
-
> **Starting on October 1, 2024**, the `ENTITLEMENT_CREATE` and `ENTITLEMENT_UPDATE` event behavior described below is changing. Please see the [Change Log and Entitlement Migration Guide](#DOCS_CHANGE_LOG/premium-apps-entitlement-migration-and-new-subscription-api) for more information on what is changing and how to prepare. The docs will be updated on November 1, 2024 to reflect the new behavior.
77
-
78
-
When users subscribe or renew a subscription with your app, Discord will emit [Entitlement Gateway events](#DOCS_EVENTS_GATEWAY_EVENTS/entitlements).
56
+
When users make a purchase in your app, Discord will emit [Entitlement Gateway events](#DOCS_EVENTS_GATEWAY_EVENTS/entitlements).
79
57
80
58
For subscription SKUs, you will receive the following entitlement events:
|`ENTITLEMENT_CREATE`| When a user is granted an entitlement to your app's subscription SKU |
85
-
|`ENTITLEMENT_UPDATE`| When a subscription is resumed, renewed, or canceled|
63
+
|`ENTITLEMENT_UPDATE`| When a subscription ends |
86
64
|`ENTITLEMENT_DELETE`| When Discord refunds a subscription, removes an entitlement, or when a developer [deletes a Test Entitlement](#DOCS_RESOURCES_ENTITLEMENT/delete-test-entitlement)|
87
65
88
66
### Accessing Entitlements with the HTTP API
@@ -143,7 +121,7 @@ This method will not let you test out the full payment flow in Discord but will
143
121
144
122
If you'd like to test the full payment flow for your app, you can do so by interacting with your Store page or a [premium styled button](#DOCS_MONETIZATION_IMPLEMENTING_APP_SUBSCRIPTIONS/prompting-users-to-subscribe). Any team members associated with your app will automatically see a 100% discount on the price of the subscription, allowing you to purchase without the use of live payment method.
145
123
146
-
After checkout, you will have a live subscription that includes a `starts_at`and `ends_at` value. If you cancel this subscription, it will remain an active entitlement until the `ends_at` timestamp. This subscription will renew until canceled and can be used in testing subscription renewals in your app.
124
+
After checkout, you will have a live subscription. This subscription will renew until canceled and can be used in testing subscription renewals in your app. If you cancel this subscription, it will remain an active entitlement until the end of the subscription billing period, represented by the `period_ends_at` field on the [Subscription](#DOCS_RESOURCES_SUBSCRIPTION/subscription-object).
147
125
148
126
> info
149
127
> You can only delete entitlements created using the [create entitlement](#DOCS_RESOURCES_ENTITLEMENT/create-test-entitlement) endpoint. If you need to toggle access to your premium features during your development process, it is best to use Test Entitlements.
0 commit comments