> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Enabling XStore development and testing

> Set up your XBOX product for XStore API development and testing in a sandbox, including entitlement, licensing, and test account requirements.

Games use the [XStore APIs](/reference/system/xstore/xstore_members) to perform operations on the licenses and entitlements that are associated with your game and its related products (for example, add-ons). Many of the `XStore` operations manipulate information about your game managed by Microsoft Store services.

<Note>
  This page is substantially updated from previous versions.
</Note>

As of June 2023, most[\*](#exceptions) `XStore` API testing no longer requires setting up the build to be licensable (for example, contentIdOverride) and for each account to have an entitlement to the game.

When you're testing commerce in development sandboxes, all purchases on a single test account must be done in the same sandbox. Switching a test account to another sandbox and purchasing more items result in unexpected query results for the account in both sandboxes. This is because the licenses and information of a purchase are tied to the first sandbox the item was purchased in for a single account.

When testing commerce in development sandboxes on PC, make sure that the account signed into the Microsoft Store App and the XBOX app are the same. When in sandboxes, the credentials used for items in the Microsoft Store are tied to the XBOX account specifically. This is critical to ensure all operations interact with products published specifically to the active sandbox. See [Handling mismatched store account scenarios on PC](/publishing/xstore-commerce/xstore-mismatched-accounts) for more info.

In order to test most[\*](#exceptions) `XStore` API, ensure the game config contains the proper values derived from Partner Center.

<a id="exceptions" />

* **API related to licensing, such as [XStoreQueryGameLicenseAsync](/reference/system/xstore/xstore_members), will require a fully licensed context to function properly.** See [Enabling license testing](/publishing/xstore-commerce/xstore-licensing-setup) for complete details.

## Apply game IDs to MicrosoftGameConfig

First, publish your game and add-ons on [Partner Center](/publishing/xstore-commerce/xstore-initial-configuration).

Then in the game's config file ensure the values match your configured title:

```xml theme={null}
  <Identity
    Name="41336MicrosoftATG.InGameStoreXS"
    Publisher="CN=A4954634-DF4B-47C7-AB70-D3215D246AF1"
    Version="2023.5.5.0" />
  <StoreId>9NTL0QDWZ4FS</StoreId>
  <MSAAppId>000000004C2690C8</MSAAppId>
  <TitleId>62ab3c24</TitleId>
```

### Identity

Located in Partner Center under **Game setup > Identity details**.

On PC: Strictly required to match what is assigned to your game in Partner Center.

While it isn't required for console, it should be checked when a package is created for submission to Partner Center.

`Name` in the `Identity` node needs to match **Package/Identity/Name**; `Publisher` in the `Identity` node needs to match **Package/Identity/Publisher**.

<img src="https://mintcdn.com/microsoft-4404708b/iADzli99B7EWodAv/images/xstore/identitydetails_appidentity.png?fit=max&auto=format&n=iADzli99B7EWodAv&q=85&s=f0f690902c8867bbae062a337589d182" alt="Game setup > Identity details with Package/Identity/Name and Publisher circled" data-og-width="1124" width="1124" data-og-height="427" height="427" data-path="images/xstore/identitydetails_appidentity.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/microsoft-4404708b/iADzli99B7EWodAv/images/xstore/identitydetails_appidentity.png?w=280&fit=max&auto=format&n=iADzli99B7EWodAv&q=85&s=8e2ab6246d7c53aa58e9b5198c4a6357 280w, https://mintcdn.com/microsoft-4404708b/iADzli99B7EWodAv/images/xstore/identitydetails_appidentity.png?w=560&fit=max&auto=format&n=iADzli99B7EWodAv&q=85&s=73e8f4ac014c15e5ac6a2320c982b4fd 560w, https://mintcdn.com/microsoft-4404708b/iADzli99B7EWodAv/images/xstore/identitydetails_appidentity.png?w=840&fit=max&auto=format&n=iADzli99B7EWodAv&q=85&s=e8404c21a5aaf6dacb8652172c1664bf 840w, https://mintcdn.com/microsoft-4404708b/iADzli99B7EWodAv/images/xstore/identitydetails_appidentity.png?w=1100&fit=max&auto=format&n=iADzli99B7EWodAv&q=85&s=7f782bd5e9e6b087580e58f648e56d01 1100w, https://mintcdn.com/microsoft-4404708b/iADzli99B7EWodAv/images/xstore/identitydetails_appidentity.png?w=1650&fit=max&auto=format&n=iADzli99B7EWodAv&q=85&s=2f539bda98499c8d89efca0d31587749 1650w, https://mintcdn.com/microsoft-4404708b/iADzli99B7EWodAv/images/xstore/identitydetails_appidentity.png?w=2500&fit=max&auto=format&n=iADzli99B7EWodAv&q=85&s=d2a838a12cb667aa59f82014055d4bb1 2500w" />

### StoreID

Also found in **Game setup > Identity details**

<img src="https://mintcdn.com/microsoft-4404708b/iADzli99B7EWodAv/images/xstore/identitydetails_storeid.png?fit=max&auto=format&n=iADzli99B7EWodAv&q=85&s=1902ced5d2643fa8c1de30281ef96723" alt="Game setup > Identity details with StoreId circled in URL and on page" data-og-width="1146" width="1146" data-og-height="722" height="722" data-path="images/xstore/identitydetails_storeid.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/microsoft-4404708b/iADzli99B7EWodAv/images/xstore/identitydetails_storeid.png?w=280&fit=max&auto=format&n=iADzli99B7EWodAv&q=85&s=e1140c4882103ee1552f75fb24e8d816 280w, https://mintcdn.com/microsoft-4404708b/iADzli99B7EWodAv/images/xstore/identitydetails_storeid.png?w=560&fit=max&auto=format&n=iADzli99B7EWodAv&q=85&s=6a2b403d4302b0e1ae8cae6e4992cc91 560w, https://mintcdn.com/microsoft-4404708b/iADzli99B7EWodAv/images/xstore/identitydetails_storeid.png?w=840&fit=max&auto=format&n=iADzli99B7EWodAv&q=85&s=e5eaa6967e59ba7b648a91b25085e111 840w, https://mintcdn.com/microsoft-4404708b/iADzli99B7EWodAv/images/xstore/identitydetails_storeid.png?w=1100&fit=max&auto=format&n=iADzli99B7EWodAv&q=85&s=b38590d54bdb1bb89501e238dbfc8566 1100w, https://mintcdn.com/microsoft-4404708b/iADzli99B7EWodAv/images/xstore/identitydetails_storeid.png?w=1650&fit=max&auto=format&n=iADzli99B7EWodAv&q=85&s=05c68d0fb041e551eb789ee21d7030a6 1650w, https://mintcdn.com/microsoft-4404708b/iADzli99B7EWodAv/images/xstore/identitydetails_storeid.png?w=2500&fit=max&auto=format&n=iADzli99B7EWodAv&q=85&s=a3c17b86117be244a0687746e96b7f33 2500w" />

## Reference API documentation

* [XStore (API contents)](/reference/system/xstore/xstore_members)
  * Functions
    * [XStoreQueryGameLicenseAsync](/reference/system/xstore/xstore_members)

## See also

[Commerce Overview](/publishing/xstore-commerce/xstore-commerce-overview)

[Initial configuration in Partner Center](/publishing/xstore-commerce/xstore-initial-configuration)

[Enabling license testing](/publishing/xstore-commerce/xstore-licensing-setup)

[Switching sandboxes properly for Store operations](/publishing/xstore-commerce/xstore-switching-sandbox)

[XStore API reference](/reference/system/xstore/xstore_members)


## Related topics

- [Enabling licensing testing](/publishing/xstore-commerce/xstore-licensing-setup.md)
- [Troubleshooting XStore development](/publishing/xstore-commerce/xstore-troubleshooting.md)
- [XStoreQueryGameLicenseAsync](/reference/system/xstore/functions/xstorequerygamelicenseasync.md)
- [Implementing Trials for your game](/publishing/xstore-commerce/xstore-trials.md)
- [Basic store operations](/publishing/xstore-commerce/xstore-basic-operations.md)
