콘텐츠로 건너뛰기

Overview

  • Version: 2.0.0
  • Servers: https://store.xsolla.com/api
  • Contact Us by Email
  • Contact URL: https://xsolla.com/
  • Required TLS version: 1.2

The Catalog API allows you to configure a catalog of in-game items on the Xsolla side and display the catalog to users in your store.

The API allows you to manage the following catalog entities:

  • Virtual items — in-game items such as weapons, skins, boosters.
  • Virtual currency — virtual money used to purchase virtual goods.
  • Virtual currency packages — predefined bundles of virtual currency.
  • Bundles — combined packages of virtual items, currency, or game keys sold as a single SKU.
  • Game keys — keys for games and DLCs distributed via platforms like Steam or other DRM providers.
  • Groups — logical groupings for organizing and sorting items within the catalog.

API calls

The API is divided into the following groups:

  • Admin — calls for creating, updating, deleting, and configuring catalog items and groups. Authenticated via basic access authentication with your merchant or project credentials. Not intended for storefront use.
  • Catalog — calls for retrieving items and building custom storefronts for end users. Designed to handle high-load scenarios. Support optional user JWT authorization to return personalized data such as user-specific limits and active promotions.

Authentication

API calls require authentication either on behalf of a user or on behalf of a project. The authentication scheme used is specified in the Security section in the description of each call.

Authentication using user's JWT

User's JWT authentication is used when a request is sent from a browser, mobile application, or game. By default, the XsollaLoginUserJWT scheme is applied. For details on how to create a token, see the Xsolla Login API documentation.

The token is passed in the Authorization header in the following format: Authorization: Bearer <user_JWT>, where <user_JWT> 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.

Basic HTTP authentication

Basic HTTP authentication is used for server-to-server interactions, when an API call is sent directly from your server rather than from a user's browser or mobile application. HTTP Basic authentication with an API key is typically used.

Note

The API key is confidential and must not be stored or used in client applications.

With basic server-side authentication, all API requests must include the following header:

  • for basicAuthAuthorization: Basic <your_authorization_basic_key>, where your_authorization_basic_key is the project_id:api_key pair encoded in Base64
  • for basicMerchantAuthAuthorization: Basic <your_authorization_basic_key>, where your_authorization_basic_key is the merchant_id:api_key pair encoded in Base64

You can find the parameter values in Publisher Account:

  • merchant_id is displayed:
    • In Company settings > Company.
    • 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>.
  • project_id is displayed:
    • Next to the project name in Publisher Account.
    • In the URL in the browser address bar when working on a project in Publisher Account. The URL has the following format: https://publisher.xsolla.com/<merchant_id>/projects/<project_id>.
  • api_key is shown in Publisher Account only at the time of creation and must be stored securely on your side. You can create an API key in the following sections:
Notice

If a required API call doesn't include the project_id path parameter, use an API key that is valid across all company projects for authorization.

For more information about working with API keys, see the API references.

Authentication with guest access support

The AuthForCart authentication scheme is used for cart purchases and supports two modes:

  1. Authentication with a user's JWT. The token is passed in the Authorization header in the following format: Authorization: Bearer <user_JWT>, where <user_JWT> 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.

  1. Simplified mode without Authorization header. This mode is used only for unauthorized users and can be applied only for game key sales. 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

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

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:

