This API allows getting any kind of sellable items or specific item.
Shop Builder API (2.0.0)
- Version: 2.0.0
- Servers:
https://store.xsolla.com/api - Contact Us by Email
- Contact URL: https://xsolla.com/
- Required TLS version: 1.2
Shop Builder API provides a third-party solution for implementing the server side for your store interface. Use the endpoints to manage in-game items, in-game currencies, cart, player inventory, promotions, game library, etc.
Personalized catalog
This API allows to specify rules for user attributes. If the user meets all conditions for a concrete rule, personalized items will be shown.
For personalized promotions see Promotions section.
To pass attributes before a purchase, you can use Xsolla Login API or pass them into user.attributes property while generating token using Pay Station API.
Request
Gets a virtual item by SKU for building a catalog.
This endpoint, accessible without authorization, returns generic data. However, authorization enriches the response with user-specific details for a personalized result, such as available user limits and promotions.
Project ID. You can find this parameter in your Publisher Account next to the name of the project.
Two-letter uppercase country code per ISO 3166-1 alpha-2. Check the documentation for detailed information about countries supported by Xsolla and the process of determining the country.
Shows time-limited items that are not available to the user. The validity period of such items has not started or has already expired.
- Mock serverhttps://xsolla.redocly.app/_mock/api/shop-builder/v2/project/{project_id}/items/virtual_items/sku/{item_sku}
- https://store.xsolla.com/api/v2/project/{project_id}/items/virtual_items/sku/{item_sku}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://xsolla.redocly.app/_mock/api/shop-builder/v2/project/44056/items/virtual_items/sku/booster_mega_1?locale=en&country=US&show_inactive_time_limited_items=1&additional_fields%5B%5D=media_list' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'The virtual item was successfully received.
Unique item ID. The SKU may contain only lowercase and uppercase Latin alphanumeric characters, periods, dashes, and underscores.
Groups the item belongs to.
List of attributes and their values corresponding to the item. Can be used for catalog filtering.
Image URL.
Type of virtual item.
| Enum Value | Description |
|---|---|
| consumable | An item that disappears from the inventory after use (e.g., ammo). |
| non_consumable | An item that stays in the inventory for an unlimited period of time. |
| non_renewing_subscription | Time-limited item that can represent access to services or content for a limited period of time. |
Applied promotions for specific items in the cart. The array is returned in the following cases:
A discount promotion is configured for a specific item.
A promo code with the Discount on selected items setting is applied.
If no item-level promotions are applied, an empty array is returned.
A JSON object containing item attributes and values.
{ "item_id": 488833, "sku": "com.xsolla.swords_1", "type": "virtual_good", "name": { "en": "Sword Xsolla Skin" }, "description": { "en": "Honshu Boshin Wakizashi - Modern Tactical Samurai / Ninja Sword - Hand Forged 1060 Carbon Steel - Full Tang, Fully Functional, Battle Ready - Black TPR, Steel Guard and Pommel" }, "image_url": "https://cdn.xsolla.net/img/misc/images/8ab44fe99038a56de01950ba4a971b77.png", "price": { "amount": "4.99", "amount_without_discount": "4.99", "currency": "USD" }, "virtual_prices": [], "can_be_bought": true, "promotions": [], "limits": { "per_user": { … }, "per_item": null }, "periods": [ { … } ], "attributes": [ { … } ], "is_free": false, "groups": [ { … } ], "virtual_item_type": "non_consumable", "vp_rewards": [], "custom_attributes": { "purchased": 0, "attr": "value" } }
Request
Gets a list of all virtual items for searching on client-side.
Returns only item SKU, name, groups and description
The use of the item catalog API calls is available without authorization, but to get a personalized catalog, you must pass the user JWT in the Authorization header.
Project ID. You can find this parameter in your Publisher Account next to the name of the project.
- Mock serverhttps://xsolla.redocly.app/_mock/api/shop-builder/v2/project/{project_id}/items/virtual_items/all
- https://store.xsolla.com/api/v2/project/{project_id}/items/virtual_items/all
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://xsolla.redocly.app/_mock/api/shop-builder/v2/project/44056/items/virtual_items/all?locale=en&promo_code=WINTER2021' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'The list of all virtual items was successfully received.
{ "items": [ { … }, { … }, { … } ] }
Request
Gets a virtual currency list for building a catalog.
All projects have the limitation to the number of items that you can get in the response. The default and maximum value is 50 items per response. To get more data page by page, use limit and offset fields.
The use of the item catalog API calls is available without authorization, but to get a personalized catalog, you must pass the user JWT in the Authorization header.
Project ID. You can find this parameter in your Publisher Account next to the name of the project.
Number of the element from which the list is generated (the count starts from 0).
The list of additional fields. These fields will be in the response if you send them in your request.
Two-letter uppercase country code per ISO 3166-1 alpha-2. Check the documentation for detailed information about countries supported by Xsolla and the process of determining the country.
Unique case sensitive code. Contains letters and numbers.
- Mock serverhttps://xsolla.redocly.app/_mock/api/shop-builder/v2/project/{project_id}/items/virtual_currency
- https://store.xsolla.com/api/v2/project/{project_id}/items/virtual_currency
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://xsolla.redocly.app/_mock/api/shop-builder/v2/project/44056/items/virtual_currency?limit=50&offset=0&locale=en&additional_fields%5B%5D=media_list&country=US&promo_code=WINTER2021&show_inactive_time_limited_items=1' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'{ "has_more": false, "items": [ { … }, { … }, { … } ] }