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
Operations

Get list of games owned by userClient-side

Request

Get the list of games owned by the user. The response will contain an array of games owned by a particular user.

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

What type of entitlements should be returned. If the parameter is set to 1, the entitlements received by the user in the sandbox mode only are returned. If the parameter isn't passed or is set to 0, the entitlements received by the user in the live mode only are returned.

Default 0
additional_fields[]Array of strings

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

curl -i -X GET \
  'https://xsolla.redocly.app/_mock/api/shop-builder/v2/project/44056/entitlement?limit=50&offset=0&sandbox=0&additional_fields%5B%5D=string' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Successfully received a list of game keys owned by the user.

Bodyapplication/json
has_moreboolean(Pagination_has-more)

Used as an indicator that there are more pages.

Example: true
total_items_countinteger(Pagination_total-items-count)

Total number of items in the system.

Example: 10
itemsArray of objects(Game-Keys_entitlement_item)
Response
application/json
{ "has_more": false, "total_items_count": 1, "items": [ {} ] }

Redeem game code by clientClient-side

Request

Grants entitlement by a provided game code.

Attention

You can redeem codes only for the DRM-free platform.
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
Bodyapplication/jsonrequired
codestringrequired

Game code.

Example: "AAAA-BBBB-CCCC-DDDD"
sandboxboolean

Redeem game code in the sandbox mode. The option is available for those users who are specified in the list of company users.

Default false
Example: false
curl -i -X POST \
  https://xsolla.redocly.app/_mock/api/shop-builder/v2/project/44056/entitlement/redeem \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "code": "AAAA-BBBB-CCCC-DDDD",
    "sandbox": false
  }'

Responses

Successful redemption.

Response
No content

Grant entitlement (admin)Server-sideAdmin

Request

Grants entitlement to user.

Attention

Game codes or games for DRM free platform can be granted only.
Security
basicAuth
Path
project_idintegerrequired

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

Example: 44056
Bodyapplication/jsonrequired
user_external_idstringrequired

Unique user identifier.

Example: "user-external-id"
gameobjectrequired

Object with game properties.

Example: {"sku":"com.xsolla.game_1"}
game.​skustring(Game-Keys_game_sku)[ 1 .. 255 ] characters^[a-zA-Z0-9_\-–.]*$required

Unique key package ID.

Example: "theGreatestGameSku"
drmobjectrequired

Object with DRM properties.

Example: {"sku":"com.xsolla.key_1"}
drm.​skustring(Game-Keys_drm_sku)required

Unique DRM ID.

Enum"steam""playstation""xbox""uplay""origin""drmfree""gog""epicgames""nintendo_eshop""discord_game_store"
Example: "steam"
codestring or null

Game code of the game.

Example: "AAAA-BBBB-CCCC-DDDD"
modestringrequired

What type of entitlements should be granted. If the parameter is set to sandbox, the entitlement will be granted to the user in the sandbox mode. If the parameter is set to default, the entitlement will be granted to the user in the live mode.

Enum"default""sandbox"
Example: "default"
user_countrystring or null

User's country.

Example: "US"
curl -i -X POST \
  -u <username>:<password> \
  https://xsolla.redocly.app/_mock/api/shop-builder/v2/project/44056/admin/entitlement/grant \
  -H 'Content-Type: application/json' \
  -d '{
    "user_external_id": "user-external-id",
    "game": {
      "sku": "com.xsolla.game_1"
    },
    "drm": {
      "sku": "com.xsolla.key_1"
    },
    "code": "AAAA-BBBB-CCCC-DDDD",
    "mode": "default",
    "user_country": "US"
  }'

Responses

Entitlement was granted.

Response
No content
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