Client-side features
The GDK allows games to implement multiple types of in-game add-ons and product types such as consumables, durables (downloadable content), subscriptions, bundles, and trials. The XStore API set provides the needed functionality to query, advertise, and manage these products from the client side. For an example of a fully functional in-game store, see the GDK In-Game Store sample. The following articles under the Fundamentals section cover these APIs and scenarios:- Basic store operations - Query what is available to sell and what the user owns
- How to use a durable without a package - Using a durable that doesn’t have a separate download package.
- Manage and license downloadable content (DLC) - Using traditional durables with download packages.
- Consumable-based ecosystems - Setting up and configuring a consumable-based monetization model within your game.
- Implementing Trials for your game - Implementing a trial built into your game.
- Bundles and Season Passes - Using bundles and Season Passes to provide value and engagement to customers with your products.
- Product sharing model for games - The licensing model for GDK games on both XBOX Console and Windows PC and how sharing between users is applied.
Server-side features
The Microsoft Store Services that support the client side APIs and allow service-to-service calls are split into the following services:- Collections - Provides information on which products the user owns or is entitled to use and fulfills consumable products. Also can be used to detect Game Pass subscription status for authorized partners.
- Clawback - Allows partner services to detect and manage refunds issued to users for already fulfilled consumables.
- Purchase - Allows partner services to add free items to the user’s account.
- Recurrence - Provides detailed information on a user’s subscriptions and allows partner services to manage those subscriptions on behalf of the user.
Authenticating with the Microsoft Store Services
For detailed information on how to authenticate your service with the Microsoft Store Services see Requesting a User Store ID for service-to-service authentication.If you’re familiar with X-token authentication, the Collections service does support X-tokens.
Key information for developers who used the XDK
If you’re familiar with the commerce systems from the XDK, the following definitions should help guide you to what the equivalent GDK services are called- Inventory Service - The functionality of the XDK’s Inventory service (query ownership, fulfill consumables, etc.) is now handled by the Collections Service. This includes all server-to-server scenarios for validating ownership and consumable quantities. Although X-tokens used for Inventory work for calling Collections, we recommend that partners move to the Microsoft Entra ID and User Store ID token auth flow to use the expanded functionality of the Microsoft Store Services.
Example: https://collections.mp.microsoft.com/v8.0/collections/b2bLicensePreview - Inventory Client APIs - All client side functionality related to querying ownership of items are now handled through the XStore APIs.
Example: XStoreQueryEntitledProductsAsync returns the items that the current user is entitled to use at that moment. - Catalog Browse APIs - All client side functionality related to querying available products to purchase in-game are now handled through the XStore APIs. There’s no server-to-server option for querying available products to sell within your title.
Example: XStoreQueryAssociatedProductsAsync returns products that are able to be sold as part of an in-game store. - Trials and Licenses - All client side functionality related to trial licenses are now part of the XStore APIs. Example: XStoreQueryGameLicenseAsync returns the current game’s license info including any trial license info. For ability to validate a client side license on your own service see Using License Tokens to validate licensing on your services.
