
The three pieces#
| Concept | What it represents |
|---|---|
| SKU | A specific item or subscription option your app offers |
| Entitlement | Whether a user has access to a given SKU |
| Subscription | An ongoing agreement to pay for an entitlement until canceled |
Your app never handles payment details. It creates SKUs, and then checks entitlements to decide what a given user may do.
Two kinds of SKU#
Gating a feature#
The pattern is the same in both cases: read the entitlements attached to the interaction, and branch.
- A user invokes a premium command or opens a premium part of your Activity
- Your app checks whether an entitlement for the relevant SKU is present
- Entitled users get the feature; everyone else gets a prompt to buy
Callback type PREMIUM_REQUIRED (10) is deprecated. Use the current premium button style rather than that callback type.
Next steps#
- Subscriptions — user and guild subscriptions
- One-time purchases — durable and consumable items
- Receiving and responding — where the entitlement check happens