` is the user token. The token identifies the user and provides access to personalized data. You can try this call using the following test token:
```
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE5NjIyMzQwNDgsImlzcyI6Imh0dHBzOi8vbG9naW4ueHNvbGxhLmNvbSIsImlhdCI6MTU2MjE0NzY0OCwidXNlcm5hbWUiOiJ4c29sbGEiLCJ4c29sbGFfbG9naW5fYWNjZXNzX2tleSI6IjA2SWF2ZHpDeEVHbm5aMTlpLUc5TmMxVWFfTWFZOXhTR3ZEVEY4OFE3RnMiLCJzdWIiOiJkMzQyZGFkMi05ZDU5LTExZTktYTM4NC00MjAxMGFhODAwM2YiLCJlbWFpbCI6InN1cHBvcnRAeHNvbGxhLmNvbSIsInR5cGUiOiJ4c29sbGFfbG9naW4iLCJ4c29sbGFfbG9naW5fcHJvamVjdF9pZCI6ImU2ZGZhYWM2LTc4YTgtMTFlOS05MjQ0LTQyMDEwYWE4MDAwNCIsInB1Ymxpc2hlcl9pZCI6MTU5MjR9.GCrW42OguZbLZTaoixCZgAeNLGH2xCeJHxl8u8Xn2aI
```
Alternatively, you can use a [token for opening the payment UI](/ru/api/pay-station/token/create-token).
2. **Simplified mode without Authorization header.** This mode is used only for unauthorized users and can be applied only for [game key sales](/ru/doc/buy-button/how-to/set-up-authentication/#guides_buy_button_selling_items_not_authenticated_users). Instead of a token, the request must include the following headers:
- `x-unauthorized-id` with a request ID
- `x-user` with the user's email address encoded in Base64
## Useful links
- [API calls by interaction model](https://developers.xsolla.com/ru/api/catalog/)
- [Endpoint types](https://developers.xsolla.com/ru/api/catalog/)
- [Errors handling](https://developers.xsolla.com/ru/api/catalog/)
- [API keys](https://developers.xsolla.com/ru/api/catalog/)
# Core entity structure
Items of all types (virtual items, bundles, virtual currency, and keys) use a similar data structure. Understanding the basic structure simplifies working with the API and helps you navigate the documentation more easily.
Note
Some calls may include additional fields but they don't change the basic structure.
**Identification**
- `merchant_id` — company ID in [Publisher Account](https://publisher.xsolla.com/)
- `project_id` — project ID in Publisher Account
- `sku` — item SKU, unique within the project
**Store display**
- `name` — item name
- `description` — item description
- `image_url` — image URL
- `is_enabled` — item availability
- `is_show_in_store` — whether the item is displayed in the catalog
For more information about managing item availability in the catalog, see the [documentation](/ru/items-catalog/catalog-features/items-availability/).
**Organization**
- `type` — item type, for example, a virtual item (`virtual_item`) or bundle (`bundle`)
- `groups` — groups the item belongs to
- `order` — display order in the catalog
**Sale conditions**
- `prices` — prices in real or virtual currency
- `limits` — purchase limits
- `periods` — availability periods
- `regions` — regional restrictions
**Example of core entity structure:**
```json
{
"attributes": [],
"bundle_type": "virtual_currency_package",
"content": [
{
"description": {
"en": "Main in-game currency"
},
"image_url": "https://.../image.png",
"name": {
"en": "Crystals",
"de": "Kristalle"
},
"quantity": 500,
"sku": "com.xsolla.crystal_2",
"type": "virtual_currency"
}
],
"description": {
"en": "Crystals x500"
},
"groups": [],
"image_url": "https://.../image.png",
"is_enabled": true,
"is_free": false,
"is_show_in_store": true,
"limits": {
"per_item": null,
"per_user": null,
"recurrent_schedule": null
},
"long_description": null,
"media_list": [],
"name": {
"en": "Medium crystal pack"
},
"order": 1,
"periods": [
{
"date_from": null,
"date_until": "2020-08-11T20:00:00+03:00"
}
],
"prices": [
{
"amount": 20,
"country_iso": "US",
"currency": "USD",
"is_default": true,
"is_enabled": true
}
],
"regions": [],
"sku": "com.xsolla.crystal_pack_2",
"type": "bundle",
"vc_prices": []
}
```
# Basic purchase flow
The Xsolla API allows you to implement in-game store logic, including retrieving the item catalog, managing the cart, creating orders, and tracking their status. Depending on the integration scenario, API calls are divided into **Admin** and **Catalog** subsections, which use different [authentication schemes](/ru/api/catalog/section/authentication).
The following example shows a basic flow for setting up and operating a store, from item creation to purchase.
## Create items and groups (Admin)
Create an item catalog for your store, such as virtual items, bundles, or virtual currency.
Example API calls:
- [Create virtual item](/ru/api/catalog/virtual-items-currency-admin/admin-create-virtual-item)
- [Create bundle](/ru/api/catalog/bundles-admin/admin-create-bundle)
- [Create virtual currency](/ru/api/catalog/virtual-items-currency-admin/admin-create-virtual-currency)
## Set up promotions, chains, and limits (Admin)
Configure user acquisition and monetization tools, such as discounts, bonuses, daily rewards, or offer chains.
Example API calls:
- [Create bonus promotion](/ru/api/liveops/promotions-bonuses/create-bonus-promotion)
- [Create daily reward](/ru/api/liveops/daily-chain-admin/admin-create-daily-chain)
- [Create unique catalog offer promotion](/ru/api/liveops/promotions-unique-catalog-offers/admin-create-unique-catalog-offer)
## Get item information (Client)
Configure item display in your application.
Notice
Do not use API calls from the Admin subsection to build a user catalog. These API calls have
rate limits and aren't intended for user traffic.
Example API calls:
- [Get virtual items list](/ru/api/catalog/virtual-items-currency-catalog/get-virtual-items)
- [Get item group list](/ru/api/catalog/virtual-items-currency-catalog/get-item-groups)
- [Get list of bundles](/ru/api/catalog/bundles-catalog/get-bundle-list)
- [Get sellable items list](/ru/api/catalog/common-catalog/get-sellable-items)
Note
By default, catalog API calls return items that are currently available in the store at the time of the request. To retrieve items that are not yet available or are no longer available, include the parameter "show_inactive_time_limited_items": 1 in the catalog request.
## Sell items
You can sell items using the following methods:
- Fast purchase — sell one SKU multiple times.
- Cart purchase — the user adds items to the cart, removes items, and updates quantities within a single order.
If an item is purchased using virtual currency instead of real money, use the [Create order with specified item purchased by virtual currency](/ru/api/catalog/virtual-payment/create-order-with-item-for-virtual-currency) API call. The payment UI is not required, as the charge is processed when the API call is executed.
For free item purchase, use the [Create order with specified free item](/ru/api/catalog/free-item/create-free-order-with-item) API call or the [Create order with free cart](/ru/api/catalog/free-item/create-free-order) API call. The payment UI is not required — the order is immediately set to the done status.
### Fast purchase
Use the client-side API call to [create an order with a specified item](/ru/api/catalog/payment-client-side/create-order-with-item). The call returns a token used to open the payment UI.
Note
Discount information is available to the user only in the payment UI. Promo codes are not supported.
### Cart purchase
Cart setup and purchase can be performed on the client or on the server side.
**Set up and purchase a cart on the client**
Implement the logic of adding and removing items by yourself. Before calling the API for setting up a cart, you will not have information about which promotions will be applied to the purchase. This means that the total cost and details of the added bonus items will not be known.
Implement the following cart logic:
1. After the player has filled a cart, use the [Fill cart with items](/ru/api/shop-builder/operation/cart-fill/) API call. The call returns the current information about the selected items (prices before and after discounts, bonus items).
2. Update the cart contents based on user actions:
- To add an item or change item quantity, use the [Update cart item by cart ID](/ru/api/shop-builder/operation/put-item-by-cart-id/) API call.
- To remove an item, use the [Delete cart item by cart ID](/ru/api/shop-builder/operation/delete-item-by-cart-id/) API call.
Note
To get the current status of the cart, use the Get current user's cart API call.
3. Use the [Create order with all items from current cart](/ru/api/shop-builder/operation/create-order/) API call. The call returns the order ID and payment token. The newly created order is set to new status by default.
**Set up and purchase a cart on the server**
This setup option may take longer for setting the cart up, since each change to the cart must be accompanied by API calls.
Implement the following cart logic:
1. After the player has filled a cart, use the [Fill cart with items](/ru/api/catalog/cart-server-side) API call. The call returns current information about the selected items (prices before and after discounts, bonus items).
2. Use the [Create order with all items from current cart](/ru/api/shop-builder/operation/create-order/) API call. The call returns the order ID and payment token. The newly created order is set to new status by default.
## Open payment UI
Use the returned token to open the payment UI in a new window. Other ways to open the payment UI are described in the [documentation](/ru/payment-ui-and-flow/payment-ui/how-to-open-payment-ui/#open_payment_ui).
| Action | Endpoint |
|:--------------------------------|:--------------------------------------------------------------------------|
| Open in production environment. | https://secure.xsolla.com/paystation4/?token={token} |
| Open in sandbox mode. | https://sandbox-secure.xsolla.com/paystation4/?token={token} |
Note
Use sandbox mode during development and testing. Test purchases don't charge real accounts. You can use
test bank cards.
After the first real payment is made, a strict sandbox payment policy takes effect. A payment in sandbox mode is available only to users specified in [Publisher Account > Company settings > Users](https://publisher.xsolla.com/0/settings/users).
Buying virtual currency and items for real currency is possible only after signing a license agreement with Xsolla. To do this, in [Publisher Account](https://publisher.xsolla.com/), go to **Agreements & Taxes > Agreements**, complete the agreement form, and wait for confirmation. It may take up to 3 business days to review the agreement.
To enable or disable sandbox mode, change the value of the `sandbox` parameter in the request for fast purchase and cart purchase. Sandbox mode is off by default.
Possible order statuses:
- `new` — order created
- `paid` — payment received
- `done` — item delivered
- `canceled` — order canceled
- `expired` — payment expired
Track order status using one of the following methods:
- [webhooks configured on your server](/ru/virtual-goods/own-ui/server-side-token-generation/set-up-order-tracking/#payments_integration_order_tracking)
- [short-polling](/ru/virtual-goods/own-ui/client-side-token-generation/set-up-order-tracking/#guides_shop_builder_integrate_store_get_order_status_via_short_polling)
- [WebSocket API](/ru/virtual-goods/own-ui/client-side-token-generation/set-up-order-tracking/#guides_shop_builder_integrate_store_get_order_status_via_websocket_api)
## Useful links
- Authentication
- [API calls by interaction model](/ru/api/catalog/section/authentication)
- [Payment testing](/ru/dev-resources/testing/general-info/#general_overview)
- [Set up order status tracking](/ru/virtual-goods/own-ui/client-side-token-generation/set-up-order-tracking/?link=200-api#payments_integration_order_tracking)
- [Webhooks](/ru/webhooks/overview)
- [Rate limits](/ru/api/login/rate-limits)
- [Errors handling](/ru/api/getting-started/#api_errors_handling)
- [API keys](/ru/api/getting-started/#api_keys_overview)
# Pagination
API calls that return large sets of records (for example, when building a catalog) return data in pages. Pagination is a mechanism that limits the number of items returned in a single API response and allows you to retrieve subsequent pages sequentially.
Use the following parameters to control the number of returned items:
- `limit` — number of items per page
- `offset` — index of the first item on the page (numbering starts from 0)
- `has_more` — indicates whether another page is available
- `total_items_count` — total number of items
Example request:
```
GET /items?limit=20&offset=40
```
Response example:
```json
{
"items": [...],
"has_more": true,
"total_items_count": 135
}
```
It is recommended to send subsequent requests until the response returns `has_more = false`.
# Date and time format
Dates and time values are passed in the [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
The following are supported:
- UTC offset
- `null` value when there is no time restriction for displaying an item
- [Unix timestamp](https://www.unixtimestamp.com/) (in seconds) used in some fields
Format: `YYYY-MM-DDTHH:MM:SS±HH:MM`
Example: `2026-03-16T10:00:00+03:00`
# Localization
Xsolla supports localization of user-facing fields such as item name and description. Localized values are passed as an object where the language code is used as the key. The full list of supported languages is available in the [documentation](/ru/doc/shop-builder/references/supported-languages/).
**Supported fields**
Localization can be specified for the following parameters:
- `name`
- `description`
- `long_description`
**Locale format**
The locale key can be specified in one of the following formats:
- Two-letter language code: `en`, `ru`
- Five-letter language code: `en-US`, `ru-RU`, `de-DE`
**Examples**
Example with a two-letter language code:
```json
{
"name": {
"en": "Starter Pack",
"ru": "Стартовый набор"
}
}
```
Example with a five-letter language code:
```json
{
"description": {
"en-US": "Premium bundle",
"de-DE": "Premium-Paket"
}
}
```
# Error response format
If an error occurs, the API returns an HTTP status and a JSON response body. The full list of store-related errors is available in the [documentation](/ru/dev-resources/references/errors/store-errors/).
**Response example:**
```json
{
"errorCode": 1102,
"errorMessage": "Validation error",
"statusCode": 422,
"transactionId": "c9e1a..."
}
```
- `errorCode` — error code.
- `errorMessage` — short error description.
- `statusCode` — HTTP response status.
- `transactionId` — request ID. Returned only in some cases.
- `errorMessageExtended` — additional error details, such as request parameters. Returned only in some cases.
**Extended response example:**
```json
{
"errorCode": 7001,
"errorMessage": "Chain not found",
"errorMessageExtended": {
"chain_id": "test_chain_id",
"project_id": "test_project_id",
"step_number": 2
},
"statusCode": 404
}
```
**Common HTTP status codes**
- `400` — invalid request
- `401` — authentication error
- `403` — insufficient permissions
- `404` — resource not found
- `422` — validation error
- `429` — rate limit exceeded
**Recommendations**
- Handle the HTTP status and the response body together.
- Use `errorCode` to process errors related to application logic.
- Use `transactionId` to identify requests more quickly when analyzing errors.
Version: 2.0.0
## Servers
```
https://store.xsolla.com/api
```
## Security
### AuthForCart
Для продажи корзины используется схема аутентификации `AuthForCart`, которая поддерживает два режима:
1. Аутентификация с помощью JWT пользователя. Токен передается в заголовке `Authorization: Bearer `, где `` — токен пользователя. Токен идентифицирует пользователя и обеспечивает доступ к персонализированным данным. Вы можете протестировать метод, используя тестовый токен: `Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE5NjIyMzQwNDgsImlzcyI6Imh0dHBzOi8vbG9naW4ueHNvbGxhLmNvbSIsImlhdCI6MTU2MjE0NzY0OCwidXNlcm5hbWUiOiJ4c29sbGEiLCJ4c29sbGFfbG9naW5fYWNjZXNzX2tleSI6IjA2SWF2ZHpDeEVHbm5aMTlpLUc5TmMxVWFfTWFZOXhTR3ZEVEY4OFE3RnMiLCJzdWIiOiJkMzQyZGFkMi05ZDU5LTExZTktYTM4NC00MjAxMGFhODAwM2YiLCJlbWFpbCI6InN1cHBvcnRAeHNvbGxhLmNvbSIsInR5cGUiOiJ4c29sbGFfbG9naW4iLCJ4c29sbGFfbG9naW5fcHJvamVjdF9pZCI6ImU2ZGZhYWM2LTc4YTgtMTFlOS05MjQ0LTQyMDEwYWE4MDAwNCIsInB1Ymxpc2hlcl9pZCI6MTU5MjR9.GCrW42OguZbLZTaoixCZgAeNLGH2xCeJHxl8u8Xn2aI`.
В качестве альтернативы вы можете использовать [токен для открытия платежного интерфейса](/ru/api/pay-station/token/create-token).
2. Упрощенный режим без заголовка `Authorization`. Он применяется только для неавторизованных пользователей и может быть использована только для [продажи игровых ключей](/ru/doc/buy-button/how-to/set-up-authentication/#guides_buy_button_selling_items_not_authenticated_users). Вместо токена в запрос передаются специальные заголовки:
* `x-unauthorized-id` с ID запроса;
* `x-user` с email пользователя, закодированным по стандарту Base64.
Type: http
Scheme: bearer
### XsollaLoginUserJWT
Для клиентских методов используется схема аутентификации `XsollaLoginUserJWT`. Запрос должен содержать JWT пользователя в заголовке `Authorization` в формате Bearer ``. Токен идентифицирует пользователя и обеспечивает доступ к персонализированным данным. Подробная информация о создании токена приведена в [документации Xsolla Login API](/ru/api/login/authentication-schemes#getting-user-token).
Вы можете протестировать метод, используя тестовый токен`Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE5NjIyMzQwNDgsImlzcyI6Imh0dHBzOi8vbG9naW4ueHNvbGxhLmNvbSIsImlhdCI6MTU2MjE0NzY0OCwidXNlcm5hbWUiOiJ4c29sbGEiLCJ4c29sbGFfbG9naW5fYWNjZXNzX2tleSI6IjA2SWF2ZHpDeEVHbm5aMTlpLUc5TmMxVWFfTWFZOXhTR3ZEVEY4OFE3RnMiLCJzdWIiOiJkMzQyZGFkMi05ZDU5LTExZTktYTM4NC00MjAxMGFhODAwM2YiLCJlbWFpbCI6InN1cHBvcnRAeHNvbGxhLmNvbSIsInR5cGUiOiJ4c29sbGFfbG9naW4iLCJ4c29sbGFfbG9naW5fcHJvamVjdF9pZCI6ImU2ZGZhYWM2LTc4YTgtMTFlOS05MjQ0LTQyMDEwYWE4MDAwNCIsInB1Ymxpc2hlcl9pZCI6MTU5MjR9.GCrW42OguZbLZTaoixCZgAeNLGH2xCeJHxl8u8Xn2aI`.
В качестве альтернативы вы можете использовать [токен для открытия платежного интерфейса](/ru/api/pay-station/token/create-token).
Type: http
Scheme: bearer
Bearer Format: JWT
### basicAuth
Для серверных методов используется схема аутентификации `basicAuth`. Все запросы к API должны содержать заголовок `Authorization: Basic `, где `Authorization: Basic ` — пара `project_id:api_key`, закодированная по стандарту Base64.
Вы можете использовать `merchant_id` вместо `project_id` при необходимости. Это не влияет на функциональность.
Значения параметров вы можете найти в [Личном кабинете](https://publisher.xsolla.com/):
* `merchant_id` отображается:
* В разделе **Настройки компании > Компания**.
* В адресной строке браузера на любой странице Личного кабинета. URL-адрес имеет вид: `https://publisher.xsolla.com/`.
* `api_key` отображается в Личном кабинете только при создании и должен храниться на вашей стороне. Создать ключ можно в разделах:
* [Настройки компании > Ключи API](https://publisher.xsolla.com/0/settings/api_key).
* [Настройки проекта > Ключи API](https://publisher.xsolla.com/0/projects/0/edit/api_key).
{% html name="div" attrs={"class": "notice"} %}
**Внимание**
Если необходимый метод API не включает в себя path-параметр `project_id`, используйте для авторизации ключ API, который действует во всех проектах..
{% /html %}
* `project_id` отображается:
* В Личном кабинете рядом с названием проекта.
* В адресной строке браузера при работе с проектом в Личном кабинете. URL-адрес имеет вид: `https://publisher.xsolla.com//projects/`.Подробная информация о работе с ключами API приведена в [справочнике API](https://developers.xsolla.com/ru/api/getting-started/#api_keys_overview).
Type: http
Scheme: basic
### basicMerchantAuth
Для серверных методов используется схема аутентификации `basicMerchantAuth`. Все запросы к API должны содержать заголовок `Authorization: Basic `, где `your_authorization_basic_key` — пара `merchant_id:api_key`, закодированная по стандарту Base64.
Значения параметров вы можете найти в [Личном кабинете](https://publisher.xsolla.com/):
* `merchant_id` отображается:
* В разделе **Настройки компании > Компания**.
* В адресной строке браузера на любой странице Личного кабинета. URL-адрес имеет вид: `https://publisher.xsolla.com/`
* `api_key` отображается в Личном кабинете только при создании и должен храниться на вашей стороне. Создать ключ можно в разделе [Настройки компании > Ключи API](https://publisher.xsolla.com/0/settings/api_key).
Подробная информация о работе с ключами API приведена в [справочнике API](https://developers.xsolla.com/ru/api/getting-started/#api_keys_overview).
Type: http
Scheme: basic
## Download OpenAPI description
[Catalog API](https://developers.xsolla.com/_bundle/@l10n/ru/api/catalog/index.yaml)
## Admin
### Получение списка виртуальных валют
- [GET /v2/project/{project_id}/admin/items/virtual_currency](https://developers.xsolla.com/ru/api/catalog/virtual-items-currency-admin/admin-get-virtual-currencies-list.md): Получает список виртуальных валют в рамках проекта для администрирования.
ПримечаниеНе используйте данный метод для построения каталога магазина.
### Создание виртуальной валюты
- [POST /v2/project/{project_id}/admin/items/virtual_currency](https://developers.xsolla.com/ru/api/catalog/virtual-items-currency-admin/admin-create-virtual-currency.md): Создает виртуальную валюту.
### Получение списка пакетов виртуальной валюты (admin)
- [GET /v2/project/{project_id}/admin/items/virtual_currency/package](https://developers.xsolla.com/ru/api/catalog/virtual-items-currency-admin/admin-get-virtual-currency-packages-list.md): Получает список пакетов виртуальной валюты в рамках проекта для администрирования.
ПримечаниеНе используйте данный метод для построения каталога магазина.
### Создание пакета виртуальной валюты
- [POST /v2/project/{project_id}/admin/items/virtual_currency/package](https://developers.xsolla.com/ru/api/catalog/virtual-items-currency-admin/admin-create-virtual-currency-package.md): Создает пакет виртуальной валюты.
### Удаление пакета виртуальной валюты
- [DELETE /v2/project/{project_id}/admin/items/virtual_currency/package/sku/{item_sku}](https://developers.xsolla.com/ru/api/catalog/virtual-items-currency-admin/admin-delete-virtual-currency-package.md): Удаляет пакет виртуальной валюты.
### Получение пакета виртуальной валюты
- [GET /v2/project/{project_id}/admin/items/virtual_currency/package/sku/{item_sku}](https://developers.xsolla.com/ru/api/catalog/virtual-items-currency-admin/admin-get-virtual-currency-package.md): Получает пакет виртуальной валюты в рамках проекта для администрирования.
ПримечаниеНе используйте данный метод для построения каталога магазина.
### Обновление пакета виртуальной валюты
- [PUT /v2/project/{project_id}/admin/items/virtual_currency/package/sku/{item_sku}](https://developers.xsolla.com/ru/api/catalog/virtual-items-currency-admin/admin-update-virtual-currency-package.md): Обновляет пакет виртуальной валюты.
### Удаление виртуальной валюты
- [DELETE /v2/project/{project_id}/admin/items/virtual_currency/sku/{virtual_currency_sku}](https://developers.xsolla.com/ru/api/catalog/virtual-items-currency-admin/admin-delete-virtual-currency.md): Удаляет виртуальную валюту.
### Получение виртуальной валюты
- [GET /v2/project/{project_id}/admin/items/virtual_currency/sku/{virtual_currency_sku}](https://developers.xsolla.com/ru/api/catalog/virtual-items-currency-admin/admin-get-virtual-currency.md): Получает виртуальную валюту в рамках проекта для администрирования.
ПримечаниеНе используйте данный метод для построения каталога магазина.
### Обновление виртуальной валюты
- [PUT /v2/project/{project_id}/admin/items/virtual_currency/sku/{virtual_currency_sku}](https://developers.xsolla.com/ru/api/catalog/virtual-items-currency-admin/admin-update-virtual-currency.md): Обновляет виртуальную валюту.
### Получение списка виртуальных предметов
- [GET /v2/project/{project_id}/admin/items/virtual_items](https://developers.xsolla.com/ru/api/catalog/virtual-items-currency-admin/admin-get-virtual-items-list.md): Получает список виртуальных предметов в рамках проекта для администрирования.
ПримечаниеНе используйте данный метод для построения каталога магазина.
### Создание виртуального предмета
- [POST /v2/project/{project_id}/admin/items/virtual_items](https://developers.xsolla.com/ru/api/catalog/virtual-items-currency-admin/admin-create-virtual-item.md): Создает виртуальный предмет.
### Получение списка виртуальных предметов по указанному External ID группы
- [GET /v2/project/{project_id}/admin/items/virtual_items/group/external_id/{external_id}](https://developers.xsolla.com/ru/api/catalog/virtual-items-currency-admin/admin-get-virtual-items-list-by-group-external-id.md): Получает список виртуальных предметов в рамках группы для администрирования.
ПримечаниеНе используйте данный метод для построения каталога магазина.
### Получение списка виртуальных предметов по указанному ID группы
- [GET /v2/project/{project_id}/admin/items/virtual_items/group/id/{group_id}](https://developers.xsolla.com/ru/api/catalog/virtual-items-currency-admin/admin-get-virtual-items-list-by-group-id.md): Получает список виртуальных предметов в рамках группы для администрирования.
ПримечаниеНе используйте данный метод для построения каталога магазина.
### Удаление виртуального предмета
- [DELETE /v2/project/{project_id}/admin/items/virtual_items/sku/{item_sku}](https://developers.xsolla.com/ru/api/catalog/virtual-items-currency-admin/admin-delete-virtual-item.md): Удаляет виртуальный предмет.
### Получение виртуального предмета
- [GET /v2/project/{project_id}/admin/items/virtual_items/sku/{item_sku}](https://developers.xsolla.com/ru/api/catalog/virtual-items-currency-admin/admin-get-virtual-item.md): Получает виртуальный предмет в рамках проекта для администрирования.
ПримечаниеНе используйте данный метод для построения каталога магазина.
### Обновление виртуального предмета
- [PUT /v2/project/{project_id}/admin/items/virtual_items/sku/{item_sku}](https://developers.xsolla.com/ru/api/catalog/virtual-items-currency-admin/admin-update-virtual-item.md): Обновляет виртуальный предмет.
## Catalog
### Получение списка виртуальных валют
- [GET /v2/project/{project_id}/items/virtual_currency](https://developers.xsolla.com/ru/api/catalog/virtual-items-currency-catalog/get-virtual-currency.md): Gets a virtual currency list 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
This API call returns generic item catalog data when used without
authorization. Use authorization to retrieve
personalized
user data, such as limits and promotions associated with the item.
To do this, pass the user JWT in the Authorization header.
For more information about user JWT, see the Security block
for this call.
### Получение списка пакетов виртуальной валюты
- [GET /v2/project/{project_id}/items/virtual_currency/package](https://developers.xsolla.com/ru/api/catalog/virtual-items-currency-catalog/get-virtual-currency-package.md): Gets a virtual currency packages list 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
This API call returns generic item catalog data when used without
authorization. Use authorization to retrieve
personalized
user data, such as limits and promotions associated with the item.
To do this, pass the user JWT in the Authorization header.
For more information about user JWT, see the Security block
for this call.
### Получение пакета виртуальной валюты по артикулу
- [GET /v2/project/{project_id}/items/virtual_currency/package/sku/{virtual_currency_package_sku}](https://developers.xsolla.com/ru/api/catalog/virtual-items-currency-catalog/get-virtual-currency-package-sku.md): Gets a virtual currency packages by SKU for building a catalog.
Note
This API call returns generic item catalog data when used without
authorization. Use authorization to retrieve
personalized
user data, such as limits and promotions associated with the item.
To do this, pass the user JWT in the Authorization header.
For more information about user JWT, see the Security block
for this call.
### Получение виртуальной валюты по артукулу
- [GET /v2/project/{project_id}/items/virtual_currency/sku/{virtual_currency_sku}](https://developers.xsolla.com/ru/api/catalog/virtual-items-currency-catalog/get-virtual-currency-sku.md): Gets a virtual currency by SKU for building a catalog.
Note
This API call returns generic item catalog data when used without
authorization. Use authorization to retrieve
personalized
user data, such as limits and promotions associated with the item.
To do this, pass the user JWT in the Authorization header.
For more information about user JWT, see the Security block
for this call.
### Получение списка виртуальных предметов
- [GET /v2/project/{project_id}/items/virtual_items](https://developers.xsolla.com/ru/api/catalog/virtual-items-currency-catalog/get-virtual-items.md): Gets a virtual items list 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
This API call returns generic item catalog data when used without
authorization. Use authorization to retrieve
personalized
user data, such as limits and promotions associated with the item.
To do this, pass the user JWT in the Authorization header.
For more information about user JWT, see the Security block
for this call.
### Получение списка всех виртуальных предметов
- [GET /v2/project/{project_id}/items/virtual_items/all](https://developers.xsolla.com/ru/api/catalog/virtual-items-currency-catalog/get-all-virtual-items.md): Gets a list of all virtual items for searching on client-side.
Notice
Returns only item SKU, name, groups and description.
Note
This API call returns generic item catalog data when used without
authorization. Use authorization to retrieve
personalized
user data, such as limits and promotions associated with the item.
To do this, pass the user JWT in the Authorization header.
For more information about user JWT, see the Security block
for this call.
### Получение списка товаров по указанной группе
- [GET /v2/project/{project_id}/items/virtual_items/group/{external_id}](https://developers.xsolla.com/ru/api/catalog/virtual-items-currency-catalog/get-virtual-items-group.md): Gets an items 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
This API call returns generic item catalog data when used without
authorization. Use authorization to retrieve
personalized
user data, such as limits and promotions associated with the item.
To do this, pass the user JWT in the Authorization header.
For more information about user JWT, see the Security block
for this call.
### Получение виртуального предмета по артикулу
- [GET /v2/project/{project_id}/items/virtual_items/sku/{item_sku}](https://developers.xsolla.com/ru/api/catalog/virtual-items-currency-catalog/get-virtual-items-sku.md): Gets a virtual item by SKU for building a catalog.
Notice
This API call returns generic item
catalog data when used without authorization. Use authorization to retrieve
personalized
user data, such as limits and promotions associated with the item.
To do this, pass the user JWT in the Authorization header.
For more information about user JWT, see the Security block
for this call.
## Виртуальная оплата
### Создание заказа с указанным товаром, приобретенным за виртуальную валюту
- [POST /v2/project/{project_id}/payment/item/{item_sku}/virtual/{virtual_currency_sku}](https://developers.xsolla.com/ru/api/catalog/virtual-payment/create-order-with-item-for-virtual-currency.md): Creates item purchase using virtual currency.
Note
This API call returns generic item catalog data when used without
authorization. Use authorization to retrieve
personalized
user data, such as limits and promotions associated with the item.
To do this, pass the user JWT in the Authorization header.
For more information about user JWT, see the Security block
for this call.
## Catalog
### Получение списка игр
- [GET /v2/project/{project_id}/items/game](https://developers.xsolla.com/ru/api/catalog/game-keys-catalog/get-games-list.md): Gets a games list 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
This API call returns generic item catalog data when used without
authorization. Use authorization to retrieve
personalized
user data, such as limits and promotions associated with the item.
To do this, pass the user JWT in the Authorization header.
For more information about user JWT, see the Security block
for this call.
### Получение списка платформ
- [GET /v2/project/{project_id}/items/game/drm](https://developers.xsolla.com/ru/api/catalog/game-keys-catalog/get-drm-list.md): Получает список доступных платформ.
### Получение списка игр по указанной группе
- [GET /v2/project/{project_id}/items/game/group/{external_id}](https://developers.xsolla.com/ru/api/catalog/game-keys-catalog/get-games-group.md): Gets a games 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
This API call returns generic item catalog data when used without
authorization. Use authorization to retrieve
personalized
user data, such as limits and promotions associated with the item.
To do this, pass the user JWT in the Authorization header.
For more information about user JWT, see the Security block
for this call.
### Получение списка игровых ключей по указанной группе
- [GET /v2/project/{project_id}/items/game/key/group/{external_id}](https://developers.xsolla.com/ru/api/catalog/game-keys-catalog/get-game-keys-group.md): 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
This API call returns generic item catalog data when used without
authorization. Use authorization to retrieve
personalized
user data, such as limits and promotions associated with the item.
To do this, pass the user JWT in the Authorization header.
For more information about user JWT, see the Security block
for this call.
### Получение игрового ключа для каталога
- [GET /v2/project/{project_id}/items/game/key/sku/{item_sku}](https://developers.xsolla.com/ru/api/catalog/game-keys-catalog/get-game-key-by-sku.md): Gets a game key for the catalog.
Note
This API call returns generic item catalog data when used without
authorization. Use authorization to retrieve
personalized
user data, such as limits and promotions associated with the item.
To do this, pass the user JWT in the Authorization header.
For more information about user JWT, see the Security block
for this call.
### Получение игры для каталога
- [GET /v2/project/{project_id}/items/game/sku/{item_sku}](https://developers.xsolla.com/ru/api/catalog/game-keys-catalog/get-game-by-sku.md): Gets a game for the catalog.
Note
This API call returns generic item catalog data when used without
authorization. Use authorization to retrieve
personalized
user data, such as limits and promotions associated with the item.
To do this, pass the user JWT in the Authorization header.
For more information about user JWT, see the Security block
for this call.
## Владение играми
### Предоставление права владения (admin)
- [POST /v2/project/{project_id}/admin/entitlement/grant](https://developers.xsolla.com/ru/api/catalog/game-keys-entitlement/grant-entitlement-admin.md): Дает пользователю право владения.
ВниманиеМогут быть предоставлены только игровые ключи или игры для DRM-free-платформ.
### Отзыв права владения (admin)
- [POST /v2/project/{project_id}/admin/entitlement/revoke](https://developers.xsolla.com/ru/api/catalog/game-keys-entitlement/revoke-entitlement-admin.md): Отзывает право владения у пользователя.
ВниманиеМогут быть отозваны только игровые ключи или игры для DRM-free-платформ.
### Получение списка игр, принадлежащих пользователю
- [GET /v2/project/{project_id}/entitlement](https://developers.xsolla.com/ru/api/catalog/game-keys-entitlement/get-user-games.md): 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.
Note
This API call returns generic item catalog data when used without
authorization. Use authorization to retrieve
personalized
user data, such as limits and promotions associated with the item.
To do this, pass the user JWT in the Authorization header.
For more information about user JWT, see the Security block
for this call.
### Активация игрового ключа на стороне клиента
- [POST /v2/project/{project_id}/entitlement/redeem](https://developers.xsolla.com/ru/api/catalog/game-keys-entitlement/redeem-game-pin-code.md): Grants entitlement by a provided game code.
Notice
You can redeem codes only for the DRM-free platform.
Note
This API call returns generic item catalog data when used without
authorization. Use authorization to retrieve
personalized
user data, such as limits and promotions associated with the item.
To do this, pass the user JWT in the Authorization header.
For more information about user JWT, see the Security block
for this call.
## Admin
### Получение списка игр (admin)
- [GET /v2/project/{project_id}/admin/items/game](https://developers.xsolla.com/ru/api/catalog/game-keys-admin/admin-get-game-list.md): Получает список игр в рамках проекта для администрирования.
Игра состоит из игровых ключей, которые могут быть приобретены пользователем.
ПримечаниеНе используйте данный метод для построения каталога магазина.
### Создание игры
- [POST /v2/project/{project_id}/admin/items/game](https://developers.xsolla.com/ru/api/catalog/game-keys-admin/admin-create-game.md): Создает игру в проекте.
### Удаление игры по ID
- [DELETE /v2/project/{project_id}/admin/items/game/id/{item_id}](https://developers.xsolla.com/ru/api/catalog/game-keys-admin/admin-delete-game-by-id.md): Удаляет игру в проекте по ID.
### Получение игры по ID (admin)
- [GET /v2/project/{project_id}/admin/items/game/id/{item_id}](https://developers.xsolla.com/ru/api/catalog/game-keys-admin/admin-get-game-by-id.md): Получает игру для администрирования.
Игра состоит из игровых ключей, которые могут быть приобретены пользователем.
ПримечаниеНе используйте данный метод для построения каталога магазина.
### Обновление игры по ID
- [PUT /v2/project/{project_id}/admin/items/game/id/{item_id}](https://developers.xsolla.com/ru/api/catalog/game-keys-admin/admin-update-game-by-id.md): Обновляет игру в проекте по ID.
### Удаление кодов по ID
- [DELETE /v2/project/{project_id}/admin/items/game/key/delete/id/{item_id}](https://developers.xsolla.com/ru/api/catalog/game-keys-admin/admin-delete-codes-by-id.md): Удаляет все коды по ID игрового ключа.
### Удаление кодов
- [DELETE /v2/project/{project_id}/admin/items/game/key/delete/sku/{item_sku}](https://developers.xsolla.com/ru/api/catalog/game-keys-admin/admin-delete-codes-by-sku.md): Удаляет все коды по артикулу игрового ключа.
### Получение кодов по ID
- [GET /v2/project/{project_id}/admin/items/game/key/request/id/{item_id}](https://developers.xsolla.com/ru/api/catalog/game-keys-admin/admin-get-codes-by-id.md): Получает определенное количество кодов по ID игрового ключа.
### Получение кодов
- [GET /v2/project/{project_id}/admin/items/game/key/request/sku/{item_sku}](https://developers.xsolla.com/ru/api/catalog/game-keys-admin/admin-get-codes-by-sku.md): Получает определенное количество кодов по артикулу игрового ключа.
### Загрузка кодов по ID
- [POST /v2/project/{project_id}/admin/items/game/key/upload/id/{item_id}](https://developers.xsolla.com/ru/api/catalog/game-keys-admin/admin-upload-codes-by-id.md): Загружает коды по ID игрового ключа.
### Получение информации о сеансе загрузки кодов
- [GET /v2/project/{project_id}/admin/items/game/key/upload/session/{session_id}](https://developers.xsolla.com/ru/api/catalog/game-keys-admin/admin-get-codes-session.md): Получает информацию о сеансе загрузки кодов.
### Загрузка кодов
- [POST /v2/project/{project_id}/admin/items/game/key/upload/sku/{item_sku}](https://developers.xsolla.com/ru/api/catalog/game-keys-admin/admin-upload-codes-by-sku.md): Загружает коды по артикулу игрового ключа.
### Удаление игры по артикулу
- [DELETE /v2/project/{project_id}/admin/items/game/sku/{item_sku}](https://developers.xsolla.com/ru/api/catalog/game-keys-admin/admin-delete-game-by-sku.md): Удаляет игру в проекте по артикулу.
### Получение игры (admin)
- [GET /v2/project/{project_id}/admin/items/game/sku/{item_sku}](https://developers.xsolla.com/ru/api/catalog/game-keys-admin/admin-get-game-by-sku.md): Получает игру для администрирования.
Игра состоит из игровых ключей, которые могут быть приобретены пользователем.
ПримечаниеНе используйте данный метод для построения каталога магазина.
### Обновление игры по артикулу
- [PUT /v2/project/{project_id}/admin/items/game/sku/{item_sku}](https://developers.xsolla.com/ru/api/catalog/game-keys-admin/admin-update-game-by-sku.md): Обновляет игру в проекте по артикулу.
## Admin
### Получение списка бандлов
- [GET /v2/project/{project_id}/admin/items/bundle](https://developers.xsolla.com/ru/api/catalog/bundles-admin/admin-get-bundle-list.md): Получает список бандлов в рамках проекта для администрирования.
ПримечаниеНе используйте данный метод для построения каталога магазина.
### Создание бандла
- [POST /v2/project/{project_id}/admin/items/bundle](https://developers.xsolla.com/ru/api/catalog/bundles-admin/admin-create-bundle.md): Создает бандл.
### Получение списка бандлов по указанному External ID группы
- [GET /v2/project/{project_id}/admin/items/bundle/group/external_id/{external_id}](https://developers.xsolla.com/ru/api/catalog/bundles-admin/admin-get-bundle-list-in-group-by-external-id.md): Получает список бандлов в рамках группы для администрирования.
ПримечаниеНе используйте данный метод для построения каталога магазина.
### Получение списка бандлов по указанному ID группы
- [GET /v2/project/{project_id}/admin/items/bundle/group/id/{group_id}](https://developers.xsolla.com/ru/api/catalog/bundles-admin/admin-get-bundle-list-in-group-by-id.md): Получает список бандлов в рамках группы для администрирования.
ПримечаниеНе используйте данный метод для построения каталога магазина.
### Удаление бандла
- [DELETE /v2/project/{project_id}/admin/items/bundle/sku/{sku}](https://developers.xsolla.com/ru/api/catalog/bundles-admin/admin-delete-bundle.md): Удаляет бандл.
### Получение бандла
- [GET /v2/project/{project_id}/admin/items/bundle/sku/{sku}](https://developers.xsolla.com/ru/api/catalog/bundles-admin/admin-get-bundle.md): Получает бандл в рамках проекта для администрирования.
ПримечаниеНе используйте данный метод для построения каталога магазина.
### Обновление бандла
- [PUT /v2/project/{project_id}/admin/items/bundle/sku/{sku}](https://developers.xsolla.com/ru/api/catalog/bundles-admin/admin-update-bundle.md): Обновляет бандл.
### Скрытие бандла в каталоге
- [PUT /v2/project/{project_id}/admin/items/bundle/sku/{sku}/hide](https://developers.xsolla.com/ru/api/catalog/bundles-admin/admin-hide-bundle.md): Скрывает бандл в каталоге.
### Отображение бандла в каталоге
- [PUT /v2/project/{project_id}/admin/items/bundle/sku/{sku}/show](https://developers.xsolla.com/ru/api/catalog/bundles-admin/admin-show-bundle.md): Показывает бандл в каталоге.
## Catalog
### Получение списка бандлов
- [GET /v2/project/{project_id}/items/bundle](https://developers.xsolla.com/ru/api/catalog/bundles-catalog/get-bundle-list.md): Gets a list of bundles 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
This API call returns generic item catalog data when used without
authorization. Use authorization to retrieve
personalized
user data, such as limits and promotions associated with the item.
To do this, pass the user JWT in the Authorization header.
For more information about user JWT, see the Security block
for this call.
### Получение списка бандлов по указанной группе
- [GET /v2/project/{project_id}/items/bundle/group/{external_id}](https://developers.xsolla.com/ru/api/catalog/bundles-catalog/get-bundle-list-in-group.md): Gets a list of bundles within a 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
This API call returns generic item catalog data when used without
authorization. Use authorization to retrieve
personalized
user data, such as limits and promotions associated with the item.
To do this, pass the user JWT in the Authorization header.
For more information about user JWT, see the Security block
for this call.
### Получение указанного бандла
- [GET /v2/project/{project_id}/items/bundle/sku/{sku}](https://developers.xsolla.com/ru/api/catalog/bundles-catalog/get-bundle.md): Gets a specified bundle.
Note
This API call returns generic item catalog data when used without
authorization. Use authorization to retrieve
personalized
user data, such as limits and promotions associated with the item.
To do this, pass the user JWT in the Authorization header.
For more information about user JWT, see the Security block
for this call.
## Корзина (на стороне клиента)
### Получение корзины текущего пользователя
- [GET /v2/project/{project_id}/cart](https://developers.xsolla.com/ru/api/catalog/cart-client-side/get-user-cart.md): Возвращает корзину текущего пользователя.
### Удаление всех товаров из текущей корзины
- [PUT /v2/project/{project_id}/cart/clear](https://developers.xsolla.com/ru/api/catalog/cart-client-side/cart-clear.md): Удаляет все товары из корзины.
### Наполнение корзины товарами
- [PUT /v2/project/{project_id}/cart/fill](https://developers.xsolla.com/ru/api/catalog/cart-client-side/cart-fill.md): Наполняет корзину товарами. Если в корзине уже есть товар с тем же артикулом, существующий товар будет заменен переданным значением.
### Удаление товара из текущей корзины
- [DELETE /v2/project/{project_id}/cart/item/{item_sku}](https://developers.xsolla.com/ru/api/catalog/cart-client-side/delete-item.md): Удаляет товар из корзины.
### Обновление товара из текущей корзины
- [PUT /v2/project/{project_id}/cart/item/{item_sku}](https://developers.xsolla.com/ru/api/catalog/cart-client-side/put-item.md): Обновляет уже имеющийся в корзине товар или создает его в корзине.
### Получение корзины по ID корзины
- [GET /v2/project/{project_id}/cart/{cart_id}](https://developers.xsolla.com/ru/api/catalog/cart-client-side/get-cart-by-id.md): Возвращает корзину пользователя по ID корзины.
### Удаление всех товаров из корзины по ID корзины
- [PUT /v2/project/{project_id}/cart/{cart_id}/clear](https://developers.xsolla.com/ru/api/catalog/cart-client-side/cart-clear-by-id.md): Удаляет все товары из корзины.
### Наполнение определенной корзины товарами
- [PUT /v2/project/{project_id}/cart/{cart_id}/fill](https://developers.xsolla.com/ru/api/catalog/cart-client-side/cart-fill-by-id.md): Наполняет определенную корзину товарами. Если в корзине уже есть товар с тем же артикулом, существующая позиция товара будет заменен переданным значением.
### Удаление товара из корзины по ID корзины
- [DELETE /v2/project/{project_id}/cart/{cart_id}/item/{item_sku}](https://developers.xsolla.com/ru/api/catalog/cart-client-side/delete-item-by-cart-id.md): Удаляет товар из корзины.
### Обновление товара в корзине по ID корзины
- [PUT /v2/project/{project_id}/cart/{cart_id}/item/{item_sku}](https://developers.xsolla.com/ru/api/catalog/cart-client-side/put-item-by-cart-id.md): Обновляет уже имеющийся в корзине товар или создает его в корзине.
## Корзина (на стороне сервера)
### Наполнение корзины товарами
- [PUT /v2/admin/project/{project_id}/cart/fill](https://developers.xsolla.com/ru/api/catalog/cart-server-side/admin-cart-fill.md): Заполняет текущую корзину товарами. Если в корзине уже есть товар с таким же артикулом, существующий товар будет заменен на переданное значение.
### Наполнение корзины по ID корзины товарами
- [PUT /v2/admin/project/{project_id}/cart/{cart_id}/fill](https://developers.xsolla.com/ru/api/catalog/cart-server-side/admin-fill-cart-by-id.md): Заполняет корзину товарами по идентификатору корзины. Если в корзине уже есть товар с таким же артикулом, существующий товар будет заменен на переданное значение.
## Оплата (на стороне клиента)
### Создание заказа со всеми товарами из текущей корзины
- [POST /v2/project/{project_id}/payment/cart](https://developers.xsolla.com/ru/api/catalog/payment-client-side/create-order.md): Используется для интеграции клиент-сервер. Создает заказ со всеми товарами из корзины и генерирует для него токен оплаты. Созданный заказ получает new статус заказа.
IP-адрес клиента используется для определения страны пользователя, которая затем используется для применения соответствующей валюты и доступных способов оплаты заказа.
Чтобы открыть платежный интерфейс в новом окне, воспользуйтесь следующей ссылкой: https://secure.xsolla.com/paystation4/?token={token}, где {token} — полученный токен.
Для целей тестирования используйте этот URL-адрес: https://sandbox-secure.xsolla.com/paystation4/?token={token}.
Внимание Поскольку этот метод использует IP-адрес для определения страны пользователя и валюты для заказа, важно использовать этот метод только на стороне клиента, а не на стороне сервера. Использование этого метода на стороне сервера может привести к неправильному определению валюты и повлиять на способы оплаты в Pay Station.
### Создание заказа со всеми товарами из определенной корзины
- [POST /v2/project/{project_id}/payment/cart/{cart_id}](https://developers.xsolla.com/ru/api/catalog/payment-client-side/create-order-by-cart-id.md): Используется для интеграции клиент-сервер. Создает заказ со всеми товарами из конкретной корзины и генерирует для него токен оплаты. Созданный заказ получает статус заказа new.
IP-адрес клиента используется для определения страны пользователя, которая затем используется для применения соответствующей валюты и доступных способов оплаты заказа.
Чтобы открыть платежный интерфейс в новом окне, воспользуйтесь следующей ссылкой: https://secure.xsolla.com/paystation4/?token={token}, где {token} — полученный токен.
Для целей тестирования используйте этот URL-адрес: https://sandbox-secure.xsolla.com/paystation4/?token={token}.
ПримечаниеПоскольку этот метод использует IP-адрес для определения страны пользователя и выбора валюты для заказа, важно использовать этот метод только на стороне клиента, а не на стороне сервера. Использование этого метода на стороне сервера может привести к неправильному определению валюты и повлиять на способы оплаты в Pay Station.
### Создание заказа с указанным товаром
- [POST /v2/project/{project_id}/payment/item/{item_sku}](https://developers.xsolla.com/ru/api/catalog/payment-client-side/create-order-with-item.md): Used for client-to-server integration. Creates an order with a specified item and generates a payment token for it. The created order gets the new order status.
The client IP is used to determine the user’s country, which is then used to apply the corresponding currency and available payment methods for the order.
To open the payment UI in a new window, use the following link: https://secure.xsolla.com/paystation4/?token={token}, where {token} is the received token.
For testing purposes, use this URL: https://sandbox-secure.xsolla.com/paystation4/?token={token}.
Notice As this method uses the IP to determine the user’s country and select a currency for the order, it is important to only use this method from the client side and not from the server side. Using this method from the server side may cause incorrect currency determination and affect payment methods in Pay Station.
Notice
This API call uses a user JWT for authorization.
Include the token in the Authorization header in the following format: Bearer <user_JWT>. For more information about user JWT, see the Security block for this call.
## Оплата (на стороне сервера)
### Создание платежного токена для покупки
- [POST /v3/project/{project_id}/admin/payment/token](https://developers.xsolla.com/ru/api/catalog/payment-server-side/admin-create-payment-token.md): Генерирует заказ и платежный токен для него. Заказ генерируется на основе товаров, переданных в теле запроса.
Чтобы открыть платежный интерфейс в новом окне, воспользуйтесь следующей ссылкой: https://secure.xsolla.com/paystation4/?token={token}, где {token} — полученный токен.
Для целей тестирования используйте этот URL-адрес: https://sandbox-secure.xsolla.com/paystation4/?token={token}.
Внимание
Параметр user.country.value используется для выбора валюты для заказа. Если страна пользователя неизвестна,
альтернативным вариантом является указание IP-адреса пользователя в X-User-Ip заголовке. Для корректной работы метода требуется один из этих двух вариантов. Выбранная валюта используется для оплаты в Pay Station.
## Заказ
### Получение заказа
- [GET /v2/project/{project_id}/order/{order_id}](https://developers.xsolla.com/ru/api/catalog/order/get-order.md): Получает указанный заказ.
### Получение списка заказов за указанный период
- [POST /v3/project/{project_id}/admin/order/search](https://developers.xsolla.com/ru/api/catalog/order/admin-order-search.md): Возвращает список заказов, упорядоченный по дате создания — от самой ранней до самой поздней.
## Бесплатные товары
### Создание заказа с помощью бесплатной корзины
- [POST /v2/project/{project_id}/free/cart](https://developers.xsolla.com/ru/api/catalog/free-item/create-free-order.md): Создает заказ со всеми товарами из бесплатной корзины. Созданному заказу будет присвоен статус заказа done.
### Создание заказа с помощью определенной бесплатной корзины
- [POST /v2/project/{project_id}/free/cart/{cart_id}](https://developers.xsolla.com/ru/api/catalog/free-item/create-free-order-by-cart-id.md): Создает заказ со всеми товарами из определенной бесплатной корзины. Созданному заказу будет присвоен статус заказа done.
### Создание заказа с указанным бесплатным товаром
- [POST /v2/project/{project_id}/free/item/{item_sku}](https://developers.xsolla.com/ru/api/catalog/free-item/create-free-order-with-item.md): Creates an order with a specified free item. The created order will get a done order status.
Note
This API call returns generic item catalog data when used without
authorization. Use authorization to retrieve
personalized
user data, such as limits and promotions associated with the item.
To do this, pass the user JWT in the Authorization header.
For more information about user JWT, see the Security block
for this call.
## Управление
### Обновление всех лимитов на покупку для пользователя
- [DELETE /v2/project/{project_id}/admin/user/limit/item/all](https://developers.xsolla.com/ru/api/catalog/user-limits-admin/reset-all-user-items-limit.md): Обновляет все лимиты на покупку для всех товаров для указанного пользователя, чтобы он мог приобрести эти товары снова.
API лимитов на покупку позволяет вам продавать товар в ограниченном количестве. Чтобы настроить лимиты покупок, перейдите в раздел Admin нужного типа товара:
* Игровые ключи
* Виртуальные предметы и валюта
* Бандлы
### Уменьшение лимита доступных пользователю товаров
- [DELETE /v2/project/{project_id}/admin/user/limit/item/sku/{item_sku}](https://developers.xsolla.com/ru/api/catalog/user-limits-admin/remove-user-item-limit.md): Уменьшает оставшееся количество товаров, доступных указанному пользователю в пределах установленного лимита.
API лимитов на покупку позволяет вам продавать товар в ограниченном количестве. Чтобы настроить лимиты покупок, перейдите в раздел Admin нужного типа товара:
* Игровые ключи
*Виртуальные предметы и валюта
* Бандлы
### Получение лимита доступных пользователю товаров
- [GET /v2/project/{project_id}/admin/user/limit/item/sku/{item_sku}](https://developers.xsolla.com/ru/api/catalog/user-limits-admin/get-user-item-limit.md): Возвращает оставшееся количество товаров, доступных указанному пользователю, в пределах установленного ограничения.
User limit API позволяет вам продавать товар в ограниченном количестве. Чтобы настроить ограничения на покупку, перейдите в раздел Admin нужного типа товара:
* Игровые ключи
* Виртуальные предметы и валюта
* Бандлы
### Увеличение лимита доступных пользователю товаров
- [POST /v2/project/{project_id}/admin/user/limit/item/sku/{item_sku}](https://developers.xsolla.com/ru/api/catalog/user-limits-admin/add-user-item-limit.md): Увеличивает оставшееся количество товаров, доступных указанному пользователю, в пределах установленного ограничения.
User limit API позволяет продавать товар в ограниченном количестве. Чтобы настроить ограничения на покупку, перейдите в раздел Admin нужного типа товара:
* Игровые ключи
* Виртуальные предметы и валюта
* Бандлы
### Настройка лимита доступных пользователю товаров
- [PUT /v2/project/{project_id}/admin/user/limit/item/sku/{item_sku}](https://developers.xsolla.com/ru/api/catalog/user-limits-admin/set-user-item-limit.md): Устанавливает количество товаров, которые указанный пользователь может купить в пределах ограничения, примененного после его увеличения или уменьшения.
User limit API позволяет продавать товар в ограниченном количестве. Чтобы настроить ограничения покупку, перейдите в раздел Admin нужного типа товара:
* Игровые ключи
* Виртуальные предметы и валюта
* Бандлы
### Обновление лимита на покупку
- [DELETE /v2/project/{project_id}/admin/user/limit/item/sku/{item_sku}/all](https://developers.xsolla.com/ru/api/catalog/user-limits-admin/reset-user-item-limit.md): Обновляет лимит на покупку товара, чтобы пользователь мог купить его снова. Если параметр user равен null, этот метод обновляет лимит для всех пользователей.
API лимитов на покупку позволяет вам продавать товар в ограниченном количестве. Чтобы настроить лимиты покупок, перейдите в раздел Admin нужного типа товара:
* Игровые ключи
* Виртуальные предметы и валюта
* Бандлы
## Admin
### Получение статуса импорта товаров
- [GET /v1/admin/projects/{project_id}/connectors/import_items/import/status](https://developers.xsolla.com/ru/api/catalog/connector-admin/get-items-import-status.md): Возвращает информацию о прогрессе импорта товаров в проект. Метод возвращает данные по последнему импорту, выполненному через API или Личный кабинет.
### Импорт товаров из JSON-файла
- [POST /v1/projects/{project_id}/import/from_external_file](https://developers.xsolla.com/ru/api/catalog/connector-admin/import-items-from-external-file.md): Импортирует товары в магазин из JSON-файла по указанному URL-адресу. Подробная информация об импорте из JSON-файла приведена в документации.
## Предзаказы
### Уменьшение лимита предзаказа товара
- [DELETE /v2/project/{project_id}/admin/items/pre_order/limit/item/sku/{item_sku}](https://developers.xsolla.com/ru/api/catalog/common-pre-orders/remove-pre-order-limit.md): Удаляет ограничение на количество предзаказа товара.
Pre-Order limit API позволяет продавать товар в ограниченном количестве. Для настройки самого предзаказа перейдите в раздел Admin желаемого товара:
* Игровые ключи
* Виртуальные предметы и валюта
* Бандлы
Алиасы для данного эндпоинта:
* /v2/project/{project_id}/admin/items/pre_order/limit/item/id/{item_id}
### Получение информации о лимите предзаказа товара
- [GET /v2/project/{project_id}/admin/items/pre_order/limit/item/sku/{item_sku}](https://developers.xsolla.com/ru/api/catalog/common-pre-orders/get-pre-order-limit.md): Возвращает ограничение на предзаказ товара.
Pre-Order limit API позволяет вам продавать товар в ограниченном количестве. Для настройки самого предварительного заказа перейдите в раздел администратора модуля нужного товара:
* Игровые ключи
* Виртуальные предметы и валюта
* Бандлы
Aliases для этой конечной точки:
* /v2/project/{project_id}/admin/items/pre_order/limit/item/id/{item_id}
### Увеличение лимита предзаказа товара
- [POST /v2/project/{project_id}/admin/items/pre_order/limit/item/sku/{item_sku}](https://developers.xsolla.com/ru/api/catalog/common-pre-orders/add-pre-order-limit.md): Добавляет количество к ограничению на предзаказ товара.
Pre-Order limit API позволяет вам продавать товар в ограниченном количестве. Для настройки самого предварительного заказа перейдите в раздел администратора модуля нужного товара:
* Игровые ключи
* Виртуальные предметы и валюта
* Бандлы
Aliases для этой конечной точки:
*/v2/project/{project_id}/admin/items/pre_order/limit/item/id/{item_id}
### Установка/обновление лимита предзаказа товара
- [PUT /v2/project/{project_id}/admin/items/pre_order/limit/item/sku/{item_sku}](https://developers.xsolla.com/ru/api/catalog/common-pre-orders/set-pre-order-limit.md): Устанавливает ограничение на количество товара для предварительного заказа.
Pre-Order limit API позволяет вам продавать товар в ограниченном количестве. Для настройки самого предварительного заказа перейдите в раздел администратора модуля нужного товара:
* Игровые ключи
* Виртуальные предметы и валюта
* Бандлы
Aliases для этой конечной точки:
* /v2/project/{project_id}/admin/items/pre_order/limit/item/id/{item_id}
### Обнуление лимита предзаказа товара
- [DELETE /v2/project/{project_id}/admin/items/pre_order/limit/item/sku/{item_sku}/all](https://developers.xsolla.com/ru/api/catalog/common-pre-orders/remove-all-pre-order-limit.md): Удаляет все ограничения по количеству товара, предусмотренные для предварительного заказа.
Pre-Order limit API позволяет вам продавать товар в ограниченном количестве. Для настройки самого предварительного заказа перейдите в раздел администратора модуля нужного товара:
* Игровые ключи
* Виртуальные предметы и валюта
* Бандлы
Aliases для этой конечной точки:
* /v2/project/{project_id}/admin/items/pre_order/limit/item/id/{item_id}/all
### Включение/отключение лимита предзаказа товара
- [PUT /v2/project/{project_id}/admin/items/pre_order/limit/item/sku/{item_sku}/toggle](https://developers.xsolla.com/ru/api/catalog/common-pre-orders/toggle-pre-order-limit.md): Включает/отключает лимит предзаказа товара.
API лимитов для предзаказов позволяет продавать товар в ограниченном количестве. Для настройки самого предзаказа перейдите в раздел Admin желаемого товара:
* Игровые ключи
* Виртуальные предметы и валюта
* Бандлы
Алиасы для данного метода:
* /v2/project/{project_id}/admin/items/pre_order/limit/item/id/{item_id}/toggle
## Продавец
### Получение проектов
- [GET /v2/merchant/{merchant_id}/projects](https://developers.xsolla.com/ru/api/catalog/common-merchant/get-projects.md): Получает список проектов мерчанта.
Внимание Этот метод API не включает в себя path-параметр project_id, поэтому для авторизации вам необходимо использовать ключ API, который действует во всех проектах.
## Catalog
Данный API позволяет получать продаваемые товары любого вида или конкретный товар.
### Получение списка продаваемых товаров
- [GET /v2/project/{project_id}/items](https://developers.xsolla.com/ru/api/catalog/common-catalog/get-sellable-items.md): Gets a sellable items list 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
This API call returns generic item catalog data when used without
authorization. Use authorization to retrieve
personalized
user data, such as limits and promotions associated with the item.
To do this, pass the user JWT in the Authorization header.
For more information about user JWT, see the Security block
for this call.
### Получение списка продаваемых товаров по указанной группе
- [GET /v2/project/{project_id}/items/group/{external_id}](https://developers.xsolla.com/ru/api/catalog/common-catalog/get-sellable-items-group.md): Gets a sellable items 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
This API call returns generic item catalog data when used without
authorization. Use authorization to retrieve
personalized
user data, such as limits and promotions associated with the item.
To do this, pass the user JWT in the Authorization header.
For more information about user JWT, see the Security block
for this call.
### Получение продаваемого товара по ID
- [GET /v2/project/{project_id}/items/id/{item_id}](https://developers.xsolla.com/ru/api/catalog/common-catalog/get-sellable-item-by-id.md): Gets a sellable item by its ID.
Note
This API call returns generic item catalog data when used without
authorization. Use authorization to retrieve
personalized
user data, such as limits and promotions associated with the item.
To do this, pass the user JWT in the Authorization header.
For more information about user JWT, see the Security block
for this call.
### Получение продаваемого товара по артикулу
- [GET /v2/project/{project_id}/items/sku/{sku}](https://developers.xsolla.com/ru/api/catalog/common-catalog/get-sellable-item-by-sku.md): Gets a sellable item by SKU for building a catalog.
Note
This API call returns generic item catalog data when used without
authorization. Use authorization to retrieve
personalized
user data, such as limits and promotions associated with the item.
To do this, pass the user JWT in the Authorization header.
For more information about user JWT, see the Security block
for this call.
## Общие регионы
### Получение списка регионов
- [GET /v2/project/{project_id}/admin/region](https://developers.xsolla.com/ru/api/catalog/common-regions/admin-get-regions.md): Получает список регионов.
Вы можете использовать регион для управления вашими региональными ограничениями.
### Создание региона
- [POST /v2/project/{project_id}/admin/region](https://developers.xsolla.com/ru/api/catalog/common-regions/admin-create-region.md): Создает регион.
Вы можете использовать регион для управления вашими региональными ограничениями.
### Удаление региона
- [DELETE /v2/project/{project_id}/admin/region/{region_id}](https://developers.xsolla.com/ru/api/catalog/common-regions/admin-delete-region.md): Удаляет определенный регион.
### Получение региона
- [GET /v2/project/{project_id}/admin/region/{region_id}](https://developers.xsolla.com/ru/api/catalog/common-regions/admin-get-region.md): Получает определенный регион.
Вы можете использовать регион для управления вашими региональными ограничениями.
### Обновление региона
- [PUT /v2/project/{project_id}/admin/region/{region_id}](https://developers.xsolla.com/ru/api/catalog/common-regions/admin-update-region.md): Обновляет определенный регион.
Вы можете использовать регион для управления вашими региональными ограничениями.
## Admin
### Получение списка атрибутов (admin)
- [GET /v2/project/{project_id}/admin/attribute](https://developers.xsolla.com/ru/api/catalog/attribute-admin/admin-get-attribute-list.md): Получает список атрибутов из проекта для администрирования.
### Создание атрибута
- [POST /v2/project/{project_id}/admin/attribute](https://developers.xsolla.com/ru/api/catalog/attribute-admin/admin-create-attribute.md): Создает атрибут.
### Удаление атрибута
- [DELETE /v2/project/{project_id}/admin/attribute/{external_id}](https://developers.xsolla.com/ru/api/catalog/attribute-admin/delete-attribute.md): Удаляет атрибут.
ВниманиеЕсли вы удалите атрибут товара, все его данные и связи с товарами будут удалены.
### Получение указанного атрибута
- [GET /v2/project/{project_id}/admin/attribute/{external_id}](https://developers.xsolla.com/ru/api/catalog/attribute-admin/admin-get-attribute.md): Получает указанный атрибут.
### Обновление атрибута
- [PUT /v2/project/{project_id}/admin/attribute/{external_id}](https://developers.xsolla.com/ru/api/catalog/attribute-admin/admin-update-attribute.md): Обновляет атрибут.
### Удаление всех значений атрибута
- [DELETE /v2/project/{project_id}/admin/attribute/{external_id}/value](https://developers.xsolla.com/ru/api/catalog/attribute-admin/admin-delete-all-attribute-value.md): Удаляет все значения атрибута.
ВниманиеЕсли вы удалите значение атрибута, связь атрибута с товарами будет потеряна. Чтобы изменить значение атрибута для товара, используйте метод Обновление значения атрибута вместо удаления значения и создания нового.
### Создание значения атрибута
- [POST /v2/project/{project_id}/admin/attribute/{external_id}/value](https://developers.xsolla.com/ru/api/catalog/attribute-admin/admin-create-attribute-value.md): Создает значение атрибута.
ВниманиеВсе проекты имеют ограничение на количество значений атрибута. Значение по умолчанию и максимальное значение — 20 значений для каждого атрибута.
### Удаление значения атрибута
- [DELETE /v2/project/{project_id}/admin/attribute/{external_id}/value/{value_external_id}](https://developers.xsolla.com/ru/api/catalog/attribute-admin/admin-delete-attribute-value.md): Удаляет значение атрибута.
ВниманиеЕсли вы удалите значение атрибута, связь атрибута с товарами будет потеряна. Чтобы изменить значение атрибута для товара, используйте метод Обновление значения атрибута вместо удаления значения и создания нового.
### Обновление значения атрибута
- [PUT /v2/project/{project_id}/admin/attribute/{external_id}/value/{value_external_id}](https://developers.xsolla.com/ru/api/catalog/attribute-admin/admin-update-attribute-value.md): Обновляет значения атрибута.
## Admin
### Reorder items within a group (by ID)
- [PUT /v2/project/{project_id}/admin/group/id/{id}/order/item](https://developers.xsolla.com/ru/api/catalog/item-groups-admin/admin-reorder-items-in-group-by-id.md): Sets the display order of items within a group identified by its internal numeric ID. Pass an array of items with their new order values.
### Reorder item groups
- [PUT /v2/project/{project_id}/admin/group/order](https://developers.xsolla.com/ru/api/catalog/item-groups-admin/admin-reorder-item-groups.md): Sets the display order for item groups within a project. Pass an array of groups with their new order values.
### Reorder items within a group (by external ID)
- [PUT /v2/project/{project_id}/admin/group/{external_id}/order/item](https://developers.xsolla.com/ru/api/catalog/item-groups-admin/admin-reorder-items-in-group.md): Sets the display order of items within a group identified by its external ID. Pass an array of items with their new order values.
### Получение списка групп товаров
- [GET /v2/project/{project_id}/admin/items/groups](https://developers.xsolla.com/ru/api/catalog/item-groups-admin/admin-get-item-group-list.md): Retrieves the full list of item groups within a project without pagination. For administrative purposes.
NoteDo not use this endpoint for building a store catalog. Use the Get item group list client-side endpoint instead.
### Create item group
- [POST /v2/project/{project_id}/admin/items/groups](https://developers.xsolla.com/ru/api/catalog/item-groups-admin/admin-create-item-group.md): Creates an item group within a project.
To retrieve item groups for building a catalog, use the Get item group list client-side endpoint.
### Delete item group
- [DELETE /v2/project/{project_id}/admin/items/groups/{external_id}](https://developers.xsolla.com/ru/api/catalog/item-groups-admin/admin-delete-item-group.md): Deletes an item group by its external ID.
### Get item group by external ID
- [GET /v2/project/{project_id}/admin/items/groups/{external_id}](https://developers.xsolla.com/ru/api/catalog/item-groups-admin/admin-get-item-group.md): Retrieves an item group by its external ID for administrative purposes.
NoteDo not use this endpoint for building a store catalog. Use the Get item group list client-side endpoint instead.
### Update item group
- [PUT /v2/project/{project_id}/admin/items/groups/{external_id}](https://developers.xsolla.com/ru/api/catalog/item-groups-admin/admin-update-item-group.md): Updates an item group by its external ID.
### Get item group list filtered by item type
- [GET /v2/project/{project_id}/admin/items/{item_type}/groups](https://developers.xsolla.com/ru/api/catalog/item-groups-admin/admin-get-item-group-list-by-item-type.md): Retrieves item group list with filtering by item type. Only items of the specified type are counted for the group. This is similar to the Get item group list endpoint, with additional filtering of items by type when counting them.
### Get item group by external ID filtered by item type
- [GET /v2/project/{project_id}/admin/items/{item_type}/groups/{external_id}](https://developers.xsolla.com/ru/api/catalog/item-groups-admin/admin-get-item-group-by-item-type.md): Retrieves an item group by external ID. Only items of the specified type are counted for the group. This is similar to the Get item group by external ID endpoint, with additional filtering of items by type when counting them.
## Catalog
### Получение списка групп товаров
- [GET /v2/project/{project_id}/items/groups](https://developers.xsolla.com/ru/api/catalog/item-groups-catalog/get-item-groups.md): Retrieves an item group list for building a catalog without pagination.
NoteThe 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.