Virtual items
How it works
Virtual items are in-game items that users can purchase for real or virtual currency or receive as a bonus. They have no physical form and are used only within the game. Examples of virtual items include skins, potions, weapons, and other elements that affect gameplay or a character’s appearance.
Main features:
- Flexible pricing configuration:
- Setting a price for a single item in real and/or virtual currency.
- Creating free items.
- Automatic detection of the user’s country and currency.
- Availability configuration:
- Restricting item sales in specific region.
- Limiting the number of items available for purchase.
- Limiting the display time of items in the store.
- Configuring items that are not available for purchase. An item can be hidden from the catalog but still be available as part of a bundle or as a bonus for another item.
Virtual items can be created via Publisher Account, via API calls, or by importing a catalog.
This guide describes manual creation of virtual items and working with API calls. For detailed information about creating other item types, see the Items catalog section.
How to set up
Set up via Publisher Account
- In your project in Publisher Account, go to the Items catalog > All items section.
- Click Add and select Virtual item from the drop-down list.
- Specify the following parameters:
- Image (optional).
- SKU.
- One or several groups the item should belong to.
- Name.
- Description (optional).
- To configure how the virtual item is displayed in the store, select the appropriate status.
- Set prices or create a free item in the Paid or free field:
- To create a free item, select Free item.
- To set a price, select Paid item and specify the price in real currency. If needed, configure regional prices.
- To limit the number of items available for purchase, turn on the Limit number of times one user can buy this item toggle and enter the desired quantity.
- To configure how often the limit resets:
- From the drop-down list, select a period:
- Daily.
- Weekly.
- Monthly.
- Custom interval – this is calculated starting from the item’s display start date.
- No regular refresh.
- From the drop-down list, select a period:
- Set up the reset schedule based on the selected period.

- Configure a time limit for displaying the item (optional):
- In the Show item in store field, select Limited time.
- Specify the time zone and the beginning and the end of the period.
- If you don’t want to indicate the end of the item display period, check the No end date box.

- Configure attributes using one of the following methods (optional):
- Check the settings and click Create item.
Set up via API
To set up virtual items, you can use the calls from the Admin subsection in the Virtual items and currency group.
| Task | API call |
|---|---|
| Create a virtual item. | Create virtual item. |
| Get virtual item information. | Get virtual item. |
| Get a list of virtual items. | Get list of virtual items. |
| Get a list of virtual items by specified group. | In the Get list of virtual items by specified group external id API call pass the parameter external_id. |
| Get a list of virtual items by group for administration. | In the Get list of virtual items by specified group id API call pass the parameter group_id. |
| Update a virtual item. | Update virtual currency. |
| Delete a virtual item. | Delete virtual currency. |
| Limit the number of virtual items available for purchase. | In the Create virtual currency or Update virtual currency API calls pass the following parameters:
|
For more information about limits, see the following guides:
Display virtual items in store
The display of virtual items depends on how the catalog is implemented — through the site builder or via API.
Display via site builder
To display a virtual item on your website:
- In your project in Publisher Account, go to the Storefronts > Websites section.
- In the pane of the desired site, click Open Site Builder.
- In the Store block section, select Virtual items in the Item type field and select the item group you want to sell on the website in the Item group field.
- Set an item card layout.
- After making all necessary changes and preparing your website for launch:
- In the upper-right corner of the site builder, click Publish.
- Check the boxes next to the pages you want to publish.
- Click Publish.
If website publication is not available, make sure all the conditions are met:
- There are no empty sections on the website (marked with a red indicator).
- The licensing agreement with Xsolla has been signed.
- The main page is published or selected for publication. You cannot publish child pages before the main page.
Once the site is published, a section with a virtual item group will become available. If no items are displayed, check that their status is set to Available and that no time-based display limit is active.
Get virtual item information via API
To retrieve the virtual items catalog on the client side, use the methods from the Catalog subsection of the Virtual items and currency method group. Authorization is not required to use these methods.
| Task | API call |
|---|---|
| Get a virtual item by SKU. | In the Get virtual item by SKU API call pass the parameter item_sku. |
| Get a list of virtual items. | Get virtual items list. |
| Get a list of virtual items by specified group. | In the Get items list by specified group API call pass the parameter external_id. |
| Get a full list of virtual items in the project. | Get all virtual items list. |
Grant virtual items to users
Depending on the item type and integration settings, the virtual item is granted to the user in one of the following ways:
- If you’ve integrated PlayFab, virtual currency and items are granted to the user’s PlayFab inventory automatically.
- If you use a custom delivery system, all virtual items and currency are granted on your side. We recommend setting up a webhook handler to receive order data on your backend. The necessary data is included in the Successful payment for order webhook.
Useful links
Found a typo or other text error? Select the text and press Ctrl+Enter.