Operations related to creating and updating game entities. Game entities are used to combine and sort items.
Backpack API & Webhooks (1.0.0)
Welcome to the Backpack API, an essential tool to enhance your item-selling strategy and promotional campaigns.
With Backpack, users can store information about the items they purchased or received for free. When receiving items, users don’t need to use their game ID or go to the game from the distributor site — they can keep items in the Backpack and redeem them later.
All items purchased or received for free on the distributor website are available to the user in the Metaframe widget or Xsolla Wallet.
User flow:
- The user visits the distribution site.
- The user logs in through the Xsolla account in the Metaframe widget.
- The user purchases the item or gets it for free and selects the option to move the item to the Backpack.
- Information about the received item is transferred to the Backpack.
- In the Metaframe widget or Xsolla Wallet, the user opens the Backpack section and selects the item.
- The user receives the item.
- Information about the received item is transferred to the game.
- Item Storage: Users can store information about items purchased or received for free.
- Redemption Flexibility: Items stored in the Backpack can be redeemed at the user's convenience.
To get started with Backpack, check out our detailed guide on Setting up Backpack. This guide will walk you through the process of configuring Backpack to suit your needs.
Backpack revolves around three major entities:
- Items: The core entities that can be distributed to users.
- Game: The entity designed to combine items.
- Backpack: The entity designed to to grant user items in the game.
Webhook notifications associated with the Backpack are listed under the Webhooks tag. For more in-depth information about working with webhooks, refer to our main webhook documentation.
To set up webhooks:
- Open your project in the Publisher Account.
- Click Project settings in the side menu and navigate to Webhooks.
- Specify the URL where you want to receive webhooks in the
https://example.comformat. - A secret key to sign project webhooks is generated by default. To generate a new secret key, click the refresh icon.
- Click Enable webhooks.
If you have set up a Metaframe webhook, please contact the integration team at integration@xsolla.com or your Customer Success Manager at csm@xsolla.com. They will assist you in setting up a second webhook for the project.
Merchant ID. You can find this parameter in your Publisher Account:
- in the Company settings > Company section.
- in the URL in the browser address bar on any Publisher Account page. The URL has the following format:
https://publisher.xsolla.com/<merchant ID>/<Publisher Account section>.
A unique header issued by Xsolla. To obtain it, please contact the integration team at integration@xsolla.com or your Customer Success Manager at csm@xsolla.com. Provide them with the project ID and merchant ID. Keep X-HOST-ID confidential, as it is part of the authentication key.
A JSON object containing game keys information.
The item's description from the Publisher Account. Currently, only English descriptions are supported, and this information is displayed to the user in the Metaframe widget.
The URL pointing to the item's image, which is displayed to the user in the Metaframe widget.
An image should have an aspect ratio of 8 x 3, meaning that the width to height ratio should be approximately 2.67 (e.g., width = 400 px and height = 150 px). In this case, the image scales with minimal cropping at the edges, so the content remains visible. Optimum minimal resolution is 620 x 233 px (1240 x 466 px for Retina display).
The item's Stock Keeping Unit (SKU) from the Publisher Account. The SKU may only contain lowercase Latin alphanumeric characters, periods, dashes, and underscores.
The name of the game associated with the item. Refer to endpoints under the Game tag for additional details.
The URL pointing to the image representing the associated game. Refer to endpoints under the Game tag for additional details.
The external identifier uniquely assigned by you to represent the game. Refer to endpoints under the Game tag for additional details.
It's recommended to specify it, so that all items associated with the same game would be sorted by the game in the Metaframe widget.
- Mock serverhttps://xsolla.redocly.app/_mock/ru/api/backpack/web/backpack/merchants/{merchantId}/projects/{projectId}/user/{userId}/game_keys
- https://metaframe.xsolla.com/web/backpack/merchants/{merchantId}/projects/{projectId}/user/{userId}/game_keys
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://xsolla.redocly.app/_mock/ru/api/backpack/web/backpack/merchants/{merchantId}/projects/{projectId}/user/{userId}/game_keys' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-H 'X-HOST-ID: 497f6eca-6276-4993-bfeb-53cbbbba6f08' \
-d '[
{
"description": "string",
"image_url": "string",
"item_sku": "string",
"code": "string",
"game_name": "string",
"game_image_url": "string",
"external_game_id": "string"
}
]'Game keys were successfully created.
The item's description from the Publisher Account. Currently, only English descriptions are supported, and this information is displayed to the user in the Metaframe widget.
The URL pointing to the item's image, which is displayed to the user in the Metaframe widget.
An image should have an aspect ratio of 8 x 3, meaning that the width to height ratio should be approximately 2.67 (e.g., width = 400 px and height = 150 px). In this case, the image scales with minimal cropping at the edges, so the content remains visible. Optimum minimal resolution is 620 x 233 px (1240 x 466 px for Retina display).
The item's Stock Keeping Unit (SKU) from the Publisher Account. The SKU may only contain lowercase Latin alphanumeric characters, periods, dashes, and underscores.
The name of the game associated with the item. Refer to endpoints under the Game tag for additional details.
The external identifier uniquely assigned by you to represent the game. Refer to endpoints under the Game tag for additional details.
It's recommended to specify it, so that all items associated with the same game would be sorted by the game in the Metaframe widget.
The item type indicates the category of claimed item. In this case, the item type will be game key.
The timestamp indicates the moment in which the item is claimed by user.
The item status shows stage of item. In this case, the item status will be claimed.
[ { "item_id": "4d8cd62e-a579-4dae-af8c-3172f96f8f7c", "description": "string", "image_url": "string", "item_sku": "string", "code": "string", "game_name": "string", "external_game_id": "string", "item_type": "game_key", "created_at": "string", "item_status": "string" } ]
Merchant ID. You can find this parameter in your Publisher Account:
- in the Company settings > Company section.
- in the URL in the browser address bar on any Publisher Account page. The URL has the following format:
https://publisher.xsolla.com/<merchant ID>/<Publisher Account section>.
A unique header issued by Xsolla. To obtain it, please contact the integration team at integration@xsolla.com or your Customer Success Manager at csm@xsolla.com. Provide them with the project ID and merchant ID. Keep X-HOST-ID confidential, as it is part of the authentication key.
A JSON object containing promo codes information.
The item's Stock Keeping Unit (SKU) from the Publisher Account. The SKU may only contain lowercase Latin alphanumeric characters, periods, dashes, and underscores.
The item's name from the Publisher Account. Currently, only English names are supported, and this information is displayed to the user in the Metaframe widget.
The URL pointing to the item's image, which is displayed to the user in the Metaframe widget.
An image should have an aspect ratio of 8 x 3, meaning that the width to height ratio should be approximately 2.67 (e.g., width = 400 px and height = 150 px). In this case, the image scales with minimal cropping at the edges, so the content remains visible. Optimum minimal resolution is 620 x 233 px (1240 x 466 px for Retina display).
The item's description from the Publisher Account. Currently, only English descriptions are supported, and this information is displayed to the user in the Metaframe widget.
The name of the game associated with the item. Refer to endpoints under the Game tag for additional details.
The external identifier uniquely assigned by you to represent the game. Refer to endpoints under the Game tag for additional details.
It's recommended to specify it, so that all items associated with the same game would be sorted by the game in the Metaframe widget.
- Mock serverhttps://xsolla.redocly.app/_mock/ru/api/backpack/web/backpack/merchants/{merchantId}/projects/{projectId}/user/{userId}/promo_codes
- https://metaframe.xsolla.com/web/backpack/merchants/{merchantId}/projects/{projectId}/user/{userId}/promo_codes
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://xsolla.redocly.app/_mock/ru/api/backpack/web/backpack/merchants/{merchantId}/projects/{projectId}/user/{userId}/promo_codes' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-H 'X-HOST-ID: 497f6eca-6276-4993-bfeb-53cbbbba6f08' \
-d '[
{
"item_sku": "string",
"item_name": "string",
"image_url": "string",
"description": "string",
"promo_code": "string",
"game_name": "string",
"game_image_url": "string",
"external_game_id": "string"
}
]'Promo codes were successfully created.
The item's description from the Publisher Account. Currently, only English descriptions are supported, and this information is displayed to the user in the Metaframe widget.
The URL pointing to the item's image, which is displayed to the user in the Metaframe widget.
An image should have an aspect ratio of 8 x 3, meaning that the width to height ratio should be approximately 2.67 (e.g., width = 400 px and height = 150 px). In this case, the image scales with minimal cropping at the edges, so the content remains visible. Optimum minimal resolution is 620 x 233 px (1240 x 466 px for Retina display).
The item's Stock Keeping Unit (SKU) from the Publisher Account. The SKU may only contain lowercase Latin alphanumeric characters, periods, dashes, and underscores.
The name of the game associated with the item. Refer to endpoints under the Game tag for additional details.
The external identifier uniquely assigned by you to represent the game. Refer to endpoints under the Game tag for additional details.
It's recommended to specify it, so that all items associated with the same game would be sorted by the game in the Metaframe widget.
The item type indicates the category of claimed item. In this case, the item type will be promo code.
The timestamp indicates the moment in which the item is claimed by user.
The item status shows stage of item. In this case, the item status will be claimed.
[ { "item_id": "4d8cd62e-a579-4dae-af8c-3172f96f8f7c", "description": "string", "image_url": "string", "item_sku": "string", "game_name": "string", "external_game_id": "string", "item_type": "promo_code", "created_at": "string", "item_status": "string", "item_name": "string", "project_id": 0, "merchant_id": 0 } ]
Merchant ID. You can find this parameter in your Publisher Account:
- in the Company settings > Company section.
- in the URL in the browser address bar on any Publisher Account page. The URL has the following format:
https://publisher.xsolla.com/<merchant ID>/<Publisher Account section>.
A unique header issued by Xsolla. To obtain it, please contact the integration team at integration@xsolla.com or your Customer Success Manager at csm@xsolla.com. Provide them with the project ID and merchant ID. Keep X-HOST-ID confidential, as it is part of the authentication key.
A JSON object containing virtual currency packages information.
The item's Stock Keeping Unit (SKU) from the Publisher Account. The SKU may only contain lowercase Latin alphanumeric characters, periods, dashes, and underscores.
The item's name from the Publisher Account. Currently, only English names are supported, and this information is displayed to the user in the Metaframe widget.
The URL pointing to the item's image, which is displayed to the user in the Metaframe widget.
An image should have an aspect ratio of 8 x 3, meaning that the width to height ratio should be approximately 2.67 (e.g., width = 400 px and height = 150 px). In this case, the image scales with minimal cropping at the edges, so the content remains visible. Optimum minimal resolution is 620 x 233 px (1240 x 466 px for Retina display).
The item's description from the Publisher Account. Currently, only English descriptions are supported, and this information is displayed to the user in the Metaframe widget.
The price of the virtual currency item in the specified currency (currency parameter). This value represents the cost of acquiring the specified amount of virtual currency. For example, if the price is 10.99 and the currency is USD, it means the cost to obtain the associated amount of virtual currency is $10.99.
The currency which prices are displayed in (USD by default). Three-letter currency code per ISO 4217.
The name of the game associated with the item. Refer to endpoints under the Game tag for additional details.
The game platform associated with the item. If specified, the user needs to link their game platform account to Backpack to get the item.
- Mock serverhttps://xsolla.redocly.app/_mock/ru/api/backpack/web/backpack/merchants/{merchantId}/projects/{projectId}/user/{userId}/virtual_currency
- https://metaframe.xsolla.com/web/backpack/merchants/{merchantId}/projects/{projectId}/user/{userId}/virtual_currency
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://xsolla.redocly.app/_mock/ru/api/backpack/web/backpack/merchants/{merchantId}/projects/{projectId}/user/{userId}/virtual_currency' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-H 'X-HOST-ID: 497f6eca-6276-4993-bfeb-53cbbbba6f08' \
-d '[
{
"item_sku": "string",
"item_name": "string",
"image_url": "string",
"description": "string",
"price": 0,
"currency": "string",
"quantity": 0,
"game_name": "string",
"game_image_url": "string",
"external_game_id": "string",
"platform": "steam"
}
]'Virtual currencies were successfully created.
The item's description from the Publisher Account. Currently, only English descriptions are supported, and this information is displayed to the user in the Metaframe widget.
The URL pointing to the item's image, which is displayed to the user in the Metaframe widget.
An image should have an aspect ratio of 8 x 3, meaning that the width to height ratio should be approximately 2.67 (e.g., width = 400 px and height = 150 px). In this case, the image scales with minimal cropping at the edges, so the content remains visible. Optimum minimal resolution is 620 x 233 px (1240 x 466 px for Retina display).
The item's Stock Keeping Unit (SKU) from the Publisher Account. The SKU may only contain lowercase Latin alphanumeric characters, periods, dashes, and underscores.
The name of the game associated with the item. Refer to endpoints under the Game tag for additional details.
The external identifier uniquely assigned by you to represent the game. Refer to endpoints under the Game tag for additional details.
It's recommended to specify it, so that all items associated with the same game would be sorted by the game in the Metaframe widget.
The item type indicates the category of claimed item. In this case, the item type will be virtual currency.
The timestamp indicates the moment in which the item is claimed by user.
The item status shows stage of item. In this case, the item status will be claimed.
The game platform associated with the item. If specified, the user needs to link their game platform account to Backpack to get the item.
An indication to show whether this item is created under Publisher Account.
[ { "item_id": "4d8cd62e-a579-4dae-af8c-3172f96f8f7c", "description": "string", "image_url": "string", "item_sku": "string", "game_name": "string", "external_game_id": "string", "item_type": "virtual_currency", "created_at": "string", "item_status": "string", "item_name": "string", "platform": "steam", "project_id": 0, "merchant_id": 0, "price": 0, "currency": "string", "quantity": 0, "is_external_vc": true } ]
Merchant ID. You can find this parameter in your Publisher Account:
- in the Company settings > Company section.
- in the URL in the browser address bar on any Publisher Account page. The URL has the following format:
https://publisher.xsolla.com/<merchant ID>/<Publisher Account section>.
A unique header issued by Xsolla. To obtain it, please contact the integration team at integration@xsolla.com or your Customer Success Manager at csm@xsolla.com. Provide them with the project ID and merchant ID. Keep X-HOST-ID confidential, as it is part of the authentication key.
A JSON object containing virtual items information.
The item's Stock Keeping Unit (SKU) from the Publisher Account. The SKU may only contain lowercase Latin alphanumeric characters, periods, dashes, and underscores.
The item's name from the Publisher Account. Currently, only English names are supported, and this information is displayed to the user in the Metaframe widget.
The URL pointing to the item's image, which is displayed to the user in the Metaframe widget.
An image should have an aspect ratio of 8 x 3, meaning that the width to height ratio should be approximately 2.67 (e.g., width = 400 px and height = 150 px). In this case, the image scales with minimal cropping at the edges, so the content remains visible. Optimum minimal resolution is 620 x 233 px (1240 x 466 px for Retina display).
The item's description from the Publisher Account. Currently, only English descriptions are supported, and this information is displayed to the user in the Metaframe widget.
The name of the game associated with the item. Refer to endpoints under the Game tag for additional details.
The external identifier uniquely assigned by you to represent the game. Refer to endpoints under the Game tag for additional details.
It's recommended to specify it, so that all items associated with the same game would be sorted by the game in the Metaframe widget.
The game platform associated with the item. If specified, the user needs to link their game platform account to Backpack to get the item.
- Mock serverhttps://xsolla.redocly.app/_mock/ru/api/backpack/web/backpack/merchants/{merchantId}/projects/{projectId}/user/{userId}/virtual_items
- https://metaframe.xsolla.com/web/backpack/merchants/{merchantId}/projects/{projectId}/user/{userId}/virtual_items
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://xsolla.redocly.app/_mock/ru/api/backpack/web/backpack/merchants/{merchantId}/projects/{projectId}/user/{userId}/virtual_items' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-H 'X-HOST-ID: 497f6eca-6276-4993-bfeb-53cbbbba6f08' \
-d '[
{
"item_sku": "string",
"item_name": "string",
"image_url": "string",
"description": "string",
"game_name": "string",
"game_image_url": "string",
"external_game_id": "string",
"platform": "steam"
}
]'Virtual items were successfully created.
The item's description from the Publisher Account. Currently, only English descriptions are supported, and this information is displayed to the user in the Metaframe widget.
The URL pointing to the item's image, which is displayed to the user in the Metaframe widget.
An image should have an aspect ratio of 8 x 3, meaning that the width to height ratio should be approximately 2.67 (e.g., width = 400 px and height = 150 px). In this case, the image scales with minimal cropping at the edges, so the content remains visible. Optimum minimal resolution is 620 x 233 px (1240 x 466 px for Retina display).
The item's Stock Keeping Unit (SKU) from the Publisher Account. The SKU may only contain lowercase Latin alphanumeric characters, periods, dashes, and underscores.
The name of the game associated with the item. Refer to endpoints under the Game tag for additional details.
The external identifier uniquely assigned by you to represent the game. Refer to endpoints under the Game tag for additional details.
It's recommended to specify it, so that all items associated with the same game would be sorted by the game in the Metaframe widget.
The item type indicates the category of claimed item. In this case, the item type will be virtual currency.
The timestamp indicates the moment in which the item is claimed by user.
The item status shows stage of item. In this case, the item status will be claimed.
The game platform associated with the item. If specified, the user needs to link their game platform account to Backpack to get the item.
[ { "item_id": "4d8cd62e-a579-4dae-af8c-3172f96f8f7c", "description": "string", "image_url": "string", "item_sku": "string", "game_name": "string", "external_game_id": "string", "item_type": "virtual_currency", "created_at": "string", "item_status": "string", "item_name": "string", "platform": "steam", "project_id": 0, "merchant_id": 0 } ]
Merchant ID. You can find this parameter in your Publisher Account:
- in the Company settings > Company section.
- in the URL in the browser address bar on any Publisher Account page. The URL has the following format:
https://publisher.xsolla.com/<merchant ID>/<Publisher Account section>.
Project ID. You can find this parameter in your Publisher Account next to the name of the project.
- Mock serverhttps://xsolla.redocly.app/_mock/ru/api/backpack/web/backpack/merchants/{merchantId}/projects/{projectId}/users/{userId}/items
- https://metaframe.xsolla.com/web/backpack/merchants/{merchantId}/projects/{projectId}/users/{userId}/items
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://xsolla.redocly.app/_mock/ru/api/backpack/web/backpack/merchants/{merchantId}/projects/{projectId}/users/{userId}/items?offset=0&limit=0' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'X-HOST-ID: 497f6eca-6276-4993-bfeb-53cbbbba6f08'The list of items from users's Backpack was succesfully recieved.
The unique identifier for the item. Specified when creating item via API call.
The item's Stock Keeping Unit (SKU) from the Publisher Account. The SKU may only contain lowercase Latin alphanumeric characters, periods, dashes, and underscores.
The item's name from the Publisher Account. Currently, only English names are supported, and this information is displayed to the user in the Metaframe widget.
The URL pointing to the item's image, which is displayed to the user in the Metaframe widget.
An image should have an aspect ratio of 8 x 3, meaning that the width to height ratio should be approximately 2.67 (e.g., width = 400 px and height = 150 px). In this case, the image scales with minimal cropping at the edges, so the content remains visible. Optimum minimal resolution is 620 x 233 px (1240 x 466 px for Retina display).
The URL pointing to the image of the item in the proxy storage, which is displayed to the player in the Metaframe widget. This URL allows you to resize the image by passing the dimensions to the URL as parameters.
The item's description from the Publisher Account. Currently, only English descriptions are supported, and this information is displayed to the user in the Metaframe widget.
The item type indicates the category of claimed item.
The price of the virtual currency item in the specified currency (currency parameter). This value represents the cost of acquiring the specified amount of virtual currency. For example, if the price is 10.99 and the currency is USD, it means the cost to obtain the associated amount of virtual currency is $10.99.
The currency which prices are displayed in (USD by default). Three-letter currency code per ISO 4217.
Unique case sensitive code that user can redeem in the game to recieve the item. Contains letters and numbers.
The name of the game associated with the item. Refer to endpoints under the Game tag for additional details.
The external identifier uniquely assigned by you to represent the game. Refer to endpoints under the Game tag for additional details.
It's recommended to specify it, so that all items associated with the same game would be sorted by the game in the Metaframe widget.
The timestamp indicates the moment in which the item is claimed by user.
The item status shows stage of item. In this case, the item status will be claimed.
Whether the virtual currency is partners' currency or Xsolla currency.
The game platform associated with the item. If specified, the user needs to link their game platform account to Backpack to get the item.
[ { "item_id": "string", "item_sku": "string", "item_name": "string", "image_url": "string", "image_proxy_url": "string", "description": "string", "project_id": 0, "merchant_id": 0, "item_type": "game_key", "price": 0, "currency": "USD", "promo_code": "string", "code": "string", "game_name": "string", "external_game_id": "string", "created_at": "string", "item_status": "string", "quantity": 0, "is_external_vc": true, "platform": "steam" } ]
Merchant ID. You can find this parameter in your Publisher Account:
- in the Company settings > Company section.
- in the URL in the browser address bar on any Publisher Account page. The URL has the following format:
https://publisher.xsolla.com/<merchant ID>/<Publisher Account section>.
Project ID. You can find this parameter in your Publisher Account next to the name of the project.
The unique identifier for the item. Specified when creating item via API call.
- Mock serverhttps://xsolla.redocly.app/_mock/ru/api/backpack/web/backpack/merchants/{merchantId}/projects/{projectId}/users/{userId}/items/{itemId}
- https://metaframe.xsolla.com/web/backpack/merchants/{merchantId}/projects/{projectId}/users/{userId}/items/{itemId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
'https://xsolla.redocly.app/_mock/ru/api/backpack/web/backpack/merchants/{merchantId}/projects/{projectId}/users/{userId}/items/{itemId}' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'X-HOST-ID: 497f6eca-6276-4993-bfeb-53cbbbba6f08'