Skip to content

Conversation

colinloretz
Copy link
Contributor

One-time purchases are here, along with Stores for Premium Apps.

  • New SKU Object Types
  • New Entitlement Object Types
  • Consume an Entitlement
  • consumed field on the Entitlement resource


## Consume an Entitlement % POST /applications/{application.id#DOCS_RESOURCES_APPLICATION/application-object}/entitlements/{entitlement.id#DOCS_MONETIZATION_ENTITLEMENTS/entitlement-object}/consume

For One-Time Purchase consumable SKUs, marks a given entitlement for the user as consumed. The entitlement will have `consumed: true` when using [List Entitlements](#DOCS_MONETIZATION_ENTITLEMENTS/list-entitlements).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does that fires any events? such as ENTITLEMENT_UPDATE?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will check on this!

@colinloretz colinloretz requested a review from shaydewael April 24, 2024 19:58
Comment on lines +5 to +8
- Create a SKU
- Add a SKU image and benefits
- Implement the SKU into your app
- Publish a SKU to your store view with the click of a button.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these sequential steps that need to be taken? should it be a numbered list instead of bulleted?

Developers now have the ability to set up a Store page in the Developer Portal. To set up your Premium App's Store view take the following steps:

- Create a SKU
- Add a SKU image and benefits
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +22 to +25
- SKU Image
- Name
- Product Description
- Price
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think this just can be inline—this is taking up a lot of vertical space and i dont think it needs to be—just "you can configure the SKU's name, image, description, and price" or something


## Publishing Your One-Time Purchases

Once you have configured your SKU, you can publish the SKU to either just the API or the API and your Store. Learn more about [Managing Your Store](#DOCS_MONETIZATION_MANAGING_YOUR_STORE) to curate what items you make available to your users.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if it's just published to the store, what does it mean for end users?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will revisit some of this with more detail after its live 😎

Comment on lines +39 to +41
- Working with Entitlements
- Handling Gateway Events for Entitlements
- Handling Entitlements for Consumable SKUs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Working with Entitlements
- Handling Gateway Events for Entitlements
- Handling Entitlements for Consumable SKUs
- Working with Entitlements
- Handling Gateway Events for Entitlements
- Handling Entitlements for Consumable SKUs


#### Entitlement HTTP Endpoints

For apps requiring background processing, keeping track of entitlements is essential. You can utilize the [List Entitlements](#DOCS_MONETIZATION_ENTITLEMENTS/list-entitlements) endpoint to list entitlements. Your app can filter entitlements by a specific user or set of SKUs by using the `?user_id=XYZ` or `?sku_ids=XYZ` query params.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For apps requiring background processing, keeping track of entitlements is essential. You can utilize the [List Entitlements](#DOCS_MONETIZATION_ENTITLEMENTS/list-entitlements) endpoint to list entitlements. Your app can filter entitlements by a specific user or set of SKUs by using the `?user_id=XYZ` or `?sku_ids=XYZ` query params.
For apps requiring background processing, keeping track of entitlements is essential. You can use the [List Entitlements](#DOCS_MONETIZATION_ENTITLEMENTS/list-entitlements) endpoint to list entitlements. Your app can filter entitlements by a specific user or set of SKUs by using the `?user_id=XYZ` or `?sku_ids=XYZ` query params.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this just be "the user_id and sku_id query params"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is user_id and sku_ids

@colinloretz colinloretz merged commit f0d1615 into discord:main Apr 24, 2024
KubaZ2 added a commit to NetCordDev/NetCord that referenced this pull request Apr 27, 2024
Nihlus added a commit to Remora/Remora.Discord that referenced this pull request Apr 29, 2024
shaydewael added a commit to Jupith/discord-api-docs that referenced this pull request May 14, 2024
)

* Added docs for One-Time Purchase + Store

* Update docs/monetization/One-Time_Purchases.md

Co-authored-by: shay <[email protected]>

* Update docs/Change_Log.md

Co-authored-by: shay <[email protected]>

* Update docs/monetization/Managing_Your_Store.md

Co-authored-by: shay <[email protected]>

* Update docs/monetization/One-Time_Purchases.md

Co-authored-by: shay <[email protected]>

---------

Co-authored-by: shay <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants