Skip to content

Overview

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

Download OpenAPI description
Languages
Servers
Mock server
https://xsolla.redocly.app/_mock/api/shop-builder/
https://store.xsolla.com/api/
Operations

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.

Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations

Catalog

This API allows getting any kind of sellable items or specific item.

Operations
Operations
Operations

Get game key for catalogClient-side

Request

Gets a game key for the catalog.

Note

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.
Security
XsollaLoginUserJWT
Path
project_idintegerrequired

Project ID. You can find this parameter in your Publisher Account next to the name of the project.

Example: 44056
item_skustringrequired

Item SKU.

Default "xsollus_basic_edition_steam"
Query
localestring

Response language. Two-letter lowercase language code per ISO 639-1.

Default "en"
additional_fields[]Array of strings

The list of additional fields. These fields will be in the response if you send them in your request.

Items Enum"media_list""order""long_description""custom_attributes""item_order_in_group"
countrystring

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.

Example: country=US
promo_codestring[ 1 .. 128 ] characters

Unique case sensitive code. Contains letters and numbers.

Example: promo_code=WINTER2021
show_inactive_time_limited_itemsinteger

Shows time-limited items that are not available to the user. The validity period of such items has not started or has already expired.

Default 0
Example: show_inactive_time_limited_items=1
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/api/shop-builder/v2/project/44056/items/game/key/sku/{item_sku}?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>'

Responses

Game key was successfully received.

Bodyapplication/json
skustring

Unique item ID. The SKU may contain only lowercase and uppercase Latin alphanumeric characters, periods, dashes, and underscores.

Example: "com.xsolla.game_1"
namestring

Item name.

Example: "Game name"
groupsArray of objects(items_client_groups_response)

Groups the item belongs to.

Default []
Example: [{"external_id":"exclusive","name":"Exclusive"}]
attributesArray of objects(Game-Keys_schemas-client-attributes)

List of attributes and their values corresponding to the item. Can be used for catalog filtering.

Default []
Example: {"value":{"external_id":"genre","name":"Жанр","values":[{"external_id":"genre_e3364991f92e751689a68b96598a5a5a84010b85","value":"Casual"},{"external_id":"genre_eba07bfd0f982940773cba3744d97264dd58acd7","value":"Strategy"},{"external_id":"genre_b8d0c6d8f0524c2b2d79ebb93aa3cd0e8b5199a8","value":"Mobile"}]}}
typestring

Type of item: game_key.

Example: "game_key"
descriptionstring

Item description.

Example: "Game description"
image_urlstring

Image URL.

Example: "https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png"
is_freeboolean(value-is_free)

If true, the item is free.

Default false
Example: false
priceobject

Item prices.

Example: {"amount":"30.5","amount_without_discount":"30.5","currency":"USD"}
virtual_pricesArray of objects

Virtual prices.

Example: []
can_be_boughtboolean(Can_be_bought)

If true, the user can buy an item.

Example: true
drm_namestring

DRM name.

Example: "Steam"
drm_skustring

Unique DRM ID. The SKU may contain only lowercase and uppercase Latin alphanumeric characters, periods, dashes, and underscores.

Example: "steam_key_1"
has_keysboolean

If true, the game key has keys for sale.

Example: true
is_pre_orderboolean

If true, the game key is pre-order and the release date hasn't passed.

Example: true
release_datestring

Game key release date in the ISO 8601 format.

Example: "2020-08-11T10:00:00+03:00"
promotionsArray of objects(Catalog_item_promotions)

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.

limitsobject or null(Catalog_item_limits)

Item limits.

periodsArray of objects or null(item-periods)

Item sales period.

Response
application/json
{ "sku": "com.xsolla.game_1", "name": "Game name", "groups": [ {}, {} ], "type": "game_key", "description": "Game description", "image_url": "https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png", "attributes": [ {}, {} ], "is_free": false, "price": { "amount": "30.5", "amount_without_discount": "30.5", "currency": "USD" }, "virtual_prices": [], "can_be_bought": true, "drm_name": "Steam", "drm_sku": "steam_key_1", "has_keys": true, "is_pre_order": true, "release_date": "2020-08-11T10:00:00+03:00", "promotions": [], "limits": null, "periods": [ {} ] }

Get game keys list by specified groupClient-side

Request

Gets a game key list from the specified group for building a catalog.

Attention

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.

