> ## Documentation Index
> Fetch the complete documentation index at: https://docs.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](https://docs.xbox.com/reference/system/xstore/xstore_members.md) 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.

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](https://docs.xbox.com/publishing/xstore-commerce/xstore-mismatched-accounts.md) for more info.

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

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

## Apply game IDs to MicrosoftGameConfig

First, publish your game and add-ons on [Partner Center](https://docs.xbox.com/publishing/xstore-commerce/xstore-initial-configuration.md).

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**.

![Game setup > Identity details with Package/Identity/Name and Publisher circled](https://mintcdn.com/microsoft-4404708b/iADzli99B7EWodAv/images/xstore/identitydetails_appidentity.png?fit=max\&auto=format\&n=iADzli99B7EWodAv\&q=85\&s=f0f690902c8867bbae062a337589d182)

### StoreID

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

![Game setup > Identity details with StoreId circled in URL and on page](https://mintcdn.com/microsoft-4404708b/iADzli99B7EWodAv/images/xstore/identitydetails_storeid.png?fit=max\&auto=format\&n=iADzli99B7EWodAv\&q=85\&s=1902ced5d2643fa8c1de30281ef96723)

## Reference API documentation

* [XStore (API contents)](https://docs.xbox.com/reference/system/xstore/xstore_members.md)
  * Functions
    * [XStoreQueryGameLicenseAsync](https://docs.xbox.com/reference/system/xstore/xstore_members.md)

## See also

[Commerce Overview](https://docs.xbox.com/publishing/xstore-commerce/xstore-commerce-overview.md)

[Initial configuration in Partner Center](https://docs.xbox.com/publishing/xstore-commerce/xstore-initial-configuration.md)

[Enabling license testing](https://docs.xbox.com/publishing/xstore-commerce/xstore-licensing-setup.md)

[Switching sandboxes properly for Store operations](https://docs.xbox.com/publishing/xstore-commerce/xstore-switching-sandbox.md)

[XStore API reference](https://docs.xbox.com/reference/system/xstore/xstore_members.md)


## Related topics

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