{
  "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.

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:

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:

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:

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 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 API call or the Create order with free cart 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. 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 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:
Note

To get the current status of the cart, use the Get current user's cart API call.
  1. Use the Create order with all items from current cart 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 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 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.

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

Buying virtual currency and items for real currency is possible only after signing a license agreement with Xsolla. To do this, in Publisher Account, 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:

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:

{
  "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 format.

The following are supported:

  • UTC offset
  • null value when there is no time restriction for displaying an item
  • Unix timestamp (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.

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:

{
  "name": {
    "en": "Starter Pack",
    "ru": "Стартовый набор"
  }
}

Example with a five-letter language code:

{
  "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.

Response example:

{
  "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:

{
  "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.
OpenAPI 설명 다운로드
언어
서버
https://store.xsolla.com/api/
Mock server
https://xsolla.redocly.app/_mock/ko/api/catalog/
작업
작업
작업
작업
작업
작업
작업
작업
작업
작업
작업
작업
작업
작업

무료 장바구니로 주문 생성하기Client-side

요청

무료 장바구니의 모든 아이템으로 주문을 생성합니다. 생성된 주문은 done 주문 상태를 가져옵니다.

보안
AuthForCart
경로
project_idinteger필수

Project ID. You can find this parameter in your Publisher Account next to the project name and in the browser address bar when working with a project. The URL has the following format: https://publisher.xsolla.com/<merchant_id>/projects/<project_id>.

예제: 44056
본문application/json
currencystring

주문 가격 통화입니다. ISO 4217에 따른 3글자 통화 코드입니다. 엑솔라에서 지원하는 통화에 대한 자세한 정보는 설명서를 확인하십시오.

custom_parametersobject[ 1 .. 200 ] properties

프로젝트별 매개 변수입니다.

localestring

응답 언어입니다.

sandboxboolean

샌드박스 모드로 주문을 생성합니다. 이 옵션은 회사 사용자 목록에서 지정한 사용자에게 사용할 수 있습니다.

기본값 false
settingsobject

사용자의 결제 프로세스와 결제 UI를 구성하는 설정입니다.

settings.​payment_methodinteger(Cart-Payment_settings_payment_method)>= 1

결제 수단 ID입니다. 일부 결제 방법은 특정 통화만 지원할 수 있으므로 결제 인터페이스에서 통화 표시를 결정합니다.

settings.​redirect_policyobject(Cart-Payment_redirect_policy)
settings.​redirect_policy.​delayinteger

지연 후 사용자가 자동으로 반환 URL로 리디렉션됩니다.

예제: 0
settings.​redirect_policy.​redirect_button_captionstring

현지화된 리디렉션 버튼 캡션입니다.

예제: "Text button"
settings.​redirect_policy.​redirect_conditionsstring

사용자를 반환 URL로 리디렉션하도록 트리거하는 결제 상태입니다.

열거형"none""successful""successful_or_canceled""any"
예제: "none"
settings.​redirect_policy.​status_for_manual_redirectionstring

사용자를 반환 URL로 리디렉션하는 버튼 클릭 표시를 트리거하는 결제 상태입니다.

열거형"none""successful""successful_or_canceled""any"
예제: "none"
settings.​return_urlstring(uri)(Cart-Payment_settings_return_url)<= 1000 characters

결제 후 사용자를 리디렉션하는 페이지입니다. 매개 변수 user_id, foreigninvoice, invoice_id, status가 자동으로 링크에 추가됩니다.

settings.​uiobject(Cart-Payment_settings_ui)

인터페이스 설정입니다.

settings.​ui.​currency_formatstring

결제 UI에 3자리 ISO 4217 통화 코드를 표시하려면 code로 설정하십시오. 기본적으로는 3자리 통화 코드 대신 통화 기호가 표시됩니다.

settings.​ui.​desktopobject

데스크톱 버전용 인터페이스 설정입니다.

settings.​ui.​desktop.​headerobject

헤더 설정입니다.

settings.​ui.​desktop.​header.​close_buttonboolean

데스크톱 결제 UI에 닫기 버튼을 표시할지 여부입니다. 이 버튼은 결제 UI를 닫고 사용자를 settings.return_url 매개 변수에 지정된 URL로 리디렉션합니다. 기본적으로 false로 설정되어 있습니다.

기본값 false
settings.​ui.​desktop.​header.​is_visibleboolean

결제 UI에 헤더를 표시할지 여부입니다.

settings.​ui.​desktop.​header.​typestring

헤더를 표시하는 방식입니다. compact(프로젝트 이름 및 사용자 ID 표시 안 함) 또는 normal(기본값)일 수 있습니다.

기본값 "normal"
열거형"compact""normal"
settings.​ui.​desktop.​header.​visible_logoboolean

true인 경우, 헤더에 로고가 표시됩니다. 이미지를 업로드하려면 관리자 페이지에서 프로젝트를 열고 페이 스테이션 > 설정 섹션으로 이동하십시오.

settings.​ui.​desktop.​header.​visible_nameboolean

프로젝트 이름을 헤더에 표시할지 여부를 나타냅니다.

settings.​ui.​desktop.​header.​visible_purchaseboolean

헤더에 구매 설명(purchase.description.value)을 표시할지 여부입니다. 기본값은 true입니다.

기본값 true
settings.​ui.​headerobject
settings.​ui.​header.​visible_virtual_currency_balanceboolean

결제 UI에서 이 요소를 숨길 수 있는지 여부입니다.

기본값 true
settings.​ui.​is_cart_open_by_defaultboolean

모바일 버전으로 결제 UI를 열 때 장바구니에 있는 아이템 목록을 표시할지 여부입니다. true이면 목록이 확장된 보기로 표시됩니다. false(기본값)이거나 매개 변수가 전달되지 않으면 목록이 축소된 보기로 표시됩니다.

기본값 false
settings.​ui.​is_independent_windowsboolean

삽입된 런처의 브라우저(WebView)에서 기본 브라우저로 사용자를 리디렉션하여 구매할지 여부입니다.

기본값 false
settings.​ui.​is_payment_methods_list_modeboolean

결제 UI를 열 때 사용자의 국가에서 사용할 수 있는 결제 방식 목록이 표시되는지 여부입니다. false(기본값)인 경우 settings.payment_method 매개 변수에서 전달된 결제 방식이나 PayRank 알고리즘으로 선택한 결제 방식이 표시됩니다.

기본값 false
settings.​ui.​is_prevent_external_link_openboolean

외부 자원에 대한 링크를 리디렉션할지 여부입니다. 외부 링크를 클릭하면 postMessage 메커니즘을 통해 external-link-open 이벤트가 전송됩니다. 리디렉션된 링크 주소는 url 매개 변수에 전달됩니다 .

기본값 false
settings.​ui.​is_show_close_widget_warningboolean

결제 페이지를 닫기 전에 × 아이콘 위로 마우스를 가져갔을 때 거래 처리에 대한 경고를 표시할지 여부입니다. false가 전달되거나 매개 변수가 전달되지 않으면 경고가 표시되지 않습니다.

기본값 true
settings.​ui.​is_three_ds_independent_windowsboolean

3-D 보안 확인이 새 브라우저 창에서 열릴지 여부입니다. 설정에서 CSP(콘텐츠 보안 정책)를 적용하는 경우로 true설정합니다.

기본값 false
settings.​ui.​layoutstring

결제 UI의 주요 요소 위치. 게임 내부에서 결제 UI를 열거나 주문 및 결제 방식에 대한 정보로 열을 바꿀 수 있습니다. 자세한 정보는 사용자 정의 지침을 참조해 주세요.

열거형"embed""column_reverse""embed_column_reverse"
settings.​ui.​mobileobject
settings.​ui.​mobile.​headerobject
settings.​ui.​mobile.​header.​close_buttonboolean

모바일 결제 UI에 닫기 버튼을 표시할지 여부입니다. 이 버튼은 결제 UI를 닫고 사용자를 settings.return_url매개 변수에 지정된 URL로 리디렉션합니다.

기본값 false
settings.​ui.​modestring

결제 UI의 인터페이스 모드. user_account만 가능합니다. 헤더에는 계정 탐색 메뉴만 포함되며 사용자는 제품을 선택하거나 결제할 수 없습니다. 이 모드는 데스크톱에서만 사용할 수 있습니다.

"user_account"
settings.​ui.​themestring

결제 UI 테마. 라이트 테마(기본값)의 경우 63295a9a2e47fab76f7708e1, 다크 테마의 경우 63295aab2e47fab76f7708e3일 수 있습니다. 사용자 정의 테마를 생성하고 이 매개 변수의 해당 ID를 전달할 수도 있습니다.

기본값 "63295a9a2e47fab76f7708e1"
열거형"63295a9a2e47fab76f7708e1""63295aab2e47fab76f7708e3"
settings.​ui.​user_accountobject

사용자 계정 세부 정보입니다.

settings.​ui.​user_account.​infoobject

내 계정 페이지입니다.

settings.​ui.​user_account.​info.​enableboolean필수

하위 메뉴를 표시할지 여부입니다. 기본값은 false입니다.

기본값 false
settings.​ui.​user_account.​info.​orderinteger>= 1필수

메뉴에서 하위 메뉴의 위치입니다.

settings.​ui.​user_account.​payment_accountsobject

내 결제 계정의 하위 메뉴입니다.

settings.​ui.​user_account.​payment_accounts.​enableboolean필수

하위 메뉴를 표시할지 여부입니다. 기본값은 false입니다.

기본값 false
settings.​ui.​user_account.​subscriptionsobject

구독 관리의 하위 메뉴입니다.

settings.​ui.​user_account.​subscriptions.​enableboolean필수

하위 메뉴를 표시할지 여부입니다. 기본값은 false입니다.

기본값 false
settings.​ui.​user_account.​subscriptions.​orderinteger>= 1필수

메뉴에서 하위 메뉴의 위치입니다.

curl -i -X POST \
  https://store.xsolla.com/api/v2/project/44056/free/cart \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "custom_parameters": {
      "character_id": "ingameUsername"
    },
    "sandbox": true,
    "settings": {
      "ui": {
        "desktop": {
          "header": {
            "close_button": false,
            "is_visible": true,
            "type": "normal",
            "visible_logo": true,
            "visible_name": true,
            "visible_purchase": true
          }
        },
        "theme": "63295a9a2e47fab76f7708e1"
      }
    }
  }'

응답

무료 주문을 성공적으로 생성했습니다.

본문application/json
order_idinteger

주문 ID입니다.

응답
application/json
{ "order_id": 641 }

특정 무료 장바구니로 주문 생성하기Client-side

요청

특정 무료 장바구니의 모든 아이템으로 주문을 생성합니다. 생성된 주문은 done 주문 상태를 가져옵니다.

보안
AuthForCart
경로
project_idinteger필수

Project ID. You can find this parameter in your Publisher Account next to the project name and in the browser address bar when working with a project. The URL has the following format: https://publisher.xsolla.com/<merchant_id>/projects/<project_id>.

예제: 44056
cart_idstring필수

장바구니 ID입니다.

예제: custom_id
본문application/json
currencystring

주문 가격 통화입니다. ISO 4217에 따른 3글자 통화 코드입니다. 엑솔라에서 지원하는 통화에 대한 자세한 정보는 설명서를 확인하십시오.

custom_parametersobject[ 1 .. 200 ] properties

프로젝트별 매개 변수입니다.

localestring

응답 언어입니다.

sandboxboolean

샌드박스 모드로 주문을 생성합니다. 이 옵션은 회사 사용자 목록에서 지정한 사용자에게 사용할 수 있습니다.

기본값 false
settingsobject

사용자의 결제 프로세스와 결제 UI를 구성하는 설정입니다.

settings.​payment_methodinteger(Cart-Payment_settings_payment_method)>= 1

결제 수단 ID입니다. 일부 결제 방법은 특정 통화만 지원할 수 있으므로 결제 인터페이스에서 통화 표시를 결정합니다.

settings.​redirect_policyobject(Cart-Payment_redirect_policy)
settings.​redirect_policy.​delayinteger

지연 후 사용자가 자동으로 반환 URL로 리디렉션됩니다.

예제: 0
settings.​redirect_policy.​redirect_button_captionstring

현지화된 리디렉션 버튼 캡션입니다.

예제: "Text button"
settings.​redirect_policy.​redirect_conditionsstring

사용자를 반환 URL로 리디렉션하도록 트리거하는 결제 상태입니다.

열거형"none""successful""successful_or_canceled""any"
예제: "none"
settings.​redirect_policy.​status_for_manual_redirectionstring

사용자를 반환 URL로 리디렉션하는 버튼 클릭 표시를 트리거하는 결제 상태입니다.

열거형"none""successful""successful_or_canceled""any"
예제: "none"
settings.​return_urlstring(uri)(Cart-Payment_settings_return_url)<= 1000 characters

결제 후 사용자를 리디렉션하는 페이지입니다. 매개 변수 user_id, foreigninvoice, invoice_id, status가 자동으로 링크에 추가됩니다.

settings.​uiobject(Cart-Payment_settings_ui)

인터페이스 설정입니다.

settings.​ui.​currency_formatstring

결제 UI에 3자리 ISO 4217 통화 코드를 표시하려면 code로 설정하십시오. 기본적으로는 3자리 통화 코드 대신 통화 기호가 표시됩니다.

settings.​ui.​desktopobject

데스크톱 버전용 인터페이스 설정입니다.

settings.​ui.​desktop.​headerobject

헤더 설정입니다.

settings.​ui.​desktop.​header.​close_buttonboolean

데스크톱 결제 UI에 닫기 버튼을 표시할지 여부입니다. 이 버튼은 결제 UI를 닫고 사용자를 settings.return_url 매개 변수에 지정된 URL로 리디렉션합니다. 기본적으로 false로 설정되어 있습니다.

기본값 false
settings.​ui.​desktop.​header.​is_visibleboolean

결제 UI에 헤더를 표시할지 여부입니다.

settings.​ui.​desktop.​header.​typestring

헤더를 표시하는 방식입니다. compact(프로젝트 이름 및 사용자 ID 표시 안 함) 또는 normal(기본값)일 수 있습니다.

기본값 "normal"
열거형"compact""normal"
settings.​ui.​desktop.​header.​visible_logoboolean

true인 경우, 헤더에 로고가 표시됩니다. 이미지를 업로드하려면 관리자 페이지에서 프로젝트를 열고 페이 스테이션 > 설정 섹션으로 이동하십시오.

settings.​ui.​desktop.​header.​visible_nameboolean

프로젝트 이름을 헤더에 표시할지 여부를 나타냅니다.

settings.​ui.​desktop.​header.​visible_purchaseboolean

헤더에 구매 설명(purchase.description.value)을 표시할지 여부입니다. 기본값은 true입니다.

기본값 true
settings.​ui.​headerobject
settings.​ui.​header.​visible_virtual_currency_balanceboolean

결제 UI에서 이 요소를 숨길 수 있는지 여부입니다.

기본값 true
settings.​ui.​is_cart_open_by_defaultboolean

모바일 버전으로 결제 UI를 열 때 장바구니에 있는 아이템 목록을 표시할지 여부입니다. true이면 목록이 확장된 보기로 표시됩니다. false(기본값)이거나 매개 변수가 전달되지 않으면 목록이 축소된 보기로 표시됩니다.

기본값 false
settings.​ui.​is_independent_windowsboolean

삽입된 런처의 브라우저(WebView)에서 기본 브라우저로 사용자를 리디렉션하여 구매할지 여부입니다.

기본값 false
settings.​ui.​is_payment_methods_list_modeboolean

결제 UI를 열 때 사용자의 국가에서 사용할 수 있는 결제 방식 목록이 표시되는지 여부입니다. false(기본값)인 경우 settings.payment_method 매개 변수에서 전달된 결제 방식이나 PayRank 알고리즘으로 선택한 결제 방식이 표시됩니다.

기본값 false
settings.​ui.​is_prevent_external_link_openboolean

외부 자원에 대한 링크를 리디렉션할지 여부입니다. 외부 링크를 클릭하면 postMessage 메커니즘을 통해 external-link-open 이벤트가 전송됩니다. 리디렉션된 링크 주소는 url 매개 변수에 전달됩니다 .

기본값 false
settings.​ui.​is_show_close_widget_warningboolean

결제 페이지를 닫기 전에 × 아이콘 위로 마우스를 가져갔을 때 거래 처리에 대한 경고를 표시할지 여부입니다. false가 전달되거나 매개 변수가 전달되지 않으면 경고가 표시되지 않습니다.

기본값 true
settings.​ui.​is_three_ds_independent_windowsboolean

3-D 보안 확인이 새 브라우저 창에서 열릴지 여부입니다. 설정에서 CSP(콘텐츠 보안 정책)를 적용하는 경우로 true설정합니다.

기본값 false
settings.​ui.​layoutstring

결제 UI의 주요 요소 위치. 게임 내부에서 결제 UI를 열거나 주문 및 결제 방식에 대한 정보로 열을 바꿀 수 있습니다. 자세한 정보는 사용자 정의 지침을 참조해 주세요.

열거형"embed""column_reverse""embed_column_reverse"
settings.​ui.​mobileobject
settings.​ui.​mobile.​headerobject
settings.​ui.​mobile.​header.​close_buttonboolean

모바일 결제 UI에 닫기 버튼을 표시할지 여부입니다. 이 버튼은 결제 UI를 닫고 사용자를 settings.return_url매개 변수에 지정된 URL로 리디렉션합니다.

기본값 false
settings.​ui.​modestring

결제 UI의 인터페이스 모드. user_account만 가능합니다. 헤더에는 계정 탐색 메뉴만 포함되며 사용자는 제품을 선택하거나 결제할 수 없습니다. 이 모드는 데스크톱에서만 사용할 수 있습니다.

"user_account"
settings.​ui.​themestring

결제 UI 테마. 라이트 테마(기본값)의 경우 63295a9a2e47fab76f7708e1, 다크 테마의 경우 63295aab2e47fab76f7708e3일 수 있습니다. 사용자 정의 테마를 생성하고 이 매개 변수의 해당 ID를 전달할 수도 있습니다.

기본값 "63295a9a2e47fab76f7708e1"
열거형"63295a9a2e47fab76f7708e1""63295aab2e47fab76f7708e3"
settings.​ui.​user_accountobject

사용자 계정 세부 정보입니다.

settings.​ui.​user_account.​infoobject

내 계정 페이지입니다.

settings.​ui.​user_account.​info.​enableboolean필수

하위 메뉴를 표시할지 여부입니다. 기본값은 false입니다.

기본값 false
settings.​ui.​user_account.​info.​orderinteger>= 1필수

메뉴에서 하위 메뉴의 위치입니다.

settings.​ui.​user_account.​payment_accountsobject

내 결제 계정의 하위 메뉴입니다.

settings.​ui.​user_account.​payment_accounts.​enableboolean필수

하위 메뉴를 표시할지 여부입니다. 기본값은 false입니다.

기본값 false
settings.​ui.​user_account.​subscriptionsobject

구독 관리의 하위 메뉴입니다.

settings.​ui.​user_account.​subscriptions.​enableboolean필수

하위 메뉴를 표시할지 여부입니다. 기본값은 false입니다.

기본값 false
settings.​ui.​user_account.​subscriptions.​orderinteger>= 1필수

메뉴에서 하위 메뉴의 위치입니다.

curl -i -X POST \
  https://store.xsolla.com/api/v2/project/44056/free/cart/custom_id \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "custom_parameters": {
      "character_id": "ingameUsername"
    },
    "sandbox": true,
    "settings": {
      "ui": {
        "desktop": {
          "header": {
            "close_button": false,
            "is_visible": true,
            "type": "normal",
            "visible_logo": true,
            "visible_name": true,
            "visible_purchase": true
          }
        },
        "theme": "63295a9a2e47fab76f7708e1"
      }
    }
  }'

응답

무료 주문을 성공적으로 생성했습니다.

본문application/json
order_idinteger

주문 ID입니다.

응답
application/json
{ "order_id": 641 }

지정한 무료 아이템으로 주문 생성하기Client-side

요청

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.

보안
XsollaLoginUserJWT
경로
project_idinteger필수

Project ID. You can find this parameter in your Publisher Account next to the project name and in the browser address bar when working with a project. The URL has the following format: https://publisher.xsolla.com/<merchant_id>/projects/<project_id>.

예제: 44056
item_skustring필수

아이템 SKU입니다.

예제: booster_mega_1
본문application/json
currencystring

주문 가격 통화입니다. ISO 4217에 따른 3글자 통화 코드입니다. 엑솔라에서 지원하는 통화에 대한 자세한 정보는 설명서를 확인하십시오.

custom_parametersobject[ 1 .. 200 ] properties

프로젝트별 매개 변수입니다.

localestring

응답 언어입니다.

promo_codestring

결제 시 프로모션 코드 프로모션용 코드를 사용합니다.

quantityinteger>= 1

아이템 수량입니다.

기본값 1
sandboxboolean

샌드박스 모드로 주문을 생성합니다. 이 옵션은 회사 사용자 목록에서 지정한 사용자에게 사용할 수 있습니다.

기본값 false
settingsobject

사용자의 결제 프로세스와 결제 UI를 구성하는 설정입니다.

settings.​payment_methodinteger(Cart-Payment_settings_payment_method)>= 1

결제 수단 ID입니다. 일부 결제 방법은 특정 통화만 지원할 수 있으므로 결제 인터페이스에서 통화 표시를 결정합니다.

settings.​redirect_policyobject(Cart-Payment_redirect_policy)
settings.​redirect_policy.​delayinteger

지연 후 사용자가 자동으로 반환 URL로 리디렉션됩니다.

예제: 0
settings.​redirect_policy.​redirect_button_captionstring

현지화된 리디렉션 버튼 캡션입니다.

예제: "Text button"
settings.​redirect_policy.​redirect_conditionsstring

사용자를 반환 URL로 리디렉션하도록 트리거하는 결제 상태입니다.

열거형"none""successful""successful_or_canceled""any"
예제: "none"
settings.​redirect_policy.​status_for_manual_redirectionstring

사용자를 반환 URL로 리디렉션하는 버튼 클릭 표시를 트리거하는 결제 상태입니다.

열거형"none""successful""successful_or_canceled""any"
예제: "none"
settings.​return_urlstring(uri)(Cart-Payment_settings_return_url)<= 1000 characters

결제 후 사용자를 리디렉션하는 페이지입니다. 매개 변수 user_id, foreigninvoice, invoice_id, status가 자동으로 링크에 추가됩니다.

settings.​uiobject(Cart-Payment_settings_ui)

인터페이스 설정입니다.

settings.​ui.​currency_formatstring

결제 UI에 3자리 ISO 4217 통화 코드를 표시하려면 code로 설정하십시오. 기본적으로는 3자리 통화 코드 대신 통화 기호가 표시됩니다.

settings.​ui.​desktopobject

데스크톱 버전용 인터페이스 설정입니다.

settings.​ui.​desktop.​headerobject

헤더 설정입니다.

settings.​ui.​desktop.​header.​close_buttonboolean

데스크톱 결제 UI에 닫기 버튼을 표시할지 여부입니다. 이 버튼은 결제 UI를 닫고 사용자를 settings.return_url 매개 변수에 지정된 URL로 리디렉션합니다. 기본적으로 false로 설정되어 있습니다.

기본값 false
settings.​ui.​desktop.​header.​is_visibleboolean

결제 UI에 헤더를 표시할지 여부입니다.

settings.​ui.​desktop.​header.​typestring

헤더를 표시하는 방식입니다. compact(프로젝트 이름 및 사용자 ID 표시 안 함) 또는 normal(기본값)일 수 있습니다.

기본값 "normal"
열거형"compact""normal"
settings.​ui.​desktop.​header.​visible_logoboolean

true인 경우, 헤더에 로고가 표시됩니다. 이미지를 업로드하려면 관리자 페이지에서 프로젝트를 열고 페이 스테이션 > 설정 섹션으로 이동하십시오.

settings.​ui.​desktop.​header.​visible_nameboolean

프로젝트 이름을 헤더에 표시할지 여부를 나타냅니다.

settings.​ui.​desktop.​header.​visible_purchaseboolean

헤더에 구매 설명(purchase.description.value)을 표시할지 여부입니다. 기본값은 true입니다.

기본값 true
settings.​ui.​headerobject
settings.​ui.​header.​visible_virtual_currency_balanceboolean

결제 UI에서 이 요소를 숨길 수 있는지 여부입니다.

기본값 true
settings.​ui.​is_cart_open_by_defaultboolean

모바일 버전으로 결제 UI를 열 때 장바구니에 있는 아이템 목록을 표시할지 여부입니다. true이면 목록이 확장된 보기로 표시됩니다. false(기본값)이거나 매개 변수가 전달되지 않으면 목록이 축소된 보기로 표시됩니다.

기본값 false
settings.​ui.​is_independent_windowsboolean

삽입된 런처의 브라우저(WebView)에서 기본 브라우저로 사용자를 리디렉션하여 구매할지 여부입니다.

기본값 false
settings.​ui.​is_payment_methods_list_modeboolean

결제 UI를 열 때 사용자의 국가에서 사용할 수 있는 결제 방식 목록이 표시되는지 여부입니다. false(기본값)인 경우 settings.payment_method 매개 변수에서 전달된 결제 방식이나 PayRank 알고리즘으로 선택한 결제 방식이 표시됩니다.

기본값 false
settings.​ui.​is_prevent_external_link_openboolean

외부 자원에 대한 링크를 리디렉션할지 여부입니다. 외부 링크를 클릭하면 postMessage 메커니즘을 통해 external-link-open 이벤트가 전송됩니다. 리디렉션된 링크 주소는 url 매개 변수에 전달됩니다 .

기본값 false
settings.​ui.​is_show_close_widget_warningboolean

결제 페이지를 닫기 전에 × 아이콘 위로 마우스를 가져갔을 때 거래 처리에 대한 경고를 표시할지 여부입니다. false가 전달되거나 매개 변수가 전달되지 않으면 경고가 표시되지 않습니다.

기본값 true
settings.​ui.​is_three_ds_independent_windowsboolean

3-D 보안 확인이 새 브라우저 창에서 열릴지 여부입니다. 설정에서 CSP(콘텐츠 보안 정책)를 적용하는 경우로 true설정합니다.

기본값 false
settings.​ui.​layoutstring

결제 UI의 주요 요소 위치. 게임 내부에서 결제 UI를 열거나 주문 및 결제 방식에 대한 정보로 열을 바꿀 수 있습니다. 자세한 정보는 사용자 정의 지침을 참조해 주세요.

열거형"embed""column_reverse""embed_column_reverse"
settings.​ui.​mobileobject
settings.​ui.​mobile.​headerobject
settings.​ui.​mobile.​header.​close_buttonboolean

모바일 결제 UI에 닫기 버튼을 표시할지 여부입니다. 이 버튼은 결제 UI를 닫고 사용자를 settings.return_url매개 변수에 지정된 URL로 리디렉션합니다.

기본값 false
settings.​ui.​modestring

결제 UI의 인터페이스 모드. user_account만 가능합니다. 헤더에는 계정 탐색 메뉴만 포함되며 사용자는 제품을 선택하거나 결제할 수 없습니다. 이 모드는 데스크톱에서만 사용할 수 있습니다.

"user_account"
settings.​ui.​themestring

결제 UI 테마. 라이트 테마(기본값)의 경우 63295a9a2e47fab76f7708e1, 다크 테마의 경우 63295aab2e47fab76f7708e3일 수 있습니다. 사용자 정의 테마를 생성하고 이 매개 변수의 해당 ID를 전달할 수도 있습니다.

기본값 "63295a9a2e47fab76f7708e1"
열거형"63295a9a2e47fab76f7708e1""63295aab2e47fab76f7708e3"
settings.​ui.​user_accountobject

사용자 계정 세부 정보입니다.

settings.​ui.​user_account.​infoobject

내 계정 페이지입니다.

settings.​ui.​user_account.​info.​enableboolean필수

하위 메뉴를 표시할지 여부입니다. 기본값은 false입니다.

기본값 false
settings.​ui.​user_account.​info.​orderinteger>= 1필수

메뉴에서 하위 메뉴의 위치입니다.

settings.​ui.​user_account.​payment_accountsobject

내 결제 계정의 하위 메뉴입니다.

settings.​ui.​user_account.​payment_accounts.​enableboolean필수

하위 메뉴를 표시할지 여부입니다. 기본값은 false입니다.

기본값 false
settings.​ui.​user_account.​subscriptionsobject

구독 관리의 하위 메뉴입니다.

settings.​ui.​user_account.​subscriptions.​enableboolean필수

하위 메뉴를 표시할지 여부입니다. 기본값은 false입니다.

기본값 false
settings.​ui.​user_account.​subscriptions.​orderinteger>= 1필수

메뉴에서 하위 메뉴의 위치입니다.

curl -i -X POST \
  https://store.xsolla.com/api/v2/project/44056/free/item/booster_mega_1 \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "custom_parameters": {
      "character_id": "ingameUsername"
    },
    "promo_code": "discount_code",
    "quantity": 5,
    "sandbox": true,
    "settings": {
      "ui": {
        "desktop": {
          "header": {
            "close_button": false,
            "is_visible": true,
            "type": "normal",
            "visible_logo": true,
            "visible_name": true,
            "visible_purchase": true
          }
        },
        "theme": "63295a9a2e47fab76f7708e1"
      }
    }
  }'

응답

무료 주문을 성공적으로 생성했습니다.

본문application/json
order_idinteger

주문 ID입니다.

응답
application/json
{ "order_id": 641 }
작업
작업
작업
작업

카탈로그

이 API를 사용하면 모든 종류의 판매할 수 있는 아이템 또는 특정 아이템을 가져올 수 있습니다.

작업
작업
작업
작업
작업