Note

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.
Security
XsollaLoginUserJWT
Path
project_idintegerrequired

Project ID. You can find this parameter in your Publisher Account next to the name of the project.

Example: 44056
external_idstringrequired

Group external ID.

Default "all"
Query
limitinteger>= 1

Limit for the number of elements on the page.

Example: limit=50
offsetinteger>= 0

Number of the element from which the list is generated (the count starts from 0).

Example: offset=0
localestring

Response language. Two-letter lowercase language code per ISO 639-1.

Default "en"
additional_fields[]Array of strings

The list of additional fields. These fields will be in the response if you send them in your request.

Items Enum"media_list""order""long_description""custom_attributes""item_order_in_group"
countrystring

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.

Example: country=US
promo_codestring[ 1 .. 128 ] characters

Unique case sensitive code. Contains letters and numbers.

Example: promo_code=WINTER2021
show_inactive_time_limited_itemsinteger

Shows time-limited items that are not available to the user. The validity period of such items has not started or has already expired.

Default 0
Example: show_inactive_time_limited_items=1
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/api/shop-builder/v2/project/44056/items/game/key/group/{external_id}?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>'

Responses

The list of game keys was successfully received.

Bodyapplication/json
has_moreboolean(Pagination_has-more)

Used as an indicator that there are more pages.

Example: true
itemsArray of objects
Example: [{"sku":"com.xsolla.game_1","name":"Game name","groups":[{"external_id":"all","name":"All games"},{"external_id":"Xsolla","name":"Xsolla games"}],"type":"game_key","description":"Game description","image_url":"https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png","attributes":[{"external_id":"OS","name":"OS","values":[{"external_id":"9d5c5efb7c0f00a00fe4e3583f1215b0050bc723","value":"Windows"}]},{"external_id":"genre","name":"Genre","values":[{"external_id":"23fda05111c125608af8f1fa0e99db45a10ea1cc","value":"Horror"}]}],"is_free":false,"price":{"amount":"30.5","amount_without_discount":"30.5","currency":"USD"},"virtual_prices":[],"drm_name":"Steam","drm_sku":"steam_key_1","has_keys":true,"is_pre_order":true,"release_date":"2020-08-11T10:00:00+03:00","periods":[{"date_from":"2020-08-11T10:00:00+03:00","date_until":"2020-08-11T20:00:00+03:00"}]},{"sku":"com.xsolla.game_2","name":"Game name","groups":[{"external_id":"all","name":"All games"}],"type":"game_key","description":"Game description","image_url":"https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png","attributes":[{"external_id":"OS","name":"OS","values":[{"external_id":"9d5c5efb7c0f00a00fe4e3583f1215b0050bc723","value":"Windows"}]},{"external_id":"genre","name":"Genre","values":[{"external_id":"23fda05111c125608af8f1fa0e99db45a10ea1cc","value":"Horror"}]}],"is_free":false,"price":{"amount":"30.5","amount_without_discount":"30.5","currency":"USD"},"virtual_prices":[],"drm_name":"Steam","drm_sku":"steam_key_2","has_keys":true,"is_pre_order":false,"release_date":null,"periods":[]}]
Response
application/json
{ "has_more": true, "items": [ {}, {} ] }

Request

Gets the list of available DRMs.

Path
project_idintegerrequired

Project ID. You can find this parameter in your Publisher Account next to the name of the project.

Example: 44056
curl -i -X GET \
  https://xsolla.redocly.app/_mock/api/shop-builder/v2/project/44056/items/game/drm

Responses

The list of DRMs was successfully received.

Bodyapplication/json
drmArray of objects
Example: [{"sku":"steam_key_1","name":"Steam","image":"https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png","link":"https://support.steampowered.com","redeem_instruction_link":"https://support.steampowered.com","drm_id":1},{"sku":"playstation_key_1","name":"Playstation","image":"https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png","link":null,"redeem_instruction_link":"https://support.us.playstation.com","drm_id":2}]
Response
application/json
{ "drm": [ {}, {} ] }
Operations
Operations
Operations

Coupons

This API allows to you to manage coupons.

Operations

Promo codes

This API allows to manage promo codes.

Operations

Unique catalog offers

This API allows to you to manage unique catalog offers.

Operations

Discounts

This API allows to you to manage discount promotions.

Operations

Bonuses

This API allows to manage bonus promotions.

Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations