openapi: 3.0.0
info:
  title: Digital Distribution Hub
  description: >
    # Overview


    Digital Distribution Hub is a new Xsolla solution that aims to connect
    digital and cash based payments via push payments technology and e-commerce.


    This reference combines API endpoints for two Xsolla products: [In-Game
    Store](https://developers.xsolla.com/doc/in-game-store/) and [Pay
    Station](https://developers.xsolla.com/doc/pay-station/). There are two base
    URLs:


    * `https://store.xsolla.com/api` for the **Common**, **Catalog**, **Cart**,
    and **Order** groups.

    * `https://ps.xsolla.com` for the **Notifications** group.


    API endpoints in the **Catalog** group don’t require authorization. 


    To work with operations in the **Cart** and **Order** groups, you need to
    generate a token via [Create user
    token](https://developers.xsolla.com/digital-distribution-hub/common/user-token/create-user-token).


    <div class='note'><b>Note</b><br><br>This reference shows a design of a
    future API and not a fully functioning interface. Currently, you can try
    only <b>Catalog</b> and <b>Notifications</b> groups endpoints. If you’d like
    to share your feedback, please email us at <a
    href="mailto:techdoc@xsolla.com">techdoc@xsolla.com</a>.</div>
  version: 1.0.0
servers:
  - url: https://store.xsolla.com/api
tags:
  - name: cart
    x-displayName: Cart
  - name: game keys
    x-displayName: Game keys
  - name: virtual items & currency
    x-displayName: Virtual items & currency
  - name: bundles
    x-displayName: Bundles
  - name: user token
    x-displayName: User token
  - name: notifications
    x-displayName: Notifications
  - name: order
    x-displayName: Order
paths:
  /v2/project/{project_id}/cart/{cart_id}:
    get:
      tags:
        - cart
      summary: Get cart by cart ID
      description: Returns user’s cart by cart ID.
      operationId: get-cart-by-id
      parameters:
        - $ref: '#/components/parameters/project-id-path-param'
        - $ref: '#/components/parameters/cart-id-path-param'
        - $ref: '#/components/parameters/currency-query-param'
        - $ref: '#/components/parameters/locale-query-param'
      responses:
        '200':
          description: The cart with items was successfully returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cart_inline_response_200'
              examples:
                response:
                  value:
                    cart_id: cart_id
                    is_free: false
                    items:
                      - attributes: []
                        description: >-
                          Take it, take it all! All of Xsollas riches in one
                          Mega Booster.
                        groups:
                          - external_id: powerups
                            name: Power Ups
                        image_url: >-
                          https://cdn.xsolla.net/img/misc/images/e9f2f4a634bc96ea03b5d5ceadd7c55f.png
                        inventory_options:
                          consumable:
                            usages_count: 1
                        is_free: false
                        name: Xsolla Booster Mega
                        price:
                          amount: '50.0000000000000000'
                          amount_without_discount: '100.0000000000000000'
                          currency: USD
                        quantity: 123
                        sku: booster_mega_1
                        type: virtual_good
                        virtual_item_type: consumable
                        virtual_prices: []
                    price:
                      amount: '6150.0000000000000000'
                      amount_without_discount: '6150.0000000000000000'
                      currency: USD
      security:
        - AuthForClient: []
  /v2/project/{project_id}/cart:
    get:
      tags:
        - cart
      summary: Get current user's cart
      description: Returns the current user's cart.
      operationId: get-user-cart
      parameters:
        - $ref: '#/components/parameters/project-id-path-param'
        - $ref: '#/components/parameters/currency-query-param'
        - $ref: '#/components/parameters/locale-query-param'
      responses:
        '200':
          description: The cart with items was successfully returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cart_inline_response_200'
              examples:
                response:
                  value:
                    cart_id: cart_id
                    is_free: false
                    items:
                      - attributes: []
                        description: >-
                          Take it, take it all! All of Xsollas riches in one
                          Mega Booster.
                        groups:
                          - external_id: powerups
                            name: Power Ups
                        image_url: >-
                          https://cdn.xsolla.net/img/misc/images/e9f2f4a634bc96ea03b5d5ceadd7c55f.png
                        inventory_options:
                          consumable:
                            usages_count: 1
                        is_free: false
                        name: Xsolla Booster Mega
                        price:
                          amount: '50.0000000000000000'
                          amount_without_discount: '100.0000000000000000'
                          currency: USD
                        quantity: 123
                        sku: booster_mega_1
                        type: virtual_good
                        virtual_item_type: consumable
                        virtual_prices: []
                    price:
                      amount: '6150.0000000000000000'
                      amount_without_discount: '6150.0000000000000000'
                      currency: USD
      security:
        - AuthForClient: []
  /v2/project/{project_id}/cart/{cart_id}/clear:
    put:
      tags:
        - cart
      summary: Delete all cart items by cart ID
      description: Deletes all cart items.
      operationId: cart-clear-by-id
      parameters:
        - $ref: '#/components/parameters/project-id-path-param'
        - $ref: '#/components/parameters/cart-id-path-param'
      responses:
        '204':
          description: The cart was successfully cleared.
      security:
        - AuthForClient: []
  /v2/project/{project_id}/cart/clear:
    put:
      tags:
        - cart
      summary: Delete all cart items from current cart
      description: Deletes all cart items.
      operationId: cart-clear
      parameters:
        - $ref: '#/components/parameters/project-id-path-param'
      responses:
        '204':
          description: The cart was successfully cleared.
      security:
        - AuthForClient: []
  /v2/project/{project_id}/cart/fill:
    put:
      tags:
        - cart
      summary: Fill cart with items
      description: >-
        Fills the cart with items. If the cart already has an item with the same
        SKU, the existing item will be replaced by the passed value.
      operationId: cart-fill
      parameters:
        - $ref: '#/components/parameters/project-id-path-param'
      requestBody:
        $ref: '#/components/requestBodies/fill-cart-json-model'
      responses:
        '200':
          description: The cart with items was successfully returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cart_inline_response_200_1'
              examples:
                response:
                  value:
                    cart_id: cart_id
                    is_free: false
                    items:
                      - attributes: []
                        description: >-
                          Take it, take it all! All of Xsollas riches in one
                          Mega Booster.
                        groups:
                          - external_id: powerups
                            name: Power Ups
                        image_url: >-
                          https://cdn.xsolla.net/img/misc/images/e9f2f4a634bc96ea03b5d5ceadd7c55f.png
                        inventory_options:
                          consumable:
                            usages_count: 1
                        is_free: false
                        name: Xsolla Booster Mega
                        price:
                          amount: '50.0000000000000000'
                          amount_without_discount: '100.0000000000000000'
                          currency: USD
                        quantity: 123
                        sku: booster_mega_1
                        type: virtual_good
                        virtual_item_type: consumable
                        virtual_prices: []
                    warnings:
                      - sku: booster_mega_21
                        quantity: 1
                        errorCode: 4001
                        errorMessage: >-
                          [0401-4001]: Item with Project Id = 44056 and Sku =
                          booster_mega_2 not found
                    price:
                      amount: '6150.0000000000000000'
                      amount_without_discount: '6150.0000000000000000'
                      currency: USD
      security:
        - AuthForClient: []
  /v2/project/{project_id}/cart/{cart_id}/fill:
    put:
      tags:
        - cart
      summary: Fill specific cart with items
      description: >-
        Fills the specific cart with items. If the cart already has an item with
        the same SKU, the existing item position will be replaced by the passed
        value.
      operationId: cart-fill-by-id
      parameters:
        - $ref: '#/components/parameters/project-id-path-param'
        - $ref: '#/components/parameters/cart-id-path-param'
      requestBody:
        $ref: '#/components/requestBodies/fill-cart-json-model'
      responses:
        '200':
          description: The cart with items was successfully returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cart_inline_response_200_1'
              examples:
                response:
                  value:
                    cart_id: cart_id
                    is_free: false
                    items:
                      - attributes: []
                        description: >-
                          Take it, take it all! All of Xsollas riches in one
                          Mega Booster.
                        groups:
                          - external_id: powerups
                            name: Power Ups
                        image_url: >-
                          https://cdn.xsolla.net/img/misc/images/e9f2f4a634bc96ea03b5d5ceadd7c55f.png
                        inventory_options:
                          consumable:
                            usages_count: 1
                        is_free: false
                        name: Xsolla Booster Mega
                        price:
                          amount: '50.0000000000000000'
                          amount_without_discount: '100.0000000000000000'
                          currency: USD
                        quantity: 123
                        sku: booster_mega_1
                        type: virtual_good
                        virtual_item_type: consumable
                        virtual_prices: []
                    warnings:
                      - sku: booster_mega_21
                        quantity: 1
                        errorCode: 4001
                        errorMessage: >-
                          [0401-4001]: Item with Project Id = 44056 and Sku =
                          booster_mega_2 not found
                    price:
                      amount: '6150.0000000000000000'
                      amount_without_discount: '6150.0000000000000000'
                      currency: USD
      security:
        - AuthForClient: []
  /v2/project/{project_id}/cart/{cart_id}/item/{item_sku}:
    put:
      tags:
        - cart
      summary: Update cart item by cart ID
      description: Updates an existing cart item or creates the one in the cart.
      operationId: put-item-by-cart-id
      parameters:
        - $ref: '#/components/parameters/project-id-path-param'
        - $ref: '#/components/parameters/cart-id-path-param'
        - $ref: '#/components/parameters/item-sku-path-param'
      requestBody:
        $ref: '#/components/requestBodies/put-item-by-cart-id-json-model'
      responses:
        '204':
          description: The cart was successfully updated.
        '404':
          description: >-
            Item not found. Make sure the `project_id` and the `item_sku` are
            correct.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cart_inline_response_404'
        '422':
          description: Item quantity must be non-negative integer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cart_inline_response_422'
              examples:
                response:
                  value:
                    errorCode: 1102
                    errorMessage: '[0401-1102]: Item quantity must be non-negative integer'
                    statusCode: 422
      security:
        - basicAuth: []
    delete:
      tags:
        - cart
      summary: Delete cart item by cart ID
      description: Removes an item from the cart.
      operationId: delete-item-by-cart-id
      parameters:
        - $ref: '#/components/parameters/project-id-path-param'
        - $ref: '#/components/parameters/cart-id-path-param'
        - $ref: '#/components/parameters/item-sku-path-param'
      responses:
        '204':
          description: The item from the cart was successfully deleted.
        '404':
          description: >-
            Item not found. Make sure the `project_id` and the `item_sku` are
            correct.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cart_inline_response_404'
      security:
        - AuthForClient: []
  /v2/project/{project_id}/cart/item/{item_sku}:
    put:
      tags:
        - cart
      summary: Update cart item from current cart
      description: Updates an existing cart item or creates the one in the cart.
      operationId: put-item
      parameters:
        - $ref: '#/components/parameters/project-id-path-param'
        - $ref: '#/components/parameters/item-sku-path-param'
      requestBody:
        $ref: '#/components/requestBodies/put-item-by-cart-id-json-model'
      responses:
        '204':
          description: The cart was successfully updated.
        '404':
          description: >-
            Item not found. Make sure the `project_id` and the `item_sku` are
            correct.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cart_inline_response_404'
        '422':
          description: >-
            This type of item cannot be put to the cart. Select another type of
            item.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cart_inline_response_422_1'
              examples:
                response:
                  value:
                    statusCode: 422
                    errorCode: 1421
                    errorMessage: Only Virtual Good Supported
      security:
        - basicAuth: []
    delete:
      tags:
        - cart
      summary: Delete cart item from current cart
      description: Removes an item from the cart.
      operationId: delete-item
      parameters:
        - $ref: '#/components/parameters/project-id-path-param'
        - $ref: '#/components/parameters/item-sku-path-param'
      responses:
        '204':
          description: The item from the cart was successfully deleted.
        '404':
          description: >-
            Item not found. Make sure the `project_id` and the `item_sku` are
            correct.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Cart_inline_response_404'
      security:
        - AuthForClient: []
  /v2/project/{project_id}/items/game:
    get:
      tags:
        - game keys
      summary: Get games list
      description: >
        Gets a games list for building a catalog.


        <div class="notice"><strong>Attention.</strong> All projects have the
        limitation to the number of items that you can get in the response. The
        default and maximum value is <strong>50 items per response.</strong> To
        get more data page by page, use <b>limit</b> and <b>offset</b>
        fields.</div>
      operationId: get-games-list
      parameters:
        - $ref: '#/components/parameters/project-id-path-param'
        - $ref: '#/components/parameters/limit-query-param'
        - $ref: '#/components/parameters/offset-query-param'
        - $ref: '#/components/parameters/locale-query-param'
        - $ref: '#/components/parameters/additional-fields-query-param'
        - $ref: '#/components/parameters/country-query-param'
      responses:
        '200':
          description: The list of games was successfully received.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Catalog_inline_response_200'
              examples:
                response:
                  value:
                    items:
                      - sku: game_1
                        name: Game name
                        groups:
                          - external_id: all
                            name: All games
                          - external_id: Xsolla
                            name: Xsolla games
                        type: unit
                        unit_type: game
                        description: Game description
                        image_url: >-
                          https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png
                        attributes:
                          $ref: >-
                            #/components/examples/client-attribute-game/Catalog_value
                        unit_items:
                          - sku: game_key_01
                            type: game_key
                            is_free: false
                            price:
                              amount: '30.5'
                              amount_without_discount: '30.5'
                              currency: USD
                            virtual_prices: []
                            drm_name: Steam
                            drm_sku: steam
                            has_keys: true
                            is_pre_order: true
                            release_date: '2020-08-11T10:00:00+03:00'
                          - sku: game_key_02
                            type: game_key
                            is_free: false
                            price:
                              amount: '30.5'
                              amount_without_discount: '30.5'
                              currency: USD
                            virtual_prices: []
                            drm_name: Origin
                            drm_sku: origin
                            has_keys: false
                            is_pre_order: false
                      - sku: game_2
                        name: Game name
                        groups:
                          - external_id: all
                            name: All games
                        type: unit
                        unit_type: game
                        description: Game description
                        image_url: >-
                          https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png
                        attributes:
                          - external_id: OS
                            name: OS
                            values:
                              - external_id: 9d5c5efb7c0f00a00fe4e3583f1215b0050bc723
                                value: Windows
                        unit_items:
                          - sku: game_key_01
                            type: game_key
                            is_free: false
                            price:
                              amount: '30.5'
                              amount_without_discount: '30.5'
                              currency: USD
                            virtual_prices: []
                            drm_name: Steam
                            drm_sku: steam
                            has_keys: false
                            is_pre_order: false
      security:
        - AuthForClient: []
  /v2/project/{project_id}/items/game/group/{external_id}:
    get:
      tags:
        - game keys
      summary: Get games list by specified group
      description: >
        Gets a games list from the specified group for building a catalog.


        <div class="notice"><strong>Attention.</strong> All projects have the
        limitation to the number of items that you can get in the response. The
        default and maximum value is <strong>50 items per response.</strong> To
        get more data page by page, use <b>limit</b> and <b>offset</b>
        fields.</div>
      operationId: get-games-group
      parameters:
        - $ref: '#/components/parameters/project-id-path-param'
        - $ref: '#/components/parameters/external-id-path-param'
        - $ref: '#/components/parameters/limit-query-param'
        - $ref: '#/components/parameters/offset-query-param'
        - $ref: '#/components/parameters/locale-query-param'
        - $ref: '#/components/parameters/additional-fields-query-param'
        - $ref: '#/components/parameters/country-query-param'
      responses:
        '200':
          description: The list of games was successfully received.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Catalog_inline_response_200'
              examples:
                response:
                  value:
                    items:
                      - sku: game_1
                        name: Game name
                        groups:
                          - external_id: all
                            name: All games
                          - external_id: Xsolla
                            name: Xsolla games
                        type: unit
                        unit_type: game
                        description: Game description
                        image_url: >-
                          https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png
                        attributes:
                          $ref: >-
                            #/components/examples/client-attribute-game/Catalog_value
                        unit_items:
                          - sku: game_key_01
                            type: game_key
                            is_free: false
                            price:
                              amount: '30.5'
                              amount_without_discount: '30.5'
                              currency: USD
                            virtual_prices: []
                            drm_name: Steam
                            drm_sku: steam
                            has_keys: true
                            is_pre_order: true
                            release_date: '2020-08-11T10:00:00+03:00'
                          - sku: game_key_02
                            type: game_key
                            is_free: false
                            price:
                              amount: '30.5'
                              amount_without_discount: '30.5'
                              currency: USD
                            virtual_prices: []
                            drm_name: Origin
                            drm_sku: origin
                            has_keys: false
                            is_pre_order: false
                      - sku: game_2
                        name: Game name
                        groups:
                          - external_id: all
                            name: All games
                        type: unit
                        unit_type: game
                        description: Game description
                        image_url: >-
                          https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png
                        attributes:
                          - external_id: OS
                            name: OS
                            values:
                              - external_id: 9d5c5efb7c0f00a00fe4e3583f1215b0050bc723
                                value: Windows
                        unit_items:
                          - sku: game_key_01
                            type: game_key
                            is_free: false
                            price:
                              amount: '30.5'
                              amount_without_discount: '30.5'
                              currency: USD
                            virtual_prices: []
                            drm_name: Steam
                            drm_sku: steam
                            has_keys: false
                            is_pre_order: false
      security:
        - AuthForClient: []
  /v2/project/{project_id}/items/game/sku/{item_sku}:
    get:
      tags:
        - game keys
      summary: Get game for catalog
      description: Gets a game for the catalog.
      operationId: get-game-by-sku
      parameters:
        - $ref: '#/components/parameters/project-id-path-param'
        - $ref: '#/components/parameters/item-sku-path-param'
        - $ref: '#/components/parameters/locale-query-param'
        - $ref: '#/components/parameters/additional-fields-query-param'
        - $ref: '#/components/parameters/country-query-param'
      responses:
        '200':
          description: Game was successfully received.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Catalog_inline_response_200_1'
              examples:
                response:
                  value:
                    sku: game_1
                    name: Game name
                    groups:
                      - external_id: all
                        name: All games
                      - external_id: Xsolla
                        name: Xsolla games
                    type: unit
                    unit_type: game
                    description: Game description
                    image_url: >-
                      https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png
                    attributes:
                      $ref: >-
                        #/components/examples/client-attribute-game/Catalog_value
                    unit_items:
                      - sku: game_key_01
                        type: game_key
                        is_free: false
                        price:
                          amount: '30.5'
                          amount_without_discount: '30.5'
                          currency: USD
                        virtual_prices: []
                        drm_name: Steam
                        drm_sku: steam
                        has_keys: true
                        is_pre_order: true
                        release_date: '2020-08-11T10:00:00+03:00'
                      - sku: game_key_02
                        type: game_key
                        is_free: false
                        price:
                          amount: '30.5'
                          amount_without_discount: '30.5'
                          currency: USD
                        virtual_prices: []
                        drm_name: Origin
                        drm_sku: origin
                        has_keys: false
                        is_pre_order: false
        '404':
          description: |
            Game not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Catalog_inline_response_404'
              examples:
                response:
                  value:
                    statusCode: 404
                    errorCode: 4001
                    errorMessage: '[0401-4001]: Item with sku = ''game_1'' not found'
      security:
        - AuthForClient: []
  /v2/project/{project_id}/items/game/key/sku/{item_sku}:
    get:
      tags:
        - game keys
      summary: Get game key for catalog
      description: Gets a game key for the catalog.
      operationId: get-game-key-by-sku
      parameters:
        - $ref: '#/components/parameters/project-id-path-param'
        - $ref: '#/components/parameters/item-sku-path-param'
        - $ref: '#/components/parameters/locale-query-param'
        - $ref: '#/components/parameters/additional-fields-query-param'
        - $ref: '#/components/parameters/country-query-param'
      responses:
        '200':
          description: Game key was successfully received.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Catalog_inline_response_200_2'
              examples:
                response:
                  value:
                    sku: game_1
                    name: Game name
                    groups:
                      - external_id: all
                        name: All games
                      - external_id: Xsolla
                        name: Xsolla games
                    type: game_key
                    description: Game description
                    image_url: >-
                      https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png
                    attributes:
                      $ref: >-
                        #/components/examples/client-attribute-game-horror/Catalog_value
                    is_free: false
                    price:
                      amount: '30.5'
                      amount_without_discount: '30.5'
                      currency: USD
                    virtual_prices: []
                    drm_name: Steam
                    drm_sku: steam
                    has_keys: true
                    is_pre_order: true
                    release_date: '2020-08-11T10:00:00+03:00'
        '404':
          description: |
            Game key not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Catalog_inline_response_404_1'
              examples:
                response:
                  value:
                    statusCode: 404
                    errorCode: 4001
                    errorMessage: '[0401-4001]: Item with sku = ''game_key_1'' not found'
      security:
        - AuthForClient: []
  /v2/project/{project_id}/items/game/key/group/{external_id}:
    get:
      tags:
        - game keys
      summary: Get game keys list by specified group
      description: >
        Gets a game key list from the specified group for building a catalog.


        <div class="notice"><strong>Attention.</strong> All projects have the
        limitation to the number of items that you can get in the response. The
        default and maximum value is <strong>50 items per response.</strong> To
        get more data page by page, use <b>limit</b> and <b>offset</b>
        fields.</div>
      operationId: get-game-keys-group
      parameters:
        - $ref: '#/components/parameters/project-id-path-param'
        - $ref: '#/components/parameters/external-id-path-param'
        - $ref: '#/components/parameters/limit-query-param'
        - $ref: '#/components/parameters/offset-query-param'
        - $ref: '#/components/parameters/locale-query-param'
        - $ref: '#/components/parameters/additional-fields-query-param'
        - $ref: '#/components/parameters/country-query-param'
      responses:
        '200':
          description: The list of game keys was successfully received.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Catalog_inline_response_200_3'
              examples:
                response:
                  value:
                    items:
                      - sku: game_1
                        name: Game name
                        groups:
                          - external_id: all
                            name: All games
                          - external_id: Xsolla
                            name: Xsolla games
                        type: game_key
                        description: Game description
                        image_url: >-
                          https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png
                        attributes:
                          $ref: >-
                            #/components/examples/client-attribute-game-horror/Catalog_value
                        is_free: false
                        price:
                          amount: '30.5'
                          amount_without_discount: '30.5'
                          currency: USD
                        virtual_prices: []
                        drm_name: Steam
                        drm_sku: steam
                        has_keys: true
                        is_pre_order: true
                        release_date: '2020-08-11T10:00:00+03:00'
                      - sku: game_2
                        name: Game name
                        groups:
                          - external_id: all
                            name: All games
                        type: game_key
                        description: Game description
                        image_url: >-
                          https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png
                        attributes:
                          $ref: >-
                            #/components/examples/client-attribute-game-horror/Catalog_value
                        is_free: false
                        price:
                          amount: '30.5'
                          amount_without_discount: '30.5'
                          currency: USD
                        virtual_prices: []
                        drm_name: Steam
                        drm_sku: steam
                        has_keys: true
                        is_pre_order: false
      security:
        - AuthForClient: []
  /v2/project/{project_id}/items/game/drm:
    get:
      tags:
        - game keys
      summary: Get DRM list
      description: Gets the list of available DRMs.
      operationId: get-drm-list
      parameters:
        - $ref: '#/components/parameters/project-id-path-param'
      responses:
        '200':
          description: The list of DRMs was successfully received.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Catalog_inline_response_200_4'
              examples:
                response:
                  value:
                    drm:
                      - sku: steam
                        name: Steam
                        image: >-
                          https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png
                        link: https://support.steampowered.com
                        redeem_instruction_link: https://support.steampowered.com
                        drm_id: 1
                      - sku: playstation
                        name: Playstation
                        image: >-
                          https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png
                        redeem_instruction_link: https://support.us.playstation.com
                        drm_id: 2
      security:
        - AuthForClient: []
  /v2/project/{project_id}/items/virtual_items:
    get:
      tags:
        - virtual items & currency
      summary: Get virtual items list
      description: >
        Gets a virtual items list for building a catalog.


        <div class="notice"><strong>Attention.</strong> All projects have the
        limitation to the number of items that you can get in the response. The
        default and maximum value is <strong>50 items per response.</strong> To
        get more data page by page, use <b>limit</b> and <b>offset</b>
        fields.</div>
      operationId: get-virtual-items
      parameters:
        - $ref: '#/components/parameters/project-id-path-param'
        - $ref: '#/components/parameters/limit-query-param'
        - $ref: '#/components/parameters/offset-query-param'
        - $ref: '#/components/parameters/locale-query-param'
        - $ref: '#/components/parameters/additional-fields-query-param'
        - $ref: '#/components/parameters/country-query-param'
      responses:
        '200':
          description: The list of virtual items was successfully received.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Catalog_inline_response_200_5'
              examples:
                response:
                  value:
                    items:
                      - sku: big_rocket
                        name: Big Rocket
                        groups:
                          - external_id: accessory
                            name: Accessory
                        attributes:
                          - external_id: stack_size
                            name: Stack size
                            values:
                              - external_id: size_e3364991f92e751689a68b96598a5a5a84010b85
                                value: '5'
                        type: virtual_good
                        description: Big Rocket - description
                        image_url: >-
                          https://popmedia.blob.core.windows.net/popyourself/male/outfit/male_armor_white_a-01.png
                        is_free: false
                        price:
                          amount: '100.99'
                          amount_without_discount: '100.99'
                          currency: USD
                        virtual_prices:
                          - amount: 100
                            sku: vc_test
                            is_default: true
                            amount_without_discount: 100
                            image_url: http://image.png
                            name: SHOTGUN FOR TRUE RAIDERS
                            type: virtual_currency
                            description: description
                        inventory_options:
                          consumable:
                            usages_count: 1
                          expiration_period:
                            type: day
                            value: 1
                        virtual_item_type: non_renewing_subscription
                      - sku: shotgun_raider
                        name: SHOTGUN FOR TRUE RAIDERS
                        groups:
                          - external_id: hair
                            name: Hair
                        attributes:
                          - external_id: stack_size
                            name: Stack size
                            values:
                              - external_id: size_e3364991f92e751689a68b96598a5a5a84010b85
                                value: '5'
                          - external_id: rating
                            name: Rating
                            values:
                              - external_id: >-
                                  rating_e3364991f92e751689a68b96598a5a5a84010b85
                                value: '3.9'
                        type: virtual_good
                        description: description
                        image_url: http://image.png
                        is_free: false
                        price:
                          amount: '101.0'
                          amount_without_discount: '101.0'
                          currency: USD
                        virtual_prices:
                          - amount: 100
                            sku: vc_test
                            is_default: true
                            amount_without_discount: 100
                            image_url: http://image.png
                            name: SHOTGUN FOR TRUE RAIDERS
                            type: virtual_currency
                            description: description
                          - amount: 200
                            sku: vc_test_2
                            is_default: false
                            amount_without_discount: 200
                            image_url: http://image.png
                            name: SHOTGUN FOR TRUE RAIDERS
                            type: virtual_currency
                            description: description
                        inventory_options:
                          - consumable:
                              - usages_count: 1
                          - expiration_period:
                              - type: day
                              - value: 1
                        virtual_item_type: non_renewing_subscription
                      - sku: shotgun_raider_2
                        name: SHOTGUN FOR TRUE RAIDERS
                        groups: []
                        attributes: []
                        type: virtual_good
                        description: description
                        image_url: http://image.png
                        is_free: true
                        virtual_prices: []
                        inventory_options:
                          consumable:
                            usages_count: 1
                          expiration_period:
                            type: day
                            value: 1
                        virtual_item_type: non_renewing_subscription
      security:
        - AuthForClient: []
  /v2/project/{project_id}/items/virtual_currency:
    get:
      tags:
        - virtual items & currency
      summary: Get virtual currency list
      description: >
        Gets a virtual currency list for building a catalog.


        <div class="notice"><strong>Attention.</strong> All projects have the
        limitation to the number of items that you can get in the response. The
        default and maximum value is <strong>50 items per response.</strong> To
        get more data page by page, use <b>limit</b> and <b>offset</b>
        fields.</div>
      operationId: get-virtual-currency
      parameters:
        - $ref: '#/components/parameters/project-id-path-param'
        - $ref: '#/components/parameters/limit-query-param'
        - $ref: '#/components/parameters/offset-query-param'
        - $ref: '#/components/parameters/locale-query-param'
        - $ref: '#/components/parameters/additional-fields-query-param'
        - $ref: '#/components/parameters/country-query-param'
      responses:
        '200':
          description: The list of virtual currency was successfully received.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Catalog_inline_response_200_6'
              examples:
                response:
                  value:
                    items:
                      - sku: big_rocket
                        name: Big Rocket
                        groups:
                          - external_id: accessory
                            name: Accessory
                        attributes:
                          - external_id: stack_size
                            name: Stack size
                            values:
                              - external_id: size_e3364991f92e751689a68b96598a5a5a84010b85
                                value: '5'
                        type: virtual_currency
                        description: Big Rocket - short description
                        image_url: >-
                          https://popmedia.blob.core.windows.net/popyourself/male/outfit/male_armor_white_a-01.png
                        is_free: false
                        price:
                          amount: '100.99'
                          amount_without_discount: '100.99'
                          currency: USD
                        virtual_prices:
                          - amount: 100
                            sku: shotgun_raider
                            is_default: true
                            amount_without_discount: 100
                            image_url: http://image.png
                            name: SHOTGUN FOR TRUE RAIDERS
                            type: virtual_currency
                            description: description
                        inventory_options:
                          consumable:
                            usages_count: 1
                      - sku: shotgun_raider
                        name: SHOTGUN FOR TRUE RAIDERS
                        groups:
                          - external_id: hair
                            name: Hair
                        attributes:
                          - external_id: stack_size
                            name: Stack size
                            values:
                              - external_id: size_e3364991f92e751689a68b96598a5a5a84010b85
                                value: '5'
                          - external_id: rating
                            name: Rating
                            values:
                              - external_id: >-
                                  rating_e3364991f92e751689a68b96598a5a5a84010b85
                                value: '3.9'
                        type: virtual_currency
                        description: description
                        image_url: http://image.png
                        is_free: false
                        price:
                          amount: '101.0'
                          amount_without_discount: '101.0'
                          currency: USD
                        virtual_prices: []
                        inventory_options:
                          consumable:
                            usages_count: 1
                      - sku: shotgun_raider_2
                        name: SHOTGUN FOR TRUE RAIDERS
                        groups: []
                        attributes: []
                        type: virtual_currency
                        description: description
                        image_url: http://image.png
                        is_free: true
                        virtual_prices: []
                        inventory_options:
                          consumable:
                            usages_count: 1
      security:
        - AuthForClient: []
  /v2/project/{project_id}/items/virtual_currency/package:
    get:
      tags:
        - virtual items & currency
      summary: Get virtual currency package list
      description: >
        Gets a virtual currency packages list for building a catalog.


        <div class="notice"><strong>Attention.</strong> All projects have the
        limitation to the number of items that you can get in the response. The
        default and maximum value is <strong>50 items per response.</strong> To
        get more data page by page, use <b>limit</b> and <b>offset</b>
        fields.</div>
      operationId: get-virtual-currency-package
      parameters:
        - $ref: '#/components/parameters/project-id-path-param'
        - $ref: '#/components/parameters/limit-query-param'
        - $ref: '#/components/parameters/offset-query-param'
        - $ref: '#/components/parameters/locale-query-param'
        - $ref: '#/components/parameters/additional-fields-query-param'
        - $ref: '#/components/parameters/country-query-param'
      responses:
        '200':
          description: The list of virtual currency packages was successfully received.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Catalog_inline_response_200_7'
              examples:
                response:
                  value:
                    items:
                      - sku: vc_package_1
                        name: VC Name first package
                        groups: []
                        attributes: []
                        type: bundle
                        description: VC Short Package Description
                        image_url: http://vc_package_image.png
                        is_free: false
                        price:
                          amount: '2.0000'
                          amount_without_discount: '2.0000'
                          currency: USD
                        bundle_type: virtual_currency_package
                        content:
                          - description: Big Rocket - short description
                            image_url: >-
                              https://popmedia.blob.core.windows.net/popyourself/male/outfit/male_armor_white_a-01.png
                            sku: big_rocket
                            name: Big Rocket
                            type: virtual_currency
                            quantity: 100
                            inventory_options:
                              consumable:
                                usages_count: 1
                        virtual_prices: []
                      - sku: vc_package_3
                        name: VC Name third package
                        groups: []
                        attributes: []
                        type: bundle
                        description: VC Short Package Description
                        image_url: http://vc_package_image.png
                        is_free: false
                        price:
                          amount: '4.0000'
                          amount_without_discount: '4.0000'
                          currency: USD
                        bundle_type: virtual_currency_package
                        content:
                          - description: description
                            image_url: http://image.png
                            sku: shotgun_raider
                            name: SHOTGUN FOR TRUE RAIDERS
                            type: virtual_currency
                            quantity: 200
                            inventory_options:
                              consumable:
                                usages_count: 1
                        virtual_prices: []
      security:
        - AuthForClient: []
  /v2/project/{project_id}/items/virtual_items/group/{external_id}:
    get:
      tags:
        - virtual items & currency
      summary: Get items list by specified group
      description: >
        Gets an items list from the specified group for building a catalog.


        <div class="notice"><strong>Attention.</strong> All projects have the
        limitation to the number of items that you can get in the response. The
        default and maximum value is <strong>50 items per response.</strong> To
        get more data page by page, use <b>limit</b> and <b>offset</b>
        fields.</div>
      operationId: get-virtual-items-group
      parameters:
        - $ref: '#/components/parameters/project-id-path-param'
        - $ref: '#/components/parameters/external-id-path-param'
        - $ref: '#/components/parameters/limit-query-param'
        - $ref: '#/components/parameters/offset-query-param'
        - $ref: '#/components/parameters/locale-query-param'
        - $ref: '#/components/parameters/additional-fields-query-param'
        - $ref: '#/components/parameters/country-query-param'
      responses:
        '200':
          description: >-
            The list of items from the specified group was successfully
            received.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Catalog_inline_response_200_8'
              examples:
                response:
                  value:
                    items:
                      - sku: big_rocket
                        name: Big Rocket
                        groups:
                          - external_id: accessory
                            name: Accessory
                        attributes:
                          - external_id: stack_size
                            name: Stack size
                            values:
                              - external_id: size_e3364991f92e751689a68b96598a5a5a84010b85
                                value: '5'
                        type: virtual_good
                        description: Big Rocket - description
                        image_url: >-
                          https://popmedia.blob.core.windows.net/popyourself/male/outfit/male_armor_white_a-01.png
                        is_free: false
                        price:
                          amount: '100.99'
                          amount_without_discount: '100.99'
                          currency: USD
                        virtual_prices:
                          - amount: 100
                            sku: vc_test
                            is_default: true
                            amount_without_discount: 100
                            image_url: http://image.png
                            name: SHOTGUN FOR TRUE RAIDERS
                            type: virtual_currency
                            description: description
                        inventory_options:
                          consumable:
                            usages_count: 1
                          expiration_period:
                            type: day
                            value: 1
                        virtual_item_type: non_renewing_subscription
                      - sku: shotgun_raider
                        name: SHOTGUN FOR TRUE RAIDERS
                        groups:
                          - external_id: accessory
                            name: Accessory
                        attributes:
                          - external_id: stack_size
                            name: Stack size
                            values:
                              - external_id: size_e3364991f92e751689a68b96598a5a5a84010b85
                                value: '5'
                          - external_id: rating
                            name: Rating
                            values:
                              - external_id: >-
                                  rating_e3364991f92e751689a68b96598a5a5a84010b85
                                value: '3.9'
                        type: virtual_good
                        description: description
                        image_url: http://image.png
                        is_free: false
                        price:
                          amount: '101.0'
                          amount_without_discount: '101.0'
                          currency: USD
                        virtual_prices:
                          - amount: 100
                            sku: vc_test
                            is_default: true
                            amount_without_discount: 100
                            image_url: http://image.png
                            name: SHOTGUN FOR TRUE RAIDERS
                            type: virtual_currency
                            description: description
                          - amount: 200
                            sku: vc_test_2
                            is_default: false
                            amount_without_discount: 200
                            image_url: http://image.png
                            name: SHOTGUN FOR TRUE RAIDERS
                            type: virtual_currency
                            description: description
                        inventory_options:
                          consumable:
                            usages_count: 1
                          expiration_period:
                            type: day
                            value: 1
                        virtual_item_type: non_renewing_subscription
        '404':
          description: >-
            The group wasn’t found. Make sure that the `external_id` is correct
            and the group isn’t turned off or deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Catalog_inline_response_404_2'
              examples:
                response:
                  value:
                    statusCode: 404
                    errorCode: 4403
                    errorMessage: '[0401-4403]: Item group not found'
      security:
        - AuthForClient: []
  /v2/project/{project_id}/items/groups:
    get:
      tags:
        - virtual items & currency
      summary: Get items groups list
      description: Gets an items groups list for building a catalog.
      operationId: get-item-groups
      parameters:
        - $ref: '#/components/parameters/project-id-path-param'
      responses:
        '200':
          description: The list of groups was successfully received.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Catalog_inline_response_200_9'
              examples:
                response:
                  value:
                    groups:
                      - external_id: accessory
                        name: Accessory
                        description: Accessory
                        level: 0
                        order: 1
                        children: []
                      - external_id: background
                        name: Background
                        description: Background
                        level: 0
                        order: 1
                        children: []
                      - external_id: hair
                        name: Hair
                        description: Hair
                        level: 0
                        order: 1
                        children: []
                      - external_id: outfit
                        name: Outfit
                        description: Outfit
                        level: 0
                        order: 1
                        children: []
                      - external_id: body
                        name: Body
                        description: Body
                        level: 0
                        order: 1
                        children: []
                      - external_id: delete_group
                        name: Body
                        description: Body
                        level: 0
                        order: 1
                        children: []
                      - external_id: very_cool_group
                        name: Very cool group
                        description: Very cool group
                        level: 0
                        order: 1
                        children:
                          - external_id: test_group_secure
                            name: Test group secure
                            description: Group description
                            image_url: http://static.xsolla.com/img/xsolla-logo2.png
                            level: 1
                            order: 5
                            children: []
                            parent_external_id: very_cool_group
                      - external_id: test_group_secure
                        name: Test group secure
                        description: Group description
                        image_url: http://static.xsolla.com/img/xsolla-logo2.png
                        level: 0
                        order: 1
                        children:
                          - external_id: test_group_split
                            name: Test group secure
                            description: Group description
                            image_url: http://static.xsolla.com/img/xsolla-logo2.png
                            level: 1
                            order: 1
                            children: []
                            parent_external_id: test_group_secure
      security:
        - AuthForClient: []
  /v2/project/{project_id}/items/bundle:
    get:
      tags:
        - bundles
      summary: Get list of bundles
      description: >
        Gets a list of bundles for building a catalog.


        <div class="notice"><strong>Attention.</strong> All projects have the
        limitation to the number of items that you can get in the response. The
        default and maximum value is <strong>50 items per
        response.</strong></div>
      operationId: get-bundle-list
      parameters:
        - $ref: '#/components/parameters/project-id-path-param'
        - $ref: '#/components/parameters/limit-query-param'
        - $ref: '#/components/parameters/offset-query-param'
        - $ref: '#/components/parameters/locale-query-param'
        - $ref: '#/components/parameters/additional-fields-query-param'
        - $ref: '#/components/parameters/country-query-param'
      responses:
        '200':
          description: The list of bundles was successfully received.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Catalog_inline_response_200_10'
              examples:
                response:
                  $ref: '#/components/examples/200-get-bundle-list'
      security:
        - AuthForClient: []
  /v2/project/{project_id}/items/bundle/sku/{sku}:
    get:
      tags:
        - bundles
      summary: Get specified bundle
      description: Gets a specified bundle.
      operationId: get-bundle
      parameters:
        - $ref: '#/components/parameters/project-id-path-param'
        - $ref: '#/components/parameters/sku-path-param'
      responses:
        '200':
          description: The specified bundle was successfully received.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Catalog_client_bundle'
              examples:
                response:
                  $ref: '#/components/examples/200-get-bundle'
      security:
        - AuthForClient: []
  /v2/project/{project_id}/distribution_hub/user/auth:
    post:
      tags:
        - user token
      summary: Create user token
      operationId: create-user-token
      description: Verifies that a user exists in the game and creates a user token.
      parameters:
        - $ref: '#/components/parameters/project-id-path-param'
      requestBody:
        $ref: '#/components/requestBodies/post-user-token-json-model'
      responses:
        '200':
          description: User token successfully received.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Common_inline_response_200_1'
              examples:
                response:
                  value:
                    token: >-
                      eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
      security:
        - basicAuth: []
  /push-payments/pay:
    post:
      tags:
        - notifications
      servers:
        - url: https://ps.xsolla.com
      summary: Pay notification
      operationId: pay-notification
      description: Send this notification after successfully charging a user.
      requestBody:
        content:
          application/json:
            schema:
              required:
                - project_id
                - payment
                - purchase
                - user
              type: object
              properties:
                project_id:
                  type: integer
                  description: Project ID.
                payment:
                  type: object
                  required:
                    - geotype_id
                    - amount
                  properties:
                    geotype_id:
                      type: integer
                      description: Distributor partner ID on the Xsolla's side.
                    amount:
                      type: number
                      description: Amount of payment.
                    currency:
                      type: string
                      description: >-
                        Currency of the order. Virtual currency uses the SKU and
                        real currency uses a three-letter [ISO
                        4217](https://en.wikipedia.org/wiki/ISO_4217) code.
                    ps_transaction_id:
                      type: string
                      description: Transaction ID on the distribution partner’s side.
                    project_transaction_id:
                      type: string
                      description: Transaction ID on the game developer’s side.
                purchase:
                  type: object
                  required:
                    - order_id
                  properties:
                    order_id:
                      type: integer
                      description: Order ID.
                user:
                  type: object
                  required:
                    - id
                  properties:
                    id:
                      type: string
                      description: Unique user identifier in the game.
                    email:
                      type: string
                      description: User email address.
                    phone:
                      type: string
                      description: User phone number.
                    ps_account_id:
                      type: string
                      description: >-
                        User's payment account ID on the distribution partner’s
                        side.
            example:
              project_id: 18404
              payment:
                geotype_id: 13038
                amount: 10
                currency: USD
                ps_transaction_id: ps_transaction_id
              purchase:
                order_id: 1334430
              user:
                id: s.ivanov
      responses:
        '200':
          description: OK.
          content:
            application/json:
              schema:
                type: object
                properties:
                  payment_id:
                    type: integer
              example:
                payment_id: 784998484
        '400':
          description: Bad request.
        '403':
          description: Access denied.
        '404':
          description: Order not found.
        '409':
          description: Order is already paid.
        '422':
          description: Error while creating payment.
        '500':
          description: Internal server error.
  /push-payments/cancel:
    post:
      tags:
        - notifications
      servers:
        - url: https://ps.xsolla.com
      summary: Cancel notification
      operationId: cancel-notification
      description: |-
        Send the notification about payment cancellation if:
          - the payment was not completed
          - the payment was refunded
      requestBody:
        content:
          application/json:
            schema:
              required:
                - payment_id
              type: object
              properties:
                payment_id:
                  type: integer
            example:
              payment_id: 784998479
      responses:
        '200':
          description: OK.
        '400':
          description: Bad request.
        '403':
          description: Access denied.
        '404':
          description: Payment not found.
        '409':
          description: Payment is already cancelled.
        '422':
          description: Error while cancelling payment.
        '500':
          description: Internal server error.
  /v2/project/{project_id}/distribution_hub/payment/cart/{cart_id}:
    post:
      tags:
        - order
      summary: Create order with all items from particular cart
      description: >
        Creates an order with all items from the particular cart. The created
        order will get a `new` order status.
      operationId: create-order-by-cart-id
      parameters:
        - $ref: '#/components/parameters/project-id-path-param'
        - $ref: '#/components/parameters/cart-id-path-param'
      requestBody:
        $ref: '#/components/requestBodies/create-order-model'
      responses:
        '200':
          description: Order was successfully created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order_inline_response_200'
              examples:
                response:
                  value:
                    order_id: 641
                    billing_info:
                      price:
                        amount: 1480.45
                        currency: USD
                      indirect_taxes:
                        - name: VAT
                          amount: 246.75
                          rate: 20
                      direct_taxes:
                        - name: TAX
                          amount: 150
                          rate: 10
        '422':
          description: >-
            Invalid cart. Check that cart exists, not empty, and all items in it
            are not free.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order_inline_response_422'
              examples:
                response:
                  value:
                    errorCode: 1401
                    statusCode: 422
                    errorMessage: '[0401-1401]: Invalid cart'
      security:
        - AuthForClient: []
  /v2/project/{project_id}/distribution_hub/payment/cart:
    post:
      tags:
        - order
      summary: Create order with all items from current cart
      description: >
        Creates an order with all items from the cart. The created order will
        get a `new` order status.
      operationId: create-order
      parameters:
        - $ref: '#/components/parameters/project-id-path-param'
      requestBody:
        $ref: '#/components/requestBodies/create-order-model'
      responses:
        '200':
          description: Order was successfully created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order_inline_response_200'
              examples:
                response:
                  value:
                    order_id: 641
                    billing_info:
                      price:
                        amount: 1480.45
                        currency: USD
                      indirect_taxes:
                        - name: VAT
                          amount: 246.75
                          rate: 20
                      direct_taxes:
                        - name: TAX
                          amount: 150
                          rate: 10
        '422':
          description: >-
            Invalid cart. Check that cart exists, not empty, and all items in it
            are not free.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order_inline_response_422'
              examples:
                response:
                  value:
                    errorCode: 1401
                    statusCode: 422
                    errorMessage: '[0401-1401]: Invalid cart'
      security:
        - AuthForClient: []
  /v2/project/{project_id}/distribution_hub/payment/item/{item_sku}:
    post:
      tags:
        - order
      summary: Create order with specified item
      description: >
        Creates an order with a specified item. The created order will get a
        `new` order status.
      operationId: create-order-with-item
      parameters:
        - $ref: '#/components/parameters/project-id-path-param'
        - $ref: '#/components/parameters/item-sku-path-param'
      requestBody:
        $ref: '#/components/requestBodies/create-order-model'
      responses:
        '200':
          description: Order was successfully created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order_inline_response_200'
              examples:
                response:
                  value:
                    order_id: 641
                    billing_info:
                      price:
                        amount: 1480.45
                        currency: USD
                      indirect_taxes:
                        - name: VAT
                          amount: 246.75
                          rate: 20
                      direct_taxes:
                        - name: TAX
                          amount: 150
                          rate: 10
        '422':
          description: >-
            Invalid item. Check that item exists, not turned off, deleted, and
            not free.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order_inline_response_422_1'
              examples:
                response:
                  value:
                    errorCode: 1411
                    statusCode: 422
                    errorMessage: '[0401-1411]: Invalid item'
      security:
        - AuthForClient: []
  /v2/project/{project_id}/distribution_hub/order/{order_id}:
    get:
      tags:
        - order
      summary: Get order
      description: Retrieves a specified order.
      operationId: get-order
      parameters:
        - $ref: '#/components/parameters/project-id-path-param'
        - $ref: '#/components/parameters/order-id-path-param'
      responses:
        '200':
          description: Successful order request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order_inline_response_200_1'
              examples:
                response:
                  value:
                    order_id: 1
                    status: paid
                    content:
                      price:
                        amount: '30'
                        amount_without_discount: '30'
                        currency: USD
                      is_free: 'false'
                      items:
                        - sku: some_sku
                          quantity: 1
                          is_free: false
                          price:
                            amount: '30'
                            amount_without_discount: '30'
                            currency: USD
        '404':
          description: >-
            Order not found. Make sure the `project_id` and the `order_id` are
            correct.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order_inline_response_404'
              examples:
                response:
                  value:
                    statusCode: 404
                    errorCode: 9001
                    errorMessage: '[0401-9001]: Order not found'
      security:
        - AuthForClient: []
components:
  securitySchemes:
    AuthForClient:
      type: http
      description: >-
        Use the [Create user
        token](https://developers.xsolla.com/api/digital-distribution-hub/operation/create-user-token)
        endpoint to generate a token.
      scheme: bearer
    basicAuth:
      type: http
      description: >
        Xsolla API uses basic access authentication. All requests to API must
        contain the `Authorization: Basic <your_authorization_basic_key>`
        header, where `your_authorization_basic_key` is the
        `distribution_hub_id:api_key` pair encoded according to the Base64
        standard. 


        Contact your Account Manager to get `distribution_hub_id` and `api_key`.
      scheme: basic
  parameters:
    project-id-path-param:
      name: project_id
      in: path
      description: Project ID.
      required: true
      style: simple
      explode: false
      schema:
        type: integer
        example: 44056
    cart-id-path-param:
      name: cart_id
      in: path
      description: Cart ID.
      required: true
      style: simple
      explode: false
      schema:
        type: string
        example: custom_id
    currency-query-param:
      name: currency
      in: query
      description: >-
        The currency which prices are displayed in, (USD  by default).
        Three-letter currency code per [ISO
        4217](https://en.wikipedia.org/wiki/ISO_4217).
      required: false
      style: form
      explode: true
      schema:
        type: string
        default: USD
    locale-query-param:
      name: locale
      in: query
      description: Response language. Two-letter lowercase language code per ISO 639-1.
      required: false
      style: form
      explode: true
      schema:
        type: string
        default: en
    item-sku-path-param:
      name: item_sku
      in: path
      description: Item SKU.
      required: true
      style: simple
      explode: false
      schema:
        type: string
        example: booster_mega_1
    limit-query-param:
      name: limit
      in: query
      description: Limit for the number of elements on the page.
      required: false
      style: form
      explode: true
      schema:
        type: integer
        example: 50
      example: 50
    offset-query-param:
      name: offset
      in: query
      description: >-
        Number of the element from which the list is generated (the count starts
        from 0).
      required: false
      style: form
      explode: true
      schema:
        type: integer
        example: 0
      example: 0
    additional-fields-query-param:
      name: additional_fields[]
      in: query
      description: >-
        The list of additional fields. These fields will be in the response if
        you send them in your request. Available fields `media_list`, `order`,
        `long_description`.
      required: false
      style: form
      explode: true
      schema:
        type: array
        items:
          type: string
    country-query-param:
      name: country
      in: query
      description: >-
        Country to calculate regional prices and restrictions for catalog.
        Two-letter uppercase country code per [ISO 3166-1
        alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). If you do
        not specify the country explicitly, it will be calculated based on
        user's IP address.
      required: false
      style: form
      explode: true
      schema:
        type: string
        default: US
    external-id-path-param:
      name: external_id
      in: path
      description: Group external ID.
      required: true
      style: simple
      explode: false
      schema:
        type: string
        default: all
    sku-path-param:
      name: sku
      in: path
      description: Bundle SKU.
      required: true
      style: simple
      explode: false
      schema:
        type: string
        example: kg_1
    order-id-path-param:
      name: order_id
      in: path
      description: Order ID.
      required: true
      style: simple
      explode: false
      schema:
        type: string
        example: '656'
  schemas:
    Cart_inline_response_200_price:
      type: object
      properties:
        amount:
          type: string
          default: '50.0000000000000000'
        amount_without_discount:
          type: string
          default: '100.0000000000000000'
        currency:
          type: string
          default: USD
      description: Cart price.
      nullable: true
      example: >-
        {"amount":"6150.0000000000000000","amount_without_discount":"6150.0000000000000000","currency":"USD"}
    Cart_inline_response_200_groups:
      type: object
      properties:
        external_id:
          type: string
        name:
          type: string
    Cart_admin-attribute-external_id:
      maxLength: 255
      minLength: 1
      pattern: ^[a-zA-Z0-9-_]+$
      type: string
      description: >-
        Unique attribute ID. The `external_id` may only contain lowercase Latin
        alphanumeric characters, dashes, and underscores.
      example: attribute_1
    Cart_value-external_id:
      maxLength: 255
      minLength: 1
      pattern: ^[-_.\d\w]+$
      type: string
      description: >-
        Unique value ID for an attribute. The `external_id` may only contain
        lowercase Latin alphanumeric characters, dashes, and underscores.
      example: attribute_value
    Cart_clientattributes_inner:
      type: object
      properties:
        external_id:
          $ref: '#/components/schemas/Cart_admin-attribute-external_id'
        name:
          type: string
          description: Name of attribute.
          example: Genre
        values:
          type: array
          items:
            type: object
            properties:
              external_id:
                $ref: '#/components/schemas/Cart_value-external_id'
              value:
                type: string
                description: Value of attribute.
                example: Strategy
    Cart_client-attributes:
      type: array
      description: >-
        List of attributes and their values corresponding to the item. Can be
        used for catalog filtering.
      example:
        value:
          external_id: genre
          name: Жанр
          values:
            - external_id: genre_e3364991f92e751689a68b96598a5a5a84010b85
              value: Casual
            - external_id: genre_eba07bfd0f982940773cba3744d97264dd58acd7
              value: Strategy
            - external_id: genre_b8d0c6d8f0524c2b2d79ebb93aa3cd0e8b5199a8
              value: Mobile
      items:
        $ref: '#/components/schemas/Cart_clientattributes_inner'
      default: []
    Cart_inline_response_200_items:
      type: object
      properties:
        sku:
          type: string
        groups:
          type: array
          items:
            $ref: '#/components/schemas/Cart_inline_response_200_groups'
        name:
          type: string
          nullable: true
        attributes:
          $ref: '#/components/schemas/Cart_client-attributes'
        type:
          type: string
        description:
          type: string
        image_url:
          type: string
        quantity:
          type: integer
        is_free:
          type: boolean
    Cart_inline_response_200:
      type: object
      properties:
        cart_id:
          type: string
          description: Cart ID.
          example: cart_id
        price:
          $ref: '#/components/schemas/Cart_inline_response_200_price'
        is_free:
          type: boolean
          description: If `true`, the cart is free.
        items:
          type: array
          example:
            - attributes: []
              description: Take it, take it all! All of Xsollas riches in one Mega Booster.
              groups:
                - external_id: powerups
                  name: Power Ups
              image_url: >-
                https://cdn.xsolla.net/img/misc/images/e9f2f4a634bc96ea03b5d5ceadd7c55f.png
              inventory_options:
                consumable:
                  usages_count: 1
              is_free: false
              name: Xsolla Booster Mega
              price:
                amount: '50.0000000000000000'
                amount_without_discount: '100.0000000000000000'
                currency: USD
              quantity: 123
              sku: booster_mega_1
              type: virtual_good
              virtual_item_type: consumable
              virtual_prices: []
          items:
            $ref: '#/components/schemas/Cart_inline_response_200_items'
    Cart-Payment_settings_currency:
      type: string
      description: >-
        Preferred payment currency. Three-letter currency code per [ISO
        4217](https://en.wikipedia.org/wiki/ISO_4217).
    Cart_inline_response_200_1_warnings:
      type: object
      properties:
        sku:
          type: string
        quantity:
          type: integer
        errorCode:
          type: integer
        errorMessage:
          type: string
    Cart_inline_response_200_1:
      type: object
      properties:
        cart_id:
          type: string
          description: Cart ID.
          example: cart_id
        price:
          $ref: '#/components/schemas/Cart_inline_response_200_price'
        is_free:
          type: boolean
          description: If `true`, the cart is free.
        items:
          type: array
          items:
            $ref: '#/components/schemas/Cart_inline_response_200_items'
        warnings:
          type: array
          example:
            - attributes: []
              description: Take it, take it all! All of Xsollas riches in one Mega Booster.
              groups:
                - external_id: powerups
                  name: Power Ups
              image_url: >-
                https://cdn.xsolla.net/img/misc/images/e9f2f4a634bc96ea03b5d5ceadd7c55f.png
              inventory_options:
                consumable:
                  usages_count: 1
              is_free: false
              name: Xsolla Booster Mega
              price:
                amount: '50.0000000000000000'
                amount_without_discount: '100.0000000000000000'
                currency: USD
              quantity: 123
              sku: booster_mega_1
              type: virtual_good
              virtual_item_type: consumable
              virtual_prices: []
          items:
            $ref: '#/components/schemas/Cart_inline_response_200_1_warnings'
    Cart_inline_response_404:
      type: object
      properties:
        statusCode:
          type: integer
          example: 404
        errorCode:
          type: integer
          example: 4001
        errorMessage:
          type: string
          example: >-
            [0401-4001]: Item with Project ID = 44056 and SKU =
            booster_mega_12222 not found
    Cart_inline_response_422:
      type: object
      properties:
        statusCode:
          type: integer
          example: 422
        errorMessage:
          type: string
          example: Item quantity must be non-negative integer.
        errorCode:
          type: integer
          example: 1102
    Cart_inline_response_422_1:
      type: object
      properties:
        statusCode:
          type: integer
          example: 422
        errorCode:
          type: integer
          example: 1421
        errorMessage:
          type: string
          example: >-
            This type of item cannot be put to the cart. Select another type of
            item.
    Catalog_inline_response_200_groups:
      type: object
      properties:
        external_id:
          type: string
          example: accessory
        name:
          type: string
          example: Accessory
    Catalog_admin-attribute-external_id:
      maxLength: 255
      minLength: 1
      pattern: ^[a-zA-Z0-9-_]+$
      type: string
      description: >-
        Unique attribute ID. The `external_id` may only contain lowercase Latin
        alphanumeric characters, dashes, and underscores.
      example: attribute_1
    Catalog_value-external_id:
      maxLength: 255
      minLength: 1
      pattern: ^[-_.\d\w]+$
      type: string
      description: >-
        Unique value ID for an attribute. The `external_id` may only contain
        lowercase Latin alphanumeric characters, dashes, and underscores.
      example: attribute_value
    Catalog_clientattributes_inner:
      type: object
      properties:
        external_id:
          $ref: '#/components/schemas/Catalog_admin-attribute-external_id'
        name:
          type: string
          description: Name of attribute.
          example: Genre
        values:
          type: array
          items:
            type: object
            properties:
              external_id:
                $ref: '#/components/schemas/Catalog_value-external_id'
              value:
                type: string
                description: Value of attribute.
                example: Strategy
    Catalog_client-attributes-common:
      type: array
      description: >-
        List of attributes and their values corresponding to the item. Can be
        used for catalog filtering.
      items:
        $ref: '#/components/schemas/Catalog_clientattributes_inner'
      default: []
    Catalog_inline_response_200_price:
      type: object
      properties:
        amount:
          type: string
          description: Discounted item price.
          example: '2.9900'
        amount_without_discount:
          type: string
          description: Item price.
          example: '2.9900'
        currency:
          type: string
          description: >-
            Default purchase currency. Three-letter code per [ISO
            4217](https://en.wikipedia.org/wiki/ISO_4217).
          example: USD
      description: Item prices.
    Catalog_inline_response_200_virtual_prices:
      type: object
      properties:
        amount:
          type: integer
          description: Discounted item price in virtual currency.
          example: 100
        amount_without_discount:
          type: integer
          description: Item price.
          example: 200
        sku:
          type: string
          description: Virtual currency item SKU.
          example: vc_test
        is_default:
          type: boolean
          description: Whether price is default for item.
          example: true
        image_url:
          type: string
          description: Image of virtual currency.
          example: http://image.png
        name:
          type: string
          description: Virtual currency name.
          example: SHOTGUN FOR TRUE RAIDERS
        type:
          type: string
          description: Virtual currency type.
          example: virtual_currency
        description:
          type: string
          description: Virtual currency description.
          example: Big Rocket - description
      description: Virtual price.
    Catalog_inline_response_200_unit_items:
      type: object
      properties:
        sku:
          type: string
          description: >-
            Unique item ID. The SKU may only contain lowercase Latin
            alphanumeric characters, periods, dashes, and underscores.
          example: game_01
        type:
          type: string
          description: 'Type of item: `game_key`.'
          example: game_key
        is_free:
          type: boolean
          description: If `true`, the item is free.
          example: false
        price:
          $ref: '#/components/schemas/Catalog_inline_response_200_price'
        virtual_prices:
          type: array
          description: Virtual prices.
          items:
            $ref: '#/components/schemas/Catalog_inline_response_200_virtual_prices'
        drm_name:
          type: string
          description: DRM name.
          example: Steam
        drm_sku:
          type: string
          description: >-
            Unique DRM ID. The SKU may only contain lowercase Latin alphanumeric
            characters, periods, dashes, and underscores.
          example: steam
        has_keys:
          type: boolean
          description: If `true`, the game key has keys for sale.
          example: false
        is_pre_order:
          type: boolean
          description: >-
            If `true`, the game key is pre-order and the release date hasn't
            passed.
          example: true
        release_date:
          type: string
          description: Game key release date in the ISO 8601 format.
          example: '2020-08-11T10:00:00+03:00'
    Catalog_inline_response_200_items:
      type: object
      properties:
        sku:
          type: string
          description: >-
            Unique item ID. The SKU may only contain lowercase Latin
            alphanumeric characters, periods, dashes, and underscores.
          example: game_01
        name:
          type: string
          description: Item name.
          example: Game name
        groups:
          type: array
          description: Groups the item belongs to.
          example:
            - external_id: all
              name: All games
            - external_id: Xsolla
              name: Xsolla game
          items:
            $ref: '#/components/schemas/Catalog_inline_response_200_groups'
        attributes:
          $ref: '#/components/schemas/Catalog_client-attributes-common'
        type:
          type: string
          description: >-
            Type of item:
            `virtual_good`/`virtual_currency`/`bundle`/`physical_good`/`unit`.
          example: unit
        unit_type:
          type: string
          description: 'Type of unit: `game`.'
          example: game
        description:
          type: string
          description: Item description.
          example: Game description
        image_url:
          type: string
          description: Image URL.
          example: >-
            https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png
        unit_items:
          type: array
          items:
            $ref: '#/components/schemas/Catalog_inline_response_200_unit_items'
    Catalog_inline_response_200:
      type: object
      properties:
        items:
          type: array
          example:
            - sku: game_1
              name: Game name
              groups:
                - external_id: all
                  name: All games
                - external_id: Xsolla
                  name: Xsolla games
              type: unit
              unit_type: game
              description: Game description
              image_url: >-
                https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png
              attributes:
                $ref: '#/components/examples/client-attribute-game/Catalog_value'
              unit_items:
                - sku: game_key_01
                  type: game_key
                  is_free: false
                  price:
                    amount: '30.5'
                    amount_without_discount: '30.5'
                    currency: USD
                  virtual_prices: []
                  drm_name: Steam
                  drm_sku: steam
                  has_keys: true
                  is_pre_order: true
                  release_date: '2020-08-11T10:00:00+03:00'
                - sku: game_key_02
                  type: game_key
                  is_free: false
                  price:
                    amount: '30.5'
                    amount_without_discount: '30.5'
                    currency: USD
                  virtual_prices: []
                  drm_name: Origin
                  drm_sku: origin
                  has_keys: false
                  is_pre_order: false
            - sku: game_2
              name: Game name
              groups:
                - external_id: all
                  name: All games
              type: unit
              unit_type: game
              description: Game description
              image_url: >-
                https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png
              attributes:
                - external_id: OS
                  name: OS
                  values:
                    - external_id: 9d5c5efb7c0f00a00fe4e3583f1215b0050bc723
                      value: Windows
              unit_items:
                - sku: game_key_01
                  type: game_key
                  is_free: false
                  price:
                    amount: '30.5'
                    amount_without_discount: '30.5'
                    currency: USD
                  virtual_prices: []
                  drm_name: Steam
                  drm_sku: steam
                  has_keys: false
                  is_pre_order: false
          items:
            $ref: '#/components/schemas/Catalog_inline_response_200_items'
      description: Object with games.
    Catalog_client-attributes:
      type: array
      description: >
        List of attributes and their values corresponding to the Game.


        <div class="attention"><strong>Attention.</strong> This part of response
        is available only if you send the `additional_fields[]=attributes` query
        parameter.</div>
      items:
        $ref: '#/components/schemas/Catalog_clientattributes_inner'
      default: []
    Catalog_inline_response_200_1:
      type: object
      properties:
        sku:
          type: string
          description: >-
            Unique item ID. The SKU may only contain lowercase Latin
            alphanumeric characters, periods, dashes, and underscores.
          example: game_01
        name:
          type: string
          description: Item name.
          example: Game name
        groups:
          type: array
          description: Groups the item belongs to.
          example:
            - external_id: all
              name: All games
            - external_id: Xsolla
              name: Xsolla game
          items:
            $ref: '#/components/schemas/Catalog_inline_response_200_groups'
        attributes:
          $ref: '#/components/schemas/Catalog_client-attributes'
        type:
          type: string
          description: >-
            Type of item:
            `virtual_good`/`virtual_currency`/`bundle`/`physical_good`/`unit`.
          example: unit
        unit_type:
          type: string
          description: 'Type of unit: `game`.'
          example: game
        description:
          type: string
          description: Item description.
          example: Game description
        image_url:
          type: string
          description: Image URL.
          example: >-
            https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png
        unit_items:
          type: array
          items:
            $ref: '#/components/schemas/Catalog_inline_response_200_unit_items'
      description: Object with game information.
      example:
        sku: game_1
        name: Game name
        groups:
          - external_id: all
            name: All games
          - external_id: Xsolla
            name: Xsolla games
        type: unit
        unit_type: game
        description: Game description
        image_url: >-
          https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png
        attributes:
          $ref: '#/components/examples/client-attribute-game/Catalog_value'
        unit_items:
          - sku: game_key_01
            type: game_key
            is_free: false
            price:
              amount: '30.5'
              amount_without_discount: '30.5'
              currency: USD
            virtual_prices: []
            drm_name: Steam
            drm_sku: steam
            has_keys: true
            is_pre_order: true
            release_date: '2020-08-11T10:00:00+03:00'
          - sku: game_key_02
            type: game_key
            is_free: false
            price:
              amount: '30.5'
              amount_without_discount: '30.5'
              currency: USD
            virtual_prices: []
            drm_name: Origin
            drm_sku: origin
            has_keys: false
            is_pre_order: false
    Catalog_inline_response_404:
      type: object
      properties:
        statusCode:
          type: integer
          example: 404
        errorCode:
          type: integer
          example: 4001
        errorMessage:
          type: string
          example: '[0401-4001]: Item with sku = ''game_1'' not found'
    Catalog_inline_response_200_2:
      type: object
      properties:
        sku:
          type: string
          description: >-
            Unique item ID. The SKU may only contain lowercase Latin
            alphanumeric characters, periods, dashes, and underscores.
          example: game_01
        name:
          type: string
          description: Item name.
          example: Game name
        groups:
          type: array
          description: Groups the item belongs to.
          example:
            - external_id: all
              name: All games
            - external_id: Xsolla
              name: Xsolla game
          items:
            $ref: '#/components/schemas/Catalog_inline_response_200_groups'
        attributes:
          $ref: '#/components/schemas/Catalog_client-attributes-common'
        type:
          type: string
          description: 'Type of item: `game_key`.'
          example: game_key
        description:
          type: string
          description: Item description.
          example: Game description
        image_url:
          type: string
          description: Image URL.
          example: >-
            https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png
        is_free:
          type: boolean
          description: If `true`, the item is free.
          example: false
        price:
          $ref: '#/components/schemas/Catalog_inline_response_200_price'
        virtual_prices:
          type: array
          description: Virtual prices.
          items:
            $ref: '#/components/schemas/Catalog_inline_response_200_virtual_prices'
        drm_name:
          type: string
          description: DRM name.
          example: Steam
        drm_sku:
          type: string
          description: >-
            Unique DRM ID. The SKU may only contain lowercase Latin alphanumeric
            characters, periods, dashes, and underscores.
          example: steam
        has_keys:
          type: boolean
          description: If `true`, the game key has keys for sale.
          example: false
        is_pre_order:
          type: boolean
          description: >-
            If `true`, the game key is pre-order and the release date hasn't
            passed.
          example: true
        release_date:
          type: string
          description: Game key release date in the ISO 8601 format.
          example: '2020-08-11T10:00:00+03:00'
      description: Object with game key information.
      example:
        sku: game_1
        name: Game name
        groups:
          - external_id: all
            name: All games
          - external_id: Xsolla
            name: Xsolla games
        type: game_key
        description: Game description
        image_url: >-
          https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png
        attributes:
          $ref: '#/components/examples/client-attribute-game-horror/Catalog_value'
        is_free: false
        price:
          amount: '30.5'
          amount_without_discount: '30.5'
          currency: USD
        virtual_prices: []
        drm_name: Steam
        drm_sku: steam
        has_keys: true
        is_pre_order: true
        release_date: '2020-08-11T10:00:00+03:00'
    Catalog_inline_response_404_1:
      type: object
      properties:
        statusCode:
          type: integer
          example: 404
        errorCode:
          type: integer
          example: 4001
        errorMessage:
          type: string
          example: '[0401-4001]: Item with sku = ''game_key_1'' not found'
    Catalog_inline_response_200_3_items:
      type: object
      properties:
        sku:
          type: string
          description: >-
            Unique item ID. The SKU may only contain lowercase Latin
            alphanumeric characters, periods, dashes, and underscores.
          example: game_01
        name:
          type: string
          description: Item name.
          example: Game name
        groups:
          type: array
          description: Groups the item belongs to.
          example:
            - external_id: all
              name: All games
            - external_id: Xsolla
              name: Xsolla game
          items:
            $ref: '#/components/schemas/Catalog_inline_response_200_groups'
        attributes:
          $ref: '#/components/schemas/Catalog_client-attributes'
        type:
          type: string
          description: 'Type of item: `game_key`.'
          example: game_key
        description:
          type: string
          description: Item description.
          example: Game description
        image_url:
          type: string
          description: Image URL.
          example: >-
            https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png
        is_free:
          type: boolean
          description: If `true`, the item is free.
          example: false
        price:
          $ref: '#/components/schemas/Catalog_inline_response_200_price'
        virtual_prices:
          type: array
          description: Virtual prices.
          items:
            $ref: '#/components/schemas/Catalog_inline_response_200_virtual_prices'
        drm_name:
          type: string
          description: DRM name.
          example: Steam
        drm_sku:
          type: string
          description: >-
            Unique DRM ID. The SKU may only contain lowercase Latin alphanumeric
            characters, periods, dashes, and underscores.
          example: steam
        has_keys:
          type: boolean
          description: If `true`, the game key has keys for sale.
          example: false
        is_pre_order:
          type: boolean
          description: >-
            If `true`, the game key is pre-order and the release date hasn't
            passed.
          example: true
        release_date:
          type: string
          description: Game key release date in the ISO 8601 format.
          example: '2020-08-11T10:00:00+03:00'
    Catalog_inline_response_200_3:
      type: object
      properties:
        items:
          type: array
          example:
            - sku: game_1
              name: Game name
              groups:
                - external_id: all
                  name: All games
                - external_id: Xsolla
                  name: Xsolla games
              type: game_key
              description: Game description
              image_url: >-
                https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png
              attributes:
                $ref: >-
                  #/components/examples/client-attribute-game-horror/Catalog_value
              is_free: false
              price:
                amount: '30.5'
                amount_without_discount: '30.5'
                currency: USD
              virtual_prices: []
              drm_name: Steam
              drm_sku: steam
              has_keys: true
              is_pre_order: true
              release_date: '2020-08-11T10:00:00+03:00'
            - sku: game_2
              name: Game name
              groups:
                - external_id: all
                  name: All games
              type: game_key
              description: Game description
              image_url: >-
                https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png
              attributes:
                $ref: >-
                  #/components/examples/client-attribute-game-horror/Catalog_value
              is_free: false
              price:
                amount: '30.5'
                amount_without_discount: '30.5'
                currency: USD
              virtual_prices: []
              drm_name: Steam
              drm_sku: steam
              has_keys: true
              is_pre_order: false
          items:
            $ref: '#/components/schemas/Catalog_inline_response_200_3_items'
      description: Object with games.
    Catalog_inline_response_200_4_drm:
      type: object
      properties:
        sku:
          type: string
          description: >-
            Unique DRM ID. The SKU may only contain lowercase Latin alphanumeric
            characters, periods, dashes, and underscores.
          example: steam
        name:
          type: string
          description: DRM name.
          example: Steam
        image:
          type: string
          description: Image URL.
          example: >-
            https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png
        link:
          type: string
          description: Redeem link.
          example: https://support.us.playstation.com
        redeem_instruction_link:
          type: string
          description: Redeem instruction link.
          example: https://support.us.playstation.com
        drm_id:
          type: number
          description: DRM ID.
          example: 1
    Catalog_inline_response_200_4:
      type: object
      properties:
        drm:
          type: array
          example:
            - sku: steam
              name: Steam
              image: >-
                https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png
              link: https://support.steampowered.com
              redeem_instruction_link: https://support.steampowered.com
              drm_id: 1
            - sku: playstation
              name: Playstation
              image: >-
                https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png
              redeem_instruction_link: https://support.us.playstation.com
              drm_id: 2
          items:
            $ref: '#/components/schemas/Catalog_inline_response_200_4_drm'
      description: Object with games.
    Catalog_inline_response_200_5_price:
      type: object
      properties:
        amount:
          type: string
          description: Discounted item price.
          example: '100.99'
        amount_without_discount:
          type: string
          description: Item price.
          example: '100.99'
        currency:
          type: string
          description: >-
            Default purchase currency. Three-letter code per [ISO
            4217](https://en.wikipedia.org/wiki/ISO_4217).
          example: USD
      description: Item prices.
    Catalog_inline_response_200_5_inventory_options_consumable:
      type: object
      properties:
        usages_count:
          type: integer
          description: >-
            Total number of remaining uses if this is a consumable item, or
            `null` if this is a non-consumable item.
          nullable: true
          example: 1
      description: >-
        Defines the consumable properties if this is a consumable item, or
        `null` if this is a non-consumable item.
      nullable: true
    Catalog_inline_response_200_5_inventory_options_expiration_period:
      type: object
      properties:
        type:
          type: string
          description: Defines type of item expiration.
          example: day
          enum:
            - minute
            - hour
            - day
            - week
            - month
            - year
        value:
          type: integer
          description: Defines value for an expiration period.
          example: 1
      description: >-
        Defines the expiration properties if this is a expired item, or `null`
        if this is a non-expired item.
      nullable: true
    Catalog_inline_response_200_5_inventory_options:
      type: object
      properties:
        consumable:
          $ref: >-
            #/components/schemas/Catalog_inline_response_200_5_inventory_options_consumable
        expiration_period:
          $ref: >-
            #/components/schemas/Catalog_inline_response_200_5_inventory_options_expiration_period
      description: Defines the inventory item options.
    Catalog_inline_response_200_5_items:
      type: object
      properties:
        sku:
          type: string
          description: >-
            Unique item ID. The SKU may only contain lowercase Latin
            alphanumeric characters, periods, dashes, and underscores.
          example: big_rocket
        name:
          type: string
          description: Item name.
          example: Big Rocket
        groups:
          type: array
          description: Groups the item belongs to.
          example:
            - external_id: accessory
              name: Accessory
          items:
            $ref: '#/components/schemas/Catalog_inline_response_200_groups'
        attributes:
          $ref: '#/components/schemas/Catalog_client-attributes'
        type:
          type: string
          description: 'Type of item: `virtual_good`/`virtual_currency`/`bundle`.'
          example: virtual_good
        description:
          type: string
          description: Item description.
          example: Big Rocket - description
        image_url:
          type: string
          description: Image URL.
          example: >-
            https://popmedia.blob.core.windows.net/popyourself/male/outfit/male_armor_white_a-01.png
        is_free:
          type: boolean
          description: If `true`, the item is free.
          example: false
        price:
          $ref: '#/components/schemas/Catalog_inline_response_200_5_price'
        virtual_prices:
          type: array
          description: Virtual prices.
          items:
            $ref: '#/components/schemas/Catalog_inline_response_200_virtual_prices'
        inventory_options:
          $ref: '#/components/schemas/Catalog_inline_response_200_5_inventory_options'
        virtual_item_type:
          type: string
          description: Type of virtual item.
          example: non-consumable
          enum:
            - consumable
            - non_consumable
            - non_renewing_subscription
    Catalog_inline_response_200_5:
      type: object
      properties:
        items:
          type: array
          example:
            - sku: big_rocket
              name: Big Rocket
              groups:
                - external_id: accessory
                  name: Accessory
              attributes:
                - external_id: stack_size
                  name: Stack size
                  values:
                    - external_id: size_e3364991f92e751689a68b96598a5a5a84010b85
                      value: '5'
              type: virtual_good
              description: Big Rocket - description
              image_url: >-
                https://popmedia.blob.core.windows.net/popyourself/male/outfit/male_armor_white_a-01.png
              is_free: false
              price:
                amount: '100.99'
                amount_without_discount: '100.99'
                currency: USD
              virtual_prices:
                - amount: 100
                  sku: vc_test
                  is_default: true
                  amount_without_discount: 100
                  image_url: http://image.png
                  name: SHOTGUN FOR TRUE RAIDERS
                  type: virtual_currency
                  description: description
              inventory_options:
                consumable:
                  usages_count: 1
                expiration_period:
                  type: day
                  value: 1
              virtual_item_type: non_renewing_subscription
            - sku: shotgun_raider
              name: SHOTGUN FOR TRUE RAIDERS
              groups:
                - external_id: hair
                  name: Hair
              attributes:
                - external_id: stack_size
                  name: Stack size
                  values:
                    - external_id: size_e3364991f92e751689a68b96598a5a5a84010b85
                      value: '5'
                - external_id: rating
                  name: Rating
                  values:
                    - external_id: rating_e3364991f92e751689a68b96598a5a5a84010b85
                      value: '3.9'
              type: virtual_good
              description: description
              image_url: http://image.png
              is_free: false
              price:
                amount: '101.0'
                amount_without_discount: '101.0'
                currency: USD
              virtual_prices:
                - amount: 100
                  sku: vc_test
                  is_default: true
                  amount_without_discount: 100
                  image_url: http://image.png
                  name: SHOTGUN FOR TRUE RAIDERS
                  type: virtual_currency
                  description: description
                - amount: 200
                  sku: vc_test_2
                  is_default: false
                  amount_without_discount: 200
                  image_url: http://image.png
                  name: SHOTGUN FOR TRUE RAIDERS
                  type: virtual_currency
                  description: description
              inventory_options:
                consumable:
                  usages_count: 1
                expiration_period:
                  type: day
                  value: 1
              virtual_item_type: non_renewing_subscription
            - sku: shotgun_raider_2
              name: SHOTGUN FOR TRUE RAIDERS
              groups: []
              attributes: []
              type: virtual_good
              description: description
              image_url: http://image.png
              is_free: true
              virtual_prices: []
              inventory_options:
                consumable:
                  usages_count: 1
                expiration_period:
                  type: day
                  value: 1
              virtual_item_type: non_renewing_subscription
          items:
            $ref: '#/components/schemas/Catalog_inline_response_200_5_items'
      description: Object with virtual items.
    Catalog_inline_response_200_6_items:
      type: object
      properties:
        sku:
          type: string
          description: >-
            Unique item ID. The SKU may only contain lowercase Latin
            alphanumeric characters, periods, dashes, and underscores.
          example: big_rocket
        name:
          type: string
          description: Item name.
          example: Big Rocket
        groups:
          type: array
          description: Groups the item belongs to.
          example:
            - external_id: accessory
              name: Accessory
          items:
            $ref: '#/components/schemas/Catalog_inline_response_200_groups'
        attributes:
          $ref: '#/components/schemas/Catalog_client-attributes'
        type:
          type: string
          description: 'Type of item: `virtual_good`/`virtual_currency`/`bundle`.'
          example: virtual_currency
        description:
          type: string
          description: Item description.
          example: Big Rocket - description
        image_url:
          type: string
          description: Image URL.
          example: >-
            https://popmedia.blob.core.windows.net/popyourself/male/outfit/male_armor_white_a-01.png
        is_free:
          type: string
          description: If `true`, the item is free.
          example: 'false'
        price:
          $ref: '#/components/schemas/Catalog_inline_response_200_5_price'
        virtual_prices:
          type: array
          description: Virtual prices.
          example:
            - amount: 100
              sku: shotgun_raider
              is_default: true
              amount_without_discount: 100
              image_url: http://image.png
          items:
            $ref: '#/components/schemas/Catalog_inline_response_200_virtual_prices'
        inventory_options:
          $ref: '#/components/schemas/Catalog_inline_response_200_5_inventory_options'
    Catalog_inline_response_200_6:
      type: object
      properties:
        items:
          type: array
          example:
            - sku: big_rocket
              name: Big Rocket
              groups:
                - external_id: accessory
                  name: Accessory
              attributes:
                - external_id: stack_size
                  name: Stack size
                  values:
                    - value: '5'
              type: virtual_currency
              description: Big Rocket - short description
              image_url: >-
                https://popmedia.blob.core.windows.net/popyourself/male/outfit/male_armor_white_a-01.png
              is_free: false
              price:
                amount: '100.99'
                amount_without_discount: '100.99'
                currency: USD
              virtual_prices:
                - amount: 100
                  sku: shotgun_raider
                  is_default: true
                  amount_without_discount: 100
                  image_url: http://image.png
                  name: SHOTGUN FOR TRUE RAIDERS
                  type: virtual_currency
                  description: description
              inventory_options:
                consumable:
                  usages_count: 1
            - sku: shotgun_raider
              name: SHOTGUN FOR TRUE RAIDERS
              groups:
                - external_id: hair
                  name: Hair
              attributes:
                - external_id: stack_size
                  name: Stack size
                  values:
                    - value: '1'
                - external_id: rating
                  name: Rating
                  values:
                    - value: '3.9'
                - external_id: genre
                  name: Genre
                  values:
                    - value: Strategy
                    - value: Tactical
                    - Turn-based
              type: virtual_currency
              description: description
              image_url: http://image.png
              is_free: false
              price:
                amount: '101.0'
                amount_without_discount: '101.0'
                currency: USD
              virtual_prices: []
              inventory_options:
                consumable:
                  usages_count: 1
            - sku: shotgun_raider_2
              name: SHOTGUN FOR TRUE RAIDERS
              groups: []
              attributes: []
              type: virtual_currency
              description: description
              image_url: http://image.png
              is_free: true
              virtual_prices: []
              inventory_options:
                consumable:
                  usages_count: 1
          items:
            $ref: '#/components/schemas/Catalog_inline_response_200_6_items'
    Catalog_inline_response_200_7_inventory_options_expiration_period:
      type: object
      properties:
        type:
          type: string
          description: Defines type of expiration of a item.
          example: day
          enum:
            - minute
            - hour
            - day
            - week
            - month
            - year
        value:
          type: integer
          description: Defines value for expiration period.
          example: 1
      description: >-
        Defines the expiration properties if this is a expired item, or `null`
        if this is a non-expired item.
      nullable: true
    Catalog_inline_response_200_7_inventory_options:
      type: object
      properties:
        consumable:
          $ref: >-
            #/components/schemas/Catalog_inline_response_200_5_inventory_options_consumable
        expiration_period:
          $ref: >-
            #/components/schemas/Catalog_inline_response_200_7_inventory_options_expiration_period
      description: Defines the inventory item options.
    Catalog_inline_response_200_7_content:
      type: object
      properties:
        sku:
          type: string
          description: >-
            Unique item ID. The SKU may only contain lowercase Latin
            alphanumeric characters, dashes, and underscores.
          example: big_rocket
        name:
          type: string
          description: Item name.
          example: Big Rocket
        type:
          type: string
          description: 'Type of item: `virtual_good`/`virtual_currency`/`bundle`.'
          example: virtual_currency
        description:
          type: string
          description: Item description.
          example: Big Rocket - description
        image_url:
          type: string
          description: Image URL.
          example: >-
            https://popmedia.blob.core.windows.net/popyourself/male/outfit/male_armor_white_a-01.png
        quantity:
          type: integer
          description: Quantity of virtual currency in a package.
          example: 250
        inventory_options:
          $ref: '#/components/schemas/Catalog_inline_response_200_7_inventory_options'
      description: Virtual currency in a package.
    Catalog_inline_response_200_7_items:
      type: object
      properties:
        sku:
          type: string
          description: >-
            Unique item ID. The SKU may only contain lowercase Latin
            alphanumeric characters, periods, dashes, and underscores.
          example: big_rocket
        name:
          type: string
          description: Item name.
          example: Big Rocket
        groups:
          type: array
          description: Groups the item belongs to.
          example:
            - external_id: accessory
              name: Accessory
          items:
            $ref: '#/components/schemas/Catalog_inline_response_200_groups'
        attributes:
          $ref: '#/components/schemas/Catalog_client-attributes'
        type:
          type: string
          description: 'Type of item: `virtual_good`/`virtual_currency`/`bundle`.'
          example: bundle
        bundle_type:
          type: string
          description: 'Type of bundle: `standard`/`virtual_currency_package`.'
          example: virtual_currency_package
        description:
          type: string
          description: Item description.
          example: Big Rocket - description
        image_url:
          type: string
          description: Image URL.
          example: >-
            https://popmedia.blob.core.windows.net/popyourself/male/outfit/male_armor_white_a-01.png
        is_free:
          type: string
          description: If `true`, the item is free.
          example: 'false'
        price:
          $ref: '#/components/schemas/Catalog_inline_response_200_5_price'
        virtual_prices:
          type: array
          description: Virtual prices.
          items:
            $ref: '#/components/schemas/Catalog_inline_response_200_virtual_prices'
        content:
          type: array
          description: Virtual currency package content.
          example:
            - description: Big Rocket - short description
              image_url: >-
                https://popmedia.blob.core.windows.net/popyourself/male/outfit/male_armor_white_a-01.png
              sku: big_rocket
              name: Big Rocket
              type: virtual_currency
              quantity: 100
              inventory_options:
                consumable:
                  usages_count: 1
          items:
            $ref: '#/components/schemas/Catalog_inline_response_200_7_content'
    Catalog_inline_response_200_7:
      type: object
      properties:
        items:
          type: array
          example:
            - sku: vc_package_1
              name: VC Name first package
              groups: []
              attributes: []
              type: bundle
              description: VC Short Package Description
              image_url: http://vc_package_image.png
              is_free: false
              price:
                amount: '2.0000'
                amount_without_discount: '2.0000'
                currency: USD
              bundle_type: virtual_currency_package
              content:
                - description: Big Rocket - short description
                  image_url: >-
                    https://popmedia.blob.core.windows.net/popyourself/male/outfit/male_armor_white_a-01.png
                  sku: big_rocket
                  name: Big Rocket
                  type: virtual_currency
                  quantity: 100
                  inventory_options:
                    consumable:
                      usages_count: 1
              virtual_prices: []
            - sku: vc_package_3
              name: VC Name third package
              groups: []
              attributes: []
              type: bundle
              description: VC Short Package Description
              image_url: http://vc_package_image.png
              is_free: false
              price:
                amount: '4.0000'
                amount_without_discount: '4.0000'
                currency: USD
              bundle_type: virtual_currency_package
              content:
                - description: description
                  image_url: http://image.png
                  sku: shotgun_raider
                  name: SHOTGUN FOR TRUE RAIDERS
                  type: virtual_currency
                  quantity: 200
                  inventory_options:
                    consumable:
                      usages_count: 1
              virtual_prices: []
          items:
            $ref: '#/components/schemas/Catalog_inline_response_200_7_items'
      description: Object with items.
    Catalog_inline_response_200_8_virtual_prices:
      type: object
      properties:
        amount:
          type: integer
          description: Discounted item price in virtual currency.
          example: 100
        amount_without_discount:
          type: integer
          description: Item price.
          example: 200
        sku:
          type: string
          description: Virtual currency item SKU.
          example: vc_test
        is_default:
          type: boolean
          description: Whether price is default for an item.
          example: true
        image_url:
          type: string
          example: http://image.png
        name:
          type: string
          description: Virtual currency name.
          example: SHOTGUN FOR TRUE RAIDERS
        type:
          type: string
          description: Virtual currency type.
          example: virtual_currency
        description:
          type: string
          description: Virtual currency description.
          example: Big Rocket - description
      description: Virtual price.
    Catalog_inline_response_200_8_items:
      type: object
      properties:
        sku:
          type: string
          description: >-
            Unique item ID. The SKU may only contain lowercase Latin
            alphanumeric characters, periods, dashes, and underscores.
          example: big_rocket
        name:
          type: string
          description: Item name.
          example: Big Rocket
        groups:
          type: array
          description: Groups the item belongs to.
          example:
            - external_id: accessory
              name: Accessory
          items:
            $ref: '#/components/schemas/Catalog_inline_response_200_groups'
        attributes:
          $ref: '#/components/schemas/Catalog_client-attributes'
        type:
          type: string
          description: >-
            Type of item:
            `consumable`/`expiration`/`permanent`/`lootboxes`/`physical`.
          example: virtual_good
        description:
          type: string
          description: Item description.
          example: Big Rocket - description
        image_url:
          type: string
          description: Image URL.
          example: >-
            https://popmedia.blob.core.windows.net/popyourself/male/outfit/male_armor_white_a-01.png
        is_free:
          type: string
          description: If `true`, the item is free.
          example: 'false'
        price:
          $ref: '#/components/schemas/Catalog_inline_response_200_5_price'
        virtual_prices:
          type: array
          description: Virtual prices.
          items:
            $ref: '#/components/schemas/Catalog_inline_response_200_8_virtual_prices'
        inventory_options:
          $ref: '#/components/schemas/Catalog_inline_response_200_7_inventory_options'
        virtual_item_type:
          type: string
          description: Type of virtual item.
          example: non_consumable
          enum:
            - consumable
            - non_consumable
            - non_renewing_subscription
    Catalog_inline_response_200_8:
      type: object
      properties:
        items:
          type: array
          example:
            - sku: big_rocket
              name: Big Rocket
              groups:
                - external_id: accessory
                  name: Accessory
              attributes:
                - external_id: stack_size
                  name: Stack size
                  values:
                    - value: '5'
              type: virtual_good
              description: Big Rocket - description
              image_url: >-
                https://popmedia.blob.core.windows.net/popyourself/male/outfit/male_armor_white_a-01.png
              is_free: false
              price:
                amount: '100.99'
                amount_without_discount: '100.99'
                currency: USD
              virtual_prices:
                - amount: 100
                  sku: vc_test
                  is_default: true
                  amount_without_discount: 100
                  image_url: http://image.png
                  name: SHOTGUN FOR TRUE RAIDERS
                  type: virtual_currency
                  description: description
              inventory_options:
                consumable:
                  usages_count: 1
                expiration_period:
                  type: day
                  value: 1
              virtual_item_type: non_renewing_subscription
            - sku: shotgun_raider
              name: SHOTGUN FOR TRUE RAIDERS
              groups:
                - external_id: accessory
                  name: Accessory
              attributes:
                - external_id: stack_size
                  name: Stack size
                  values:
                    - value: '5'
                - external_id: rating
                  name: Rating
                  values:
                    - value: '3.9'
                - external_id: genre
                  name: Genre
                  values:
                    - value: Strategy
                    - value: Tactical
                    - Turn-based
              type: virtual_good
              description: description
              image_url: http://image.png
              is_free: false
              price:
                amount: '101.0'
                amount_without_discount: '101.0'
                currency: USD
              virtual_prices:
                - amount: 100
                  sku: vc_test
                  is_default: true
                  amount_without_discount: 100
                  image_url: http://image.png
                  name: SHOTGUN FOR TRUE RAIDERS
                  type: virtual_currency
                  description: description
                - amount: 200
                  sku: vc_test_2
                  is_default: false
                  amount_without_discount: 200
                  image_url: http://image.png
                  name: SHOTGUN FOR TRUE RAIDERS
                  type: virtual_currency
                  description: description
              inventory_options:
                consumable:
                  usages_count: 1
                expiration_period:
                  type: day
                  value: 1
              virtual_item_type: non_renewing_subscription
          items:
            $ref: '#/components/schemas/Catalog_inline_response_200_8_items'
    Catalog_inline_response_404_2:
      type: object
      properties:
        statusCode:
          type: integer
          example: 404
        errorCode:
          type: integer
          example: 4403
        errorMessage:
          type: string
          example: '[0401-4403]: Item group not found'
    Catalog_inline_response_200_9_children:
      type: object
      properties:
        external_id:
          type: string
          description: External group ID.
          example: accessory
        name:
          type: string
          description: Group name.
          example: Accessory
        description:
          type: string
          description: Group description.
          example: Accessory
        image_url:
          type: string
          description: Image URL.
        order:
          type: integer
          description: Defines arrangement order.
          example: 1
        level:
          type: integer
          description: Group nesting level.
          example: 2
        children:
          type: array
          description: Child groups.
          example: []
          items:
            type: string
        parent_external_id:
          type: string
          description: Parent external group ID.
          example: background
    Catalog_inline_response_200_9_children_1:
      type: object
      properties:
        external_id:
          type: string
          description: External group ID.
          example: background
        name:
          type: string
          description: Group name.
          example: Background
        description:
          type: string
          description: Group description.
          example: Background description
        image_url:
          type: string
          description: Group image URL.
        order:
          type: integer
          description: Defines arrangement order.
          example: 1
        level:
          type: integer
          description: Group nesting level.
          example: 1
        children:
          type: array
          description: Child groups.
          example:
            - external_id: accessory
              name: Accessory
              description: Accessory
              order: 1
              level: 2
              children: []
              parent_external_id: background
          items:
            $ref: '#/components/schemas/Catalog_inline_response_200_9_children'
        parent_external_id:
          type: string
          description: Parent external group ID.
          example: hair
    Catalog_inline_response_200_9_groups:
      type: object
      properties:
        external_id:
          type: string
          description: External group ID.
          example: hair
        name:
          type: string
          description: Group name.
          example: Hair
        description:
          type: string
          description: Group description.
          example: Hair description
        image_url:
          type: string
          description: Image URL.
        order:
          type: integer
          description: Defines arrangement order.
          example: 1
        level:
          type: integer
          description: Group nesting level.
          example: 0
        children:
          type: array
          description: Child groups.
          example:
            - external_id: background
              name: Background
              description: Background description
              order: 1
              level: 1
              children:
                - external_id: accessory
                  name: Accessory
                  description: Accessory
                  order: 1
                  level: 2
                  children: []
                  parent_external_id: background
              parent_external_id: hair
          items:
            $ref: '#/components/schemas/Catalog_inline_response_200_9_children_1'
        parent_external_id:
          type: string
          description: Parent external group ID.
    Catalog_inline_response_200_9:
      type: object
      properties:
        groups:
          type: array
          example:
            - external_id: hair
              name: Hair
              description: Hair description
              order: 1
              level: 0
              children:
                - external_id: background
                  name: Background
                  description: Background description
                  order: 1
                  level: 1
                  children:
                    - external_id: accessory
                      name: Accessory
                      description: Accessory
                      order: 1
                      level: 2
                      children: []
                      parent_external_id: background
                  parent_external_id: hair
            - external_id: group_external_id
              name: Super
              description: Super description
              order: 1
              level: 0
              children: []
          items:
            $ref: '#/components/schemas/Catalog_inline_response_200_9_groups'
    Catalog_sku:
      type: string
      description: >-
        Unique item ID. The SKU may only contain lowercase Latin alphanumeric
        characters, periods, dashes, and underscores.
      example: bundle_1
    Catalog_client_name:
      type: string
      description: Item name.
      example: Big Rocket
    Catalog_groups_response_inner:
      type: object
      properties:
        external_id:
          type: string
          example: horror
        name:
          type: object
          example:
            en: Horror
    Catalog_groups_response:
      type: array
      description: Groups the item belongs to.
      example:
        - external_id: horror
          name:
            en: Horror
      items:
        $ref: '#/components/schemas/Catalog_groups_response_inner'
      default: []
    Catalog_client_description:
      type: string
      description: Item description.
      nullable: true
      example: Big Rocket - description.
    Catalog_type:
      type: string
      description: Type of item.
      example: bundle
    Catalog_bundle_type:
      type: string
      description: Type of bundle. In this case, it is always `standart`.
      example: standart
    Catalog_image_url:
      type: string
      description: Image URL.
      nullable: true
      example: https://image.example.com
    Catalog_is_free:
      type: string
      description: Always `false`.
      example: 'false'
      default: 'false'
    Catalog_amount:
      pattern: ^\d*\.?\d*$
      type: string
      description: Item price with a discount.
      example: '100.99'
    Catalog_amount_without_discount:
      pattern: ^\d*\.?\d*$
      type: string
      description: Item price.
      example: '100.99'
    Catalog_currency:
      type: string
      description: >-
        Purchase currency. Three-letter code per [ISO
        4217](https://en.wikipedia.org/wiki/ISO_4217).
      example: USD
    Catalog_price:
      required:
        - amount
        - amount_without_discount
        - currency
      type: object
      properties:
        amount:
          $ref: '#/components/schemas/Catalog_amount'
        amount_without_discount:
          $ref: '#/components/schemas/Catalog_amount_without_discount'
        currency:
          $ref: '#/components/schemas/Catalog_currency'
      description: Item price.
      nullable: true
    Catalog_total_content_price:
      type: object
      properties:
        amount:
          type: string
          description: Sum of the bundle content prices with a discount.
          example: '100.99'
        amount_without_discount:
          type: string
          description: Sum of the bundle content prices.
          example: '100.99'
        currency:
          $ref: '#/components/schemas/Catalog_currency'
      description: Sum of the bundle content prices.
      nullable: true
    Catalog_virtual_prices_inner:
      type: object
      properties:
        amount:
          type: integer
          description: Item price in virtual currency with a discount.
          example: 100
        amount_without_discount:
          type: integer
          description: Item price in virtual currency.
          example: 200
        sku:
          type: string
          description: Virtual currency item SKU.
          example: gold
        is_default:
          type: boolean
          description: Whether the price is default for an item.
          example: true
        image_url:
          type: string
          description: Image of virtual currency.
          nullable: true
          example: http://image.png
        name:
          type: string
          description: Virtual currency name.
          example: Gold
        type:
          type: string
          description: Virtual currency type.
          example: virtual_currency
        description:
          type: string
          description: Virtual currency description.
          nullable: true
          example: Most popular gold
      description: Virtual price.
    Catalog_virtual_prices:
      type: array
      description: Virtual prices.
      items:
        $ref: '#/components/schemas/Catalog_virtual_prices_inner'
    Catalog_client_content_inner:
      type: object
      properties:
        sku:
          type: string
          description: >-
            Unique item ID. The SKU may only contain lowercase Latin
            alphanumeric characters, dashes, and underscores.
          example: big_rocket
        name:
          type: string
          description: Item name.
          example: Big Rocket
        type:
          type: string
          description: 'Type of item: `virtual_good`/`virtual_currency`/`bundle`.'
          example: virtual_currency
        description:
          type: string
          description: Item description.
          example: Big Rocket - description
        image_url:
          type: string
          description: Image URL.
          example: >-
            https://popmedia.blob.core.windows.net/popyourself/male/outfit/male_armor_white_a-01.png
        quantity:
          type: integer
          description: Quantity of item in a package.
          example: 250
        price:
          type: object
          properties:
            amount:
              type: string
              description: Item price with a discount.
              example: '100.99'
            amount_without_discount:
              type: string
              description: Item price.
              example: '100.99'
            currency:
              type: string
              description: >-
                Default purchase currency. Three-letter code per [ISO
                4217](https://en.wikipedia.org/wiki/ISO_4217).
              example: USD
          description: Item prices.
          nullable: true
        virtual_prices:
          type: array
          description: Virtual prices.
          items:
            type: object
            properties:
              amount:
                type: integer
                description: Item price in virtual currency with a discount.
                example: 100
              amount_without_discount:
                type: integer
                description: Item price.
                example: 200
              sku:
                type: string
                description: Virtual currency item SKU.
                example: vc_test
              is_default:
                type: boolean
                description: Whether the price is default for an item.
                example: true
              image_url:
                type: string
                description: Image of virtual currency.
                example: http://image.png
              name:
                type: string
                description: Virtual currency name.
                example: SHOTGUN FOR TRUE RAIDERS
              type:
                type: string
                description: Virtual currency type.
                example: virtual_currency
              description:
                type: string
                description: Virtual currency description.
                example: Big Rocket - description
            description: Virtual price.
      description: Item in a package.
    Catalog_client_content:
      type: array
      description: Bundle package content.
      example:
        - description: Big Rocket - short description.
          image_url: >-
            https://popmedia.blob.core.windows.net/popyourself/male/outfit/male_armor_white_a-01.png
          sku: big_rocket
          name: Big Rocket
          type: virtual_currency
          quantity: 100
          attributes: []
          is_free: false
          groups: []
          price:
            amount: 10.99
            currency: USD
            amount_without_discount: 10.99
      items:
        $ref: '#/components/schemas/Catalog_client_content_inner'
    Catalog_client_bundle:
      type: object
      properties:
        sku:
          $ref: '#/components/schemas/Catalog_sku'
        name:
          $ref: '#/components/schemas/Catalog_client_name'
        groups:
          $ref: '#/components/schemas/Catalog_groups_response'
        description:
          $ref: '#/components/schemas/Catalog_client_description'
        attributes:
          $ref: '#/components/schemas/Catalog_client-attributes-common'
        type:
          $ref: '#/components/schemas/Catalog_type'
        bundle_type:
          $ref: '#/components/schemas/Catalog_bundle_type'
        image_url:
          $ref: '#/components/schemas/Catalog_image_url'
        is_free:
          $ref: '#/components/schemas/Catalog_is_free'
        price:
          $ref: '#/components/schemas/Catalog_price'
        total_content_price:
          $ref: '#/components/schemas/Catalog_total_content_price'
        virtual_prices:
          $ref: '#/components/schemas/Catalog_virtual_prices'
        content:
          $ref: '#/components/schemas/Catalog_client_content'
      description: The specified bundle.
    Catalog_inline_response_200_10:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/Catalog_client_bundle'
      description: Object with items.
    email-required:
      required:
        - email
      properties:
        id:
          type: string
          nullable: true
          description: Unique user identifier in the game.
          example: public_id
        email:
          type: string
          description: >-
            The user's email address where he can receive the purchased game
            key.
          example: public_email@test.com
        ip:
          type: string
          nullable: true
          description: The user's IP address.
          example: 127.0.0.1
        phone:
          type: string
          nullable: true
          description: The user's phone number.
          example: +66-000-000-00-00
        name:
          type: string
          nullable: true
          description: The user's public name.
          example: Public name
        country:
          type: string
          nullable: true
          description: >-
            Two-letter uppercase country code per [ISO 3166-1
            alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2).
          example: US
    Common_inline_response_200_1:
      type: object
      properties:
        token:
          type: string
          description: User token.
    Order_inline_response_200_billing_info_price:
      type: object
      properties:
        amount:
          type: number
          example: 1480.45
        currency:
          maxLength: 3
          minLength: 3
          type: string
          description: >-
            Purchase currency. Three-letter code per [ISO
            4217](https://en.wikipedia.org/wiki/ISO_4217).
          example: USD
    Order_inline_response_200_billing_info_indirect_tax:
      type: object
      properties:
        name:
          type: string
          example: VAT
        amount:
          type: number
          example: 246.75
        rate:
          type: number
          example: 20
    Order_inline_response_200_billing_info_direct_tax:
      type: object
      properties:
        name:
          type: string
          example: TAX
        amount:
          type: number
          example: 150
        rate:
          type: number
          example: 10
    Order_inline_response_200_billing_info:
      type: object
      properties:
        price:
          $ref: '#/components/schemas/Order_inline_response_200_billing_info_price'
        indirect_tax:
          type: array
          items:
            $ref: >-
              #/components/schemas/Order_inline_response_200_billing_info_indirect_tax
        direct_tax:
          type: array
          items:
            $ref: >-
              #/components/schemas/Order_inline_response_200_billing_info_direct_tax
      description: Billing information.
    Order_inline_response_200:
      type: object
      properties:
        order_id:
          type: integer
          description: Order ID.
        billing_info:
          $ref: '#/components/schemas/Order_inline_response_200_billing_info'
    Order_inline_response_422:
      type: object
      properties:
        errorCode:
          type: integer
          example: 1401
        statusCode:
          type: integer
          example: 422
        errorMessage:
          type: string
          example: '[0401-1401]: Invalid cart'
    Order_inline_response_422_1:
      type: object
      properties:
        errorCode:
          type: integer
          example: 1411
        statusCode:
          type: integer
          example: 422
        errorMessage:
          type: string
          example: '[0401-1411]: Invalid item'
    Order_inline_response_200_1_content_price:
      type: object
      properties:
        amount:
          type: string
          description: Order discount price.
          example: '30'
        amount_without_discount:
          type: string
          description: Order price.
          example: '30'
        currency:
          type: string
          description: >-
            Default purchase currency. Three-letter code per [ISO
            4217](https://en.wikipedia.org/wiki/ISO_4217).
          example: USD
      description: Order price.
    Order_inline_response_200_1_content_virtual_price:
      type: object
      properties:
        amount:
          type: string
          description: Order discount price.
          example: '100'
        amount_without_discount:
          type: string
          description: Order price.
          example: '150'
        currency:
          type: string
          description: Virtual currency SKU used in order.
          example: test_vc
      description: Order price in virtual currency.
    Order_inline_response_200_1_content_price_1:
      type: object
      properties:
        amount:
          type: string
          description: Discounted item price.
          example: '30'
        amount_without_discount:
          type: string
          description: Item price.
          example: '30'
        currency:
          type: string
          description: >-
            Default purchase currency. Three-letter code per [ISO
            4217](https://en.wikipedia.org/wiki/ISO_4217).
          example: USD
      description: Item price.
    Order_inline_response_200_1_content_items:
      type: object
      properties:
        sku:
          type: string
          description: >-
            Unique item ID. The SKU may only contain lowercase Latin
            alphanumeric characters, periods, dashes, and underscores.
          example: some_sku
        quantity:
          type: integer
          description: Item quantity.
          example: 1
        is_free:
          type: string
          description: If `true`, the item is free.
          example: 'false'
        price:
          $ref: '#/components/schemas/Order_inline_response_200_1_content_price_1'
    Order_inline_response_200_1_content:
      type: object
      properties:
        price:
          $ref: '#/components/schemas/Order_inline_response_200_1_content_price'
        virtual_price:
          $ref: >-
            #/components/schemas/Order_inline_response_200_1_content_virtual_price
        is_free:
          type: string
          description: If `true`, the order is free.
          example: 'false'
        items:
          type: array
          description: Items list.
          example:
            - sku: some_sku
              quantity: 1
              is_free: false
              price:
                amount: '30'
                amount_without_discount: '30'
                currency: USD
          items:
            $ref: '#/components/schemas/Order_inline_response_200_1_content_items'
      description: Order details.
    Order_inline_response_200_1:
      type: object
      properties:
        order_id:
          type: integer
          description: Order ID.
          example: 1
        status:
          type: string
          description: 'Order status: `new`/`paid`/`done`/`canceled`.'
          example: paid
        content:
          $ref: '#/components/schemas/Order_inline_response_200_1_content'
    Order_inline_response_404:
      type: object
      properties:
        statusCode:
          type: integer
          example: 404
        errorCode:
          type: integer
          example: 9001
        errorMessage:
          type: string
          example: '[0401-9001]: Order not found'
  requestBodies:
    fill-cart-json-model:
      content:
        application/json:
          schema:
            required:
              - items
            type: object
            properties:
              currency:
                $ref: '#/components/schemas/Cart-Payment_settings_currency'
              items:
                type: array
                description: List of items.
                items:
                  minItems: 1
                  required:
                    - quantity
                    - sku
                  type: object
                  properties:
                    sku:
                      type: string
                      default: booster_mega_1
                    quantity:
                      type: number
                      default: 123
            example:
              - sku: booster_mega_1
                quantity: 123
    put-item-by-cart-id-json-model:
      content:
        application/json:
          schema:
            type: object
            properties:
              currency:
                $ref: '#/components/schemas/Cart-Payment_settings_currency'
              quantity:
                type: number
                description: Item quantity.
                default: 123
    post-user-token-json-model:
      content:
        application/json:
          schema:
            required:
              - user
            type: object
            properties:
              user:
                type: object
                description: User details.
                $ref: '#/components/schemas/email-required'
    create-order-model:
      description: Object with order creation data.
      content:
        application/json:
          schema:
            required:
              - geotype
              - currency
            type: object
            properties:
              geotype:
                type: number
                description: Distributor partner ID on the Xsolla's side.
              currency:
                $ref: '#/components/schemas/Cart-Payment_settings_currency'
              quantity:
                type: integer
                description: Item quantity.
                example: 1
            example:
              geotype: 13038
      required: true
  examples:
    200-get-bundle-list:
      value:
        items:
          - sku: kg_1
            name: kg_10.00_bundle
            type: bundle
            description: pricePoint_44056_1
            attributes:
              external_id: genre
              name: Genre
              values:
                - external_id: genre_e3364991f92e751689a68b96598a5a5a84010b85
                  value: Casual
                - external_id: genre_eba07bfd0f982940773cba3744d97264dd58acd7
                  value: Strategy
                - external_id: genre_b8d0c6d8f0524c2b2d79ebb93aa3cd0e8b5199a8
                  value: Mobile
            is_free: false
            order: 999
            groups: []
            price:
              amount: 9.99
              currency: USD
              amount_without_discount: 9.99
            total_content_price:
              amount: 10.99
              currency: USD
              amount_without_discount: 10.99
            media_list: []
            virtual_prices: []
            bundle_type: standard
            content:
              - sku: big_rocket
                name: Big Rocket
                description: Big Rocket - short description.
                image_url: >-
                  https://popmedia.blob.core.windows.net/popyourself/male/outfit/male_armor_white_a-01.png
                type: virtual_currency
                quantity: 100
                virtual_item_type: non_consumable
                attributes:
                  external_id: size
                  name: Size
                  values:
                    - external_id: size_e3364991f92e751689a68b96598a5a5a84010b85
                      value: Large
                is_free: false
                groups: []
                price:
                  amount: 10.99
                  currency: USD
                  amount_without_discount: 10.99
                virtual_prices: []
    200-get-bundle:
      value:
        sku: kg_1
        name: kg_10.00_bundle
        type: bundle
        description: pricePoint_44056_1.
        attributes: []
        is_free: false
        order: 999
        groups: []
        price:
          amount: 9.99
          currency: USD
          amount_without_discount: 9.99
        total_content_amount:
          amount: 10.99
          currency: USD
          amount_without_discount: 10.99
        media_list: []
        virtual_prices: []
        bundle_type: standard
        content:
          - description: Big Rocket - short description.
            image_url: >-
              https://popmedia.blob.core.windows.net/popyourself/male/outfit/male_armor_white_a-01.png
            sku: big_rocket
            name: Big Rocket
            type: virtual_currency
            quantity: 100
            attributes: []
            is_free: false
            groups: []
            price:
              amount: 10.99
              currency: USD
              amount_without_discount: 10.99
            virtual_prices: []
x-tagGroups:
  - name: Cart
    tags:
      - cart
  - name: Catalog
    tags:
      - game keys
      - virtual items & currency
      - bundles
  - name: Common
    tags:
      - user token
  - name: Notifications
    tags:
      - notifications
  - name: Order
    tags:
      - order
