shop

Functions to use the Xsolla Shop Builder API.

Version: stable

FUNCTIONS
shop.cancel()
shop.cancellation_token()
shop.set_bearer_token()
shop.set_username_password()
shop.set_merchant_auth()
shop.set_auth_for_cart()
shop.sync()
shop.get_bundle_list()
shop.get_bundle()
shop.get_bundle_list_in_group()
shop.get_cart_by_id()
shop.get_user_cart()
shop.cart_clear_by_id()
shop.cart_clear()
shop.cart_fill()
shop.cart_fill_by_id()
shop.put_item_by_cart_id()
shop.delete_item_by_cart_id()
shop.put_item()
shop.delete_item()
shop.create_order_by_cart_id()
shop.create_order()
shop.create_order_with_item()
shop.create_free_order()
shop.create_free_order_by_cart_id()
shop.create_free_order_with_item()
shop.get_order()
shop.get_upsell_for_project_client()
shop.get_games_list()
shop.get_games_group()
shop.get_game_by_sku()
shop.get_game_key_by_sku()
shop.get_game_keys_group()
shop.get_drm_list()
shop.get_user_games()
shop.redeem_game_pin_code()
shop.redeem_coupon()
shop.get_coupon_rewards_by_code()
shop.redeem_promo_code()
shop.remove_cart_promo_code()
shop.get_promo_code_rewards_by_code()
shop.verify_promotion_code()
shop.get_virtual_items()
shop.get_virtual_items_sku()
shop.get_all_virtual_items()
shop.get_virtual_currency()
shop.get_virtual_currency_sku()
shop.get_virtual_currency_package()
shop.get_virtual_currency_package_sku()
shop.get_virtual_items_group()
shop.get_item_groups()
shop.create_order_with_item_for_virtual_currency()
shop.get_sellable_items()
shop.get_sellable_item_by_id()
shop.get_sellable_item_by_sku()
shop.get_sellable_items_group()
shop.get_reward_chains_list()
shop.get_user_reward_chain_balance()
shop.claim_user_reward_chain_step_reward()
shop.get_user_clan_top_contributors()
shop.user_clan_update()

Functions

shop.cancel()

shop.cancel(token)

Cancel a cancellation token

PARAMETERS

token table The cancellation token

shop.cancellation_token()

shop.cancellation_token()

Create a cancellation token

PARAMETERS

None

RETURNS

table A cancellation token

shop.set_bearer_token()

shop.set_bearer_token(token)

Set a bearer token

PARAMETERS

token string The bearer token

shop.set_username_password()

shop.set_username_password(username,password)

Set a username and password for basic authentication

PARAMETERS

username string The username
password string The password

shop.set_merchant_auth()

shop.set_merchant_auth(merchant_id,api_key)

Set merchant id and api key for use with 'basicMerchantAuth' authentication

PARAMETERS

merchant_id string The merchant id
api_key string The API key

shop.set_auth_for_cart()

shop.set_auth_for_cart(authorization_id,user)

Set authorization when using 'AuthForCart' authentication

PARAMETERS

authorization_id string Unique authorization id
user string The user email

shop.sync()

shop.sync(fn,cancellation_token)

Run code within a coroutine.

PARAMETERS

fn function The function to run
cancellation_token table Optional cancellation token

shop.get_bundle_list()

shop.get_bundle_list(project_id (REQUIRED),limit,offset,locale,additional_fields,country,promo_code,show_inactive_time_limited_items,callback,retry_policy,cancellation_token)

Get list of bundles

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
limit integer Limit for the number of elements on the page.
offset integer Number of the element from which the list is generated (the count starts from 0).
locale string Response language. Two-letter lowercase language code per ISO 639-1.
additional_fields array The list of additional fields. These fields will be in the response if you send them in your request.
country string Two-letter uppercase country code per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Check the documentation for detailed information about [countries supported by Xsolla](https://developers.xsolla.com/doc/shop-builder/references/supported-countries/) and [the process of determining the country](https://developers.xsolla.com/doc/shop-builder/features/pricing-policy/#pricing_policy_country_determination).
promo_code string Unique case sensitive code. Contains letters and numbers.
show_inactive_time_limited_items integer Shows time-limited items that are not available to the user. The validity period of such items has not started or has already expired.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.get_bundle()

shop.get_bundle(project_id (REQUIRED),sku (REQUIRED),promo_code,show_inactive_time_limited_items,callback,retry_policy,cancellation_token)

Get specified bundle

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
sku (REQUIRED) string Bundle SKU.
promo_code string Unique case sensitive code. Contains letters and numbers.
show_inactive_time_limited_items integer Shows time-limited items that are not available to the user. The validity period of such items has not started or has already expired.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.get_bundle_list_in_group()

shop.get_bundle_list_in_group(project_id (REQUIRED),external_id (REQUIRED),limit,offset,locale,additional_fields,country,promo_code,show_inactive_time_limited_items,callback,retry_policy,cancellation_token)

Get list of bundles by specified group

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
external_id (REQUIRED) string Group external ID.
limit integer Limit for the number of elements on the page.
offset integer Number of the element from which the list is generated (the count starts from 0).
locale string Response language. Two-letter lowercase language code per ISO 639-1.
additional_fields array The list of additional fields. These fields will be in the response if you send them in your request.
country string Two-letter uppercase country code per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Check the documentation for detailed information about [countries supported by Xsolla](https://developers.xsolla.com/doc/shop-builder/references/supported-countries/) and [the process of determining the country](https://developers.xsolla.com/doc/shop-builder/features/pricing-policy/#pricing_policy_country_determination).
promo_code string Unique case sensitive code. Contains letters and numbers.
show_inactive_time_limited_items integer Shows time-limited items that are not available to the user. The validity period of such items has not started or has already expired.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.get_cart_by_id()

shop.get_cart_by_id(project_id (REQUIRED),cart_id (REQUIRED),currency,locale,callback,retry_policy,cancellation_token)

Get cart by cart ID

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
cart_id (REQUIRED) string Cart ID.
currency string The item price currency displayed in the cart. Three-letter currency code per [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). Check the documentation for detailed information about [currencies supported by Xsolla](https://developers.xsolla.com/doc/pay-station/references/supported-currencies/).
locale string Response language. Two-letter lowercase language code per ISO 639-1.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.get_user_cart()

shop.get_user_cart(project_id (REQUIRED),currency,locale,callback,retry_policy,cancellation_token)

Get current user's cart

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
currency string The item price currency displayed in the cart. Three-letter currency code per [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). Check the documentation for detailed information about [currencies supported by Xsolla](https://developers.xsolla.com/doc/pay-station/references/supported-currencies/).
locale string Response language. Two-letter lowercase language code per ISO 639-1.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.cart_clear_by_id()

shop.cart_clear_by_id(project_id (REQUIRED),cart_id (REQUIRED),callback,retry_policy,cancellation_token)

Delete all cart items by cart ID

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
cart_id (REQUIRED) string Cart ID.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.cart_clear()

shop.cart_clear(project_id (REQUIRED),callback,retry_policy,cancellation_token)

Delete all cart items from current cart

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.cart_fill()

shop.cart_fill(project_id (REQUIRED),body,callback,retry_policy,cancellation_token)

Fill cart with items

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
body table
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

EXAMPLES

{
  items = 
  {
    {
      sku = "com.xsolla.booster_mega_1",
      quantity = 123,
    },
  },
}

shop.cart_fill_by_id()

shop.cart_fill_by_id(project_id (REQUIRED),cart_id (REQUIRED),body,callback,retry_policy,cancellation_token)

Fill specific cart with items

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
cart_id (REQUIRED) string Cart ID.
body table
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

EXAMPLES

{
  items = 
  {
    {
      sku = "com.xsolla.booster_mega_1",
      quantity = 123,
    },
  },
}

shop.put_item_by_cart_id()

shop.put_item_by_cart_id(project_id (REQUIRED),cart_id (REQUIRED),item_sku (REQUIRED),body,callback,retry_policy,cancellation_token)

Update cart item by cart ID

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
cart_id (REQUIRED) string Cart ID.
item_sku (REQUIRED) string Item SKU.
body table
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

EXAMPLES

{
  quantity = 123.456,
}

shop.delete_item_by_cart_id()

shop.delete_item_by_cart_id(project_id (REQUIRED),cart_id (REQUIRED),item_sku (REQUIRED),callback,retry_policy,cancellation_token)

Delete cart item by cart ID

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
cart_id (REQUIRED) string Cart ID.
item_sku (REQUIRED) string Item SKU.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.put_item()

shop.put_item(project_id (REQUIRED),item_sku (REQUIRED),body,callback,retry_policy,cancellation_token)

Update cart item from current cart

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
item_sku (REQUIRED) string Item SKU.
body table
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

EXAMPLES

{
  quantity = 123.456,
}

shop.delete_item()

shop.delete_item(project_id (REQUIRED),item_sku (REQUIRED),callback,retry_policy,cancellation_token)

Delete cart item from current cart

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
item_sku (REQUIRED) string Item SKU.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.create_order_by_cart_id()

shop.create_order_by_cart_id(project_id (REQUIRED),cart_id (REQUIRED),body,callback,retry_policy,cancellation_token)

Create order with all items from particular cart

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
cart_id (REQUIRED) string Cart ID.
body table
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

EXAMPLES

{
  currency = "Order price currency. Three-letter currency code per [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). Check the documentation for detailed information about [currencies supported by Xsolla](https://developers.xsolla.com/doc/pay-station/references/supported-currencies/).",
  locale = "Response language.",
  sandbox = true,
  settings = 
  {
    cart_payment_settings_ui = 
    {
      theme = "Payment UI theme. Can be `63295a9a2e47fab76f7708e1` for the light theme (default) or `63295aab2e47fab76f7708e3` for the dark theme. You can also [create a custom theme](https://developers.xsolla.com/doc/pay-station/features/ui-theme-customization/#pay_station_ui_theme_customization_in_token) and pass its ID in this parameter.",
      desktop = 
      {
        header = 
        {
          is_visible = true,
          visible_logo = true,
          visible_name = true,
          visible_purchase = true,
          type = "How to show the header. Can be `compact` (hides project name and user ID) or `normal` (default).",
          close_button = true,
        },
      },
      mode = "Interface mode in payment UI. Can be `user_account` only. The header contains only the account navigation menu, and the user cannot select a product or make a payment. This mode is only available on the desktop.",
      user_account = 
      {
        payment_accounts = 
        {
          enable = true,
        },
        info = 
        {
          enable = true,
          order = 123,
        },
        subscriptions = 
        {
          enable = true,
          order = 123,
        },
      },
      header = 
      {
        visible_virtual_currency_balance = true,
      },
      mobile = 
      {
        header = 
        {
          close_button = true,
        },
      },
      is_prevent_external_link_open = true,
      is_payment_methods_list_mode = true,
      is_independent_windows = true,
      currency_format = "Set to `code` to display a three-letter [ISO 4217](https://developers.xsolla.com/doc/pay-station/references/supported-currencies/) currency code in the payment UI. The currency symbol is displayed instead of the three-letter currency code by default.",
      is_show_close_widget_warning = true,
      layout = "Location of the main elements of the payment UI. You can open the payment UI inside your game and/or swap the columns with information about an order and payment methods. Refer to the [customization instructions](https://developers.xsolla.com/doc/pay-station/features/ui-theme-customization/#pay_station_ui_theme_customization_layout) for detailed information.",
      is_three_ds_independent_windows = true,
      is_cart_open_by_default = true,
    },
    cart_payment_settings_payment_method = 123,
    cart_payment_settings_return_url = "Page to redirect the user to after payment. Parameters `user_id`, `foreigninvoice`, `invoice_id` and `status` will be automatically added to the link.",
    cart_payment_redirect_policy = 
    {
      redirect_conditions = "none",
      delay = 0,
      status_for_manual_redirection = "none",
      redirect_button_caption = "Text button",
    },
  },
  custom_parameters = 
  {
  },
}

shop.create_order()

shop.create_order(project_id (REQUIRED),body,callback,retry_policy,cancellation_token)

Create order with all items from current cart

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
body table
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

EXAMPLES

{
  currency = "Order price currency. Three-letter currency code per [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). Check the documentation for detailed information about [currencies supported by Xsolla](https://developers.xsolla.com/doc/pay-station/references/supported-currencies/).",
  locale = "Response language.",
  sandbox = true,
  settings = 
  {
    cart_payment_settings_ui = 
    {
      theme = "Payment UI theme. Can be `63295a9a2e47fab76f7708e1` for the light theme (default) or `63295aab2e47fab76f7708e3` for the dark theme. You can also [create a custom theme](https://developers.xsolla.com/doc/pay-station/features/ui-theme-customization/#pay_station_ui_theme_customization_in_token) and pass its ID in this parameter.",
      desktop = 
      {
        header = 
        {
          is_visible = true,
          visible_logo = true,
          visible_name = true,
          visible_purchase = true,
          type = "How to show the header. Can be `compact` (hides project name and user ID) or `normal` (default).",
          close_button = true,
        },
      },
      mode = "Interface mode in payment UI. Can be `user_account` only. The header contains only the account navigation menu, and the user cannot select a product or make a payment. This mode is only available on the desktop.",
      user_account = 
      {
        payment_accounts = 
        {
          enable = true,
        },
        info = 
        {
          enable = true,
          order = 123,
        },
        subscriptions = 
        {
          enable = true,
          order = 123,
        },
      },
      header = 
      {
        visible_virtual_currency_balance = true,
      },
      mobile = 
      {
        header = 
        {
          close_button = true,
        },
      },
      is_prevent_external_link_open = true,
      is_payment_methods_list_mode = true,
      is_independent_windows = true,
      currency_format = "Set to `code` to display a three-letter [ISO 4217](https://developers.xsolla.com/doc/pay-station/references/supported-currencies/) currency code in the payment UI. The currency symbol is displayed instead of the three-letter currency code by default.",
      is_show_close_widget_warning = true,
      layout = "Location of the main elements of the payment UI. You can open the payment UI inside your game and/or swap the columns with information about an order and payment methods. Refer to the [customization instructions](https://developers.xsolla.com/doc/pay-station/features/ui-theme-customization/#pay_station_ui_theme_customization_layout) for detailed information.",
      is_three_ds_independent_windows = true,
      is_cart_open_by_default = true,
    },
    cart_payment_settings_payment_method = 123,
    cart_payment_settings_return_url = "Page to redirect the user to after payment. Parameters `user_id`, `foreigninvoice`, `invoice_id` and `status` will be automatically added to the link.",
    cart_payment_redirect_policy = 
    {
      redirect_conditions = "none",
      delay = 0,
      status_for_manual_redirection = "none",
      redirect_button_caption = "Text button",
    },
  },
  custom_parameters = 
  {
  },
}

shop.create_order_with_item()

shop.create_order_with_item(project_id (REQUIRED),item_sku (REQUIRED),body,callback,retry_policy,cancellation_token)

Create order with specified item

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
item_sku (REQUIRED) string Item SKU.
body table
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

EXAMPLES

{
  currency = "Order price currency. Three-letter currency code per [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). Check the documentation for detailed information about [currencies supported by Xsolla](https://developers.xsolla.com/doc/pay-station/references/supported-currencies/).",
  locale = "Response language.",
  sandbox = true,
  quantity = 123,
  promo_code = "Redeems a code of a promo code promotion with payment.",
  settings = 
  {
    cart_payment_settings_ui = 
    {
      theme = "Payment UI theme. Can be `63295a9a2e47fab76f7708e1` for the light theme (default) or `63295aab2e47fab76f7708e3` for the dark theme. You can also [create a custom theme](https://developers.xsolla.com/doc/pay-station/features/ui-theme-customization/#pay_station_ui_theme_customization_in_token) and pass its ID in this parameter.",
      desktop = 
      {
        header = 
        {
          is_visible = true,
          visible_logo = true,
          visible_name = true,
          visible_purchase = true,
          type = "How to show the header. Can be `compact` (hides project name and user ID) or `normal` (default).",
          close_button = true,
        },
      },
      mode = "Interface mode in payment UI. Can be `user_account` only. The header contains only the account navigation menu, and the user cannot select a product or make a payment. This mode is only available on the desktop.",
      user_account = 
      {
        payment_accounts = 
        {
          enable = true,
        },
        info = 
        {
          enable = true,
          order = 123,
        },
        subscriptions = 
        {
          enable = true,
          order = 123,
        },
      },
      header = 
      {
        visible_virtual_currency_balance = true,
      },
      mobile = 
      {
        header = 
        {
          close_button = true,
        },
      },
      is_prevent_external_link_open = true,
      is_payment_methods_list_mode = true,
      is_independent_windows = true,
      currency_format = "Set to `code` to display a three-letter [ISO 4217](https://developers.xsolla.com/doc/pay-station/references/supported-currencies/) currency code in the payment UI. The currency symbol is displayed instead of the three-letter currency code by default.",
      is_show_close_widget_warning = true,
      layout = "Location of the main elements of the payment UI. You can open the payment UI inside your game and/or swap the columns with information about an order and payment methods. Refer to the [customization instructions](https://developers.xsolla.com/doc/pay-station/features/ui-theme-customization/#pay_station_ui_theme_customization_layout) for detailed information.",
      is_three_ds_independent_windows = true,
      is_cart_open_by_default = true,
    },
    cart_payment_settings_payment_method = 123,
    cart_payment_settings_return_url = "Page to redirect the user to after payment. Parameters `user_id`, `foreigninvoice`, `invoice_id` and `status` will be automatically added to the link.",
    cart_payment_redirect_policy = 
    {
      redirect_conditions = "none",
      delay = 0,
      status_for_manual_redirection = "none",
      redirect_button_caption = "Text button",
    },
  },
  custom_parameters = 
  {
  },
}

shop.create_free_order()

shop.create_free_order(project_id (REQUIRED),body,callback,retry_policy,cancellation_token)

Create order with free cart

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
body table
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

EXAMPLES

{
  currency = "Order price currency. Three-letter currency code per [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). Check the documentation for detailed information about [currencies supported by Xsolla](https://developers.xsolla.com/doc/pay-station/references/supported-currencies/).",
  locale = "Response language.",
  sandbox = true,
  settings = 
  {
    cart_payment_settings_ui = 
    {
      theme = "Payment UI theme. Can be `63295a9a2e47fab76f7708e1` for the light theme (default) or `63295aab2e47fab76f7708e3` for the dark theme. You can also [create a custom theme](https://developers.xsolla.com/doc/pay-station/features/ui-theme-customization/#pay_station_ui_theme_customization_in_token) and pass its ID in this parameter.",
      desktop = 
      {
        header = 
        {
          is_visible = true,
          visible_logo = true,
          visible_name = true,
          visible_purchase = true,
          type = "How to show the header. Can be `compact` (hides project name and user ID) or `normal` (default).",
          close_button = true,
        },
      },
      mode = "Interface mode in payment UI. Can be `user_account` only. The header contains only the account navigation menu, and the user cannot select a product or make a payment. This mode is only available on the desktop.",
      user_account = 
      {
        payment_accounts = 
        {
          enable = true,
        },
        info = 
        {
          enable = true,
          order = 123,
        },
        subscriptions = 
        {
          enable = true,
          order = 123,
        },
      },
      header = 
      {
        visible_virtual_currency_balance = true,
      },
      mobile = 
      {
        header = 
        {
          close_button = true,
        },
      },
      is_prevent_external_link_open = true,
      is_payment_methods_list_mode = true,
      is_independent_windows = true,
      currency_format = "Set to `code` to display a three-letter [ISO 4217](https://developers.xsolla.com/doc/pay-station/references/supported-currencies/) currency code in the payment UI. The currency symbol is displayed instead of the three-letter currency code by default.",
      is_show_close_widget_warning = true,
      layout = "Location of the main elements of the payment UI. You can open the payment UI inside your game and/or swap the columns with information about an order and payment methods. Refer to the [customization instructions](https://developers.xsolla.com/doc/pay-station/features/ui-theme-customization/#pay_station_ui_theme_customization_layout) for detailed information.",
      is_three_ds_independent_windows = true,
      is_cart_open_by_default = true,
    },
    cart_payment_settings_payment_method = 123,
    cart_payment_settings_return_url = "Page to redirect the user to after payment. Parameters `user_id`, `foreigninvoice`, `invoice_id` and `status` will be automatically added to the link.",
    cart_payment_redirect_policy = 
    {
      redirect_conditions = "none",
      delay = 0,
      status_for_manual_redirection = "none",
      redirect_button_caption = "Text button",
    },
  },
  custom_parameters = 
  {
  },
}

shop.create_free_order_by_cart_id()

shop.create_free_order_by_cart_id(project_id (REQUIRED),cart_id (REQUIRED),body,callback,retry_policy,cancellation_token)

Create order with particular free cart

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
cart_id (REQUIRED) string Cart ID.
body table
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

EXAMPLES

{
  currency = "Order price currency. Three-letter currency code per [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). Check the documentation for detailed information about [currencies supported by Xsolla](https://developers.xsolla.com/doc/pay-station/references/supported-currencies/).",
  locale = "Response language.",
  sandbox = true,
  settings = 
  {
    cart_payment_settings_ui = 
    {
      theme = "Payment UI theme. Can be `63295a9a2e47fab76f7708e1` for the light theme (default) or `63295aab2e47fab76f7708e3` for the dark theme. You can also [create a custom theme](https://developers.xsolla.com/doc/pay-station/features/ui-theme-customization/#pay_station_ui_theme_customization_in_token) and pass its ID in this parameter.",
      desktop = 
      {
        header = 
        {
          is_visible = true,
          visible_logo = true,
          visible_name = true,
          visible_purchase = true,
          type = "How to show the header. Can be `compact` (hides project name and user ID) or `normal` (default).",
          close_button = true,
        },
      },
      mode = "Interface mode in payment UI. Can be `user_account` only. The header contains only the account navigation menu, and the user cannot select a product or make a payment. This mode is only available on the desktop.",
      user_account = 
      {
        payment_accounts = 
        {
          enable = true,
        },
        info = 
        {
          enable = true,
          order = 123,
        },
        subscriptions = 
        {
          enable = true,
          order = 123,
        },
      },
      header = 
      {
        visible_virtual_currency_balance = true,
      },
      mobile = 
      {
        header = 
        {
          close_button = true,
        },
      },
      is_prevent_external_link_open = true,
      is_payment_methods_list_mode = true,
      is_independent_windows = true,
      currency_format = "Set to `code` to display a three-letter [ISO 4217](https://developers.xsolla.com/doc/pay-station/references/supported-currencies/) currency code in the payment UI. The currency symbol is displayed instead of the three-letter currency code by default.",
      is_show_close_widget_warning = true,
      layout = "Location of the main elements of the payment UI. You can open the payment UI inside your game and/or swap the columns with information about an order and payment methods. Refer to the [customization instructions](https://developers.xsolla.com/doc/pay-station/features/ui-theme-customization/#pay_station_ui_theme_customization_layout) for detailed information.",
      is_three_ds_independent_windows = true,
      is_cart_open_by_default = true,
    },
    cart_payment_settings_payment_method = 123,
    cart_payment_settings_return_url = "Page to redirect the user to after payment. Parameters `user_id`, `foreigninvoice`, `invoice_id` and `status` will be automatically added to the link.",
    cart_payment_redirect_policy = 
    {
      redirect_conditions = "none",
      delay = 0,
      status_for_manual_redirection = "none",
      redirect_button_caption = "Text button",
    },
  },
  custom_parameters = 
  {
  },
}

shop.create_free_order_with_item()

shop.create_free_order_with_item(project_id (REQUIRED),item_sku (REQUIRED),body,callback,retry_policy,cancellation_token)

Create order with specified free item

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
item_sku (REQUIRED) string Item SKU.
body table
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

EXAMPLES

{
  currency = "Order price currency. Three-letter currency code per [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217). Check the documentation for detailed information about [currencies supported by Xsolla](https://developers.xsolla.com/doc/pay-station/references/supported-currencies/).",
  locale = "Response language.",
  sandbox = true,
  quantity = 123,
  promo_code = "Redeems a code of a promo code promotion with payment.",
  settings = 
  {
    cart_payment_settings_ui = 
    {
      theme = "Payment UI theme. Can be `63295a9a2e47fab76f7708e1` for the light theme (default) or `63295aab2e47fab76f7708e3` for the dark theme. You can also [create a custom theme](https://developers.xsolla.com/doc/pay-station/features/ui-theme-customization/#pay_station_ui_theme_customization_in_token) and pass its ID in this parameter.",
      desktop = 
      {
        header = 
        {
          is_visible = true,
          visible_logo = true,
          visible_name = true,
          visible_purchase = true,
          type = "How to show the header. Can be `compact` (hides project name and user ID) or `normal` (default).",
          close_button = true,
        },
      },
      mode = "Interface mode in payment UI. Can be `user_account` only. The header contains only the account navigation menu, and the user cannot select a product or make a payment. This mode is only available on the desktop.",
      user_account = 
      {
        payment_accounts = 
        {
          enable = true,
        },
        info = 
        {
          enable = true,
          order = 123,
        },
        subscriptions = 
        {
          enable = true,
          order = 123,
        },
      },
      header = 
      {
        visible_virtual_currency_balance = true,
      },
      mobile = 
      {
        header = 
        {
          close_button = true,
        },
      },
      is_prevent_external_link_open = true,
      is_payment_methods_list_mode = true,
      is_independent_windows = true,
      currency_format = "Set to `code` to display a three-letter [ISO 4217](https://developers.xsolla.com/doc/pay-station/references/supported-currencies/) currency code in the payment UI. The currency symbol is displayed instead of the three-letter currency code by default.",
      is_show_close_widget_warning = true,
      layout = "Location of the main elements of the payment UI. You can open the payment UI inside your game and/or swap the columns with information about an order and payment methods. Refer to the [customization instructions](https://developers.xsolla.com/doc/pay-station/features/ui-theme-customization/#pay_station_ui_theme_customization_layout) for detailed information.",
      is_three_ds_independent_windows = true,
      is_cart_open_by_default = true,
    },
    cart_payment_settings_payment_method = 123,
    cart_payment_settings_return_url = "Page to redirect the user to after payment. Parameters `user_id`, `foreigninvoice`, `invoice_id` and `status` will be automatically added to the link.",
    cart_payment_redirect_policy = 
    {
      redirect_conditions = "none",
      delay = 0,
      status_for_manual_redirection = "none",
      redirect_button_caption = "Text button",
    },
  },
  custom_parameters = 
  {
  },
}

shop.get_order()

shop.get_order(project_id (REQUIRED),order_id (REQUIRED),callback,retry_policy,cancellation_token)

Get order

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
order_id (REQUIRED) string Order ID.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.get_upsell_for_project_client()

shop.get_upsell_for_project_client(project_id (REQUIRED),callback,retry_policy,cancellation_token)

Get list of upsell items in project

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.get_games_list()

shop.get_games_list(project_id (REQUIRED),limit,offset,locale,additional_fields,country,promo_code,show_inactive_time_limited_items,callback,retry_policy,cancellation_token)

Get games list

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
limit integer Limit for the number of elements on the page.
offset integer Number of the element from which the list is generated (the count starts from 0).
locale string Response language. Two-letter lowercase language code per ISO 639-1.
additional_fields array The list of additional fields. These fields will be in the response if you send them in your request.
country string Two-letter uppercase country code per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Check the documentation for detailed information about [countries supported by Xsolla](https://developers.xsolla.com/doc/shop-builder/references/supported-countries/) and [the process of determining the country](https://developers.xsolla.com/doc/shop-builder/features/pricing-policy/#pricing_policy_country_determination).
promo_code string Unique case sensitive code. Contains letters and numbers.
show_inactive_time_limited_items integer Shows time-limited items that are not available to the user. The validity period of such items has not started or has already expired.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.get_games_group()

shop.get_games_group(project_id (REQUIRED),external_id (REQUIRED),limit,offset,locale,additional_fields,country,promo_code,show_inactive_time_limited_items,callback,retry_policy,cancellation_token)

Get games list by specified group

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
external_id (REQUIRED) string Group external ID.
limit integer Limit for the number of elements on the page.
offset integer Number of the element from which the list is generated (the count starts from 0).
locale string Response language. Two-letter lowercase language code per ISO 639-1.
additional_fields array The list of additional fields. These fields will be in the response if you send them in your request.
country string Two-letter uppercase country code per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Check the documentation for detailed information about [countries supported by Xsolla](https://developers.xsolla.com/doc/shop-builder/references/supported-countries/) and [the process of determining the country](https://developers.xsolla.com/doc/shop-builder/features/pricing-policy/#pricing_policy_country_determination).
promo_code string Unique case sensitive code. Contains letters and numbers.
show_inactive_time_limited_items integer Shows time-limited items that are not available to the user. The validity period of such items has not started or has already expired.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.get_game_by_sku()

shop.get_game_by_sku(project_id (REQUIRED),item_sku (REQUIRED),locale,additional_fields,country,promo_code,show_inactive_time_limited_items,callback,retry_policy,cancellation_token)

Get game for catalog

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
item_sku (REQUIRED) string Item SKU.
locale string Response language. Two-letter lowercase language code per ISO 639-1.
additional_fields array The list of additional fields. These fields will be in the response if you send them in your request.
country string Two-letter uppercase country code per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Check the documentation for detailed information about [countries supported by Xsolla](https://developers.xsolla.com/doc/shop-builder/references/supported-countries/) and [the process of determining the country](https://developers.xsolla.com/doc/shop-builder/features/pricing-policy/#pricing_policy_country_determination).
promo_code string Unique case sensitive code. Contains letters and numbers.
show_inactive_time_limited_items integer Shows time-limited items that are not available to the user. The validity period of such items has not started or has already expired.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.get_game_key_by_sku()

shop.get_game_key_by_sku(project_id (REQUIRED),item_sku (REQUIRED),locale,additional_fields,country,promo_code,show_inactive_time_limited_items,callback,retry_policy,cancellation_token)

Get game key for catalog

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
item_sku (REQUIRED) string Item SKU.
locale string Response language. Two-letter lowercase language code per ISO 639-1.
additional_fields array The list of additional fields. These fields will be in the response if you send them in your request.
country string Two-letter uppercase country code per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Check the documentation for detailed information about [countries supported by Xsolla](https://developers.xsolla.com/doc/shop-builder/references/supported-countries/) and [the process of determining the country](https://developers.xsolla.com/doc/shop-builder/features/pricing-policy/#pricing_policy_country_determination).
promo_code string Unique case sensitive code. Contains letters and numbers.
show_inactive_time_limited_items integer Shows time-limited items that are not available to the user. The validity period of such items has not started or has already expired.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.get_game_keys_group()

shop.get_game_keys_group(project_id (REQUIRED),external_id (REQUIRED),limit,offset,locale,additional_fields,country,promo_code,show_inactive_time_limited_items,callback,retry_policy,cancellation_token)

Get game keys list by specified group

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
external_id (REQUIRED) string Group external ID.
limit integer Limit for the number of elements on the page.
offset integer Number of the element from which the list is generated (the count starts from 0).
locale string Response language. Two-letter lowercase language code per ISO 639-1.
additional_fields array The list of additional fields. These fields will be in the response if you send them in your request.
country string Two-letter uppercase country code per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Check the documentation for detailed information about [countries supported by Xsolla](https://developers.xsolla.com/doc/shop-builder/references/supported-countries/) and [the process of determining the country](https://developers.xsolla.com/doc/shop-builder/features/pricing-policy/#pricing_policy_country_determination).
promo_code string Unique case sensitive code. Contains letters and numbers.
show_inactive_time_limited_items integer Shows time-limited items that are not available to the user. The validity period of such items has not started or has already expired.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.get_drm_list()

shop.get_drm_list(project_id (REQUIRED),callback,retry_policy,cancellation_token)

Get DRM list

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.get_user_games()

shop.get_user_games(project_id (REQUIRED),limit,offset,sandbox,additional_fields,callback,retry_policy,cancellation_token)

Get list of games owned by user

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
limit integer Limit for the number of elements on the page.
offset integer Number of the element from which the list is generated (the count starts from 0).
sandbox integer What type of entitlements should be returned. If the parameter is set to 1, the entitlements received by the user in the sandbox mode only are returned. If the parameter isn't passed or is set to 0, the entitlements received by the user in the live mode only are returned.
additional_fields array The list of additional fields. These fields will be in the response if you send them in your request. Available fields `attributes`.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.redeem_game_pin_code()

shop.redeem_game_pin_code(project_id (REQUIRED),body,callback,retry_policy,cancellation_token)

Redeem game code by client

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
body table
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

EXAMPLES

{
  code = "AAAA-BBBB-CCCC-DDDD",
  sandbox = false,
}

shop.redeem_coupon()

shop.redeem_coupon(project_id (REQUIRED),body,callback,retry_policy,cancellation_token)

Redeem coupon code

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
body table
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

EXAMPLES

{
  coupon_code = "WINTER2021",
  selected_unit_items = 
  {
  },
}

shop.get_coupon_rewards_by_code()

shop.get_coupon_rewards_by_code(project_id (REQUIRED),coupon_code (REQUIRED),callback,retry_policy,cancellation_token)

Get coupon rewards

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
coupon_code (REQUIRED) string Unique case sensitive code. Contains letters and numbers.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.redeem_promo_code()

shop.redeem_promo_code(project_id (REQUIRED),body,callback,retry_policy,cancellation_token)

Redeem promo code

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
body table
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

EXAMPLES

{
  coupon_code = "SUMMER2021",
  cart = 
  {
    id = "Cart ID.",
  },
  selected_unit_items = 
  {
  },
}

shop.remove_cart_promo_code()

shop.remove_cart_promo_code(project_id (REQUIRED),body,callback,retry_policy,cancellation_token)

Remove promo code from cart

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
body table
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

EXAMPLES

{
  cart = 
  {
    id = "Cart ID.",
  },
}

shop.get_promo_code_rewards_by_code()

shop.get_promo_code_rewards_by_code(project_id (REQUIRED),promocode_code (REQUIRED),callback,retry_policy,cancellation_token)

Get promo code rewards

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
promocode_code (REQUIRED) string Unique case sensitive code. Contains letters and numbers.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.verify_promotion_code()

shop.verify_promotion_code(project_id (REQUIRED),code (REQUIRED),callback,retry_policy,cancellation_token)

Verify promotion code

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
code (REQUIRED) string Unique case-sensitive code. Contains letters and numbers.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.get_virtual_items()

shop.get_virtual_items(project_id (REQUIRED),limit,offset,locale,additional_fields,country,promo_code,show_inactive_time_limited_items,callback,retry_policy,cancellation_token)

Get virtual items list

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
limit integer Limit for the number of elements on the page.
offset integer Number of the element from which the list is generated (the count starts from 0).
locale string Response language. Two-letter lowercase language code per ISO 639-1.
additional_fields array The list of additional fields. These fields will be in the response if you send them in your request.
country string Two-letter uppercase country code per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Check the documentation for detailed information about [countries supported by Xsolla](https://developers.xsolla.com/doc/shop-builder/references/supported-countries/) and [the process of determining the country](https://developers.xsolla.com/doc/shop-builder/features/pricing-policy/#pricing_policy_country_determination).
promo_code string Unique case sensitive code. Contains letters and numbers.
show_inactive_time_limited_items integer Shows time-limited items that are not available to the user. The validity period of such items has not started or has already expired.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.get_virtual_items_sku()

shop.get_virtual_items_sku(project_id (REQUIRED),item_sku (REQUIRED),locale,country,show_inactive_time_limited_items,callback,retry_policy,cancellation_token)

Get virtual item by SKU

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
item_sku (REQUIRED) string Item SKU.
locale string Response language. Two-letter lowercase language code per ISO 639-1.
country string Two-letter uppercase country code per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Check the documentation for detailed information about [countries supported by Xsolla](https://developers.xsolla.com/doc/shop-builder/references/supported-countries/) and [the process of determining the country](https://developers.xsolla.com/doc/shop-builder/features/pricing-policy/#pricing_policy_country_determination).
show_inactive_time_limited_items integer Shows time-limited items that are not available to the user. The validity period of such items has not started or has already expired.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.get_all_virtual_items()

shop.get_all_virtual_items(project_id (REQUIRED),locale,promo_code,callback,retry_policy,cancellation_token)

Get all virtual items list

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
locale string Response language. Two-letter lowercase language code per ISO 639-1.
promo_code string Unique case sensitive code. Contains letters and numbers.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.get_virtual_currency()

shop.get_virtual_currency(project_id (REQUIRED),limit,offset,locale,additional_fields,country,promo_code,show_inactive_time_limited_items,callback,retry_policy,cancellation_token)

Get virtual currency list

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
limit integer Limit for the number of elements on the page.
offset integer Number of the element from which the list is generated (the count starts from 0).
locale string Response language. Two-letter lowercase language code per ISO 639-1.
additional_fields array The list of additional fields. These fields will be in the response if you send them in your request.
country string Two-letter uppercase country code per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Check the documentation for detailed information about [countries supported by Xsolla](https://developers.xsolla.com/doc/shop-builder/references/supported-countries/) and [the process of determining the country](https://developers.xsolla.com/doc/shop-builder/features/pricing-policy/#pricing_policy_country_determination).
promo_code string Unique case sensitive code. Contains letters and numbers.
show_inactive_time_limited_items integer Shows time-limited items that are not available to the user. The validity period of such items has not started or has already expired.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.get_virtual_currency_sku()

shop.get_virtual_currency_sku(project_id (REQUIRED),virtual_currency_sku (REQUIRED),locale,country,show_inactive_time_limited_items,callback,retry_policy,cancellation_token)

Get virtual currency by SKU

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
virtual_currency_sku (REQUIRED) string Virtual currency SKU.
locale string Response language. Two-letter lowercase language code per ISO 639-1.
country string Two-letter uppercase country code per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Check the documentation for detailed information about [countries supported by Xsolla](https://developers.xsolla.com/doc/shop-builder/references/supported-countries/) and [the process of determining the country](https://developers.xsolla.com/doc/shop-builder/features/pricing-policy/#pricing_policy_country_determination).
show_inactive_time_limited_items integer Shows time-limited items that are not available to the user. The validity period of such items has not started or has already expired.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.get_virtual_currency_package()

shop.get_virtual_currency_package(project_id (REQUIRED),limit,offset,locale,additional_fields,country,promo_code,show_inactive_time_limited_items,callback,retry_policy,cancellation_token)

Get virtual currency package list

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
limit integer Limit for the number of elements on the page.
offset integer Number of the element from which the list is generated (the count starts from 0).
locale string Response language. Two-letter lowercase language code per ISO 639-1.
additional_fields array The list of additional fields. These fields will be in the response if you send them in your request.
country string Two-letter uppercase country code per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Check the documentation for detailed information about [countries supported by Xsolla](https://developers.xsolla.com/doc/shop-builder/references/supported-countries/) and [the process of determining the country](https://developers.xsolla.com/doc/shop-builder/features/pricing-policy/#pricing_policy_country_determination).
promo_code string Unique case sensitive code. Contains letters and numbers.
show_inactive_time_limited_items integer Shows time-limited items that are not available to the user. The validity period of such items has not started or has already expired.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.get_virtual_currency_package_sku()

shop.get_virtual_currency_package_sku(project_id (REQUIRED),virtual_currency_package_sku (REQUIRED),locale,country,show_inactive_time_limited_items,callback,retry_policy,cancellation_token)

Get virtual currency package by SKU

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
virtual_currency_package_sku (REQUIRED) string Virtual currency package SKU.
locale string Response language. Two-letter lowercase language code per ISO 639-1.
country string Two-letter uppercase country code per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Check the documentation for detailed information about [countries supported by Xsolla](https://developers.xsolla.com/doc/shop-builder/references/supported-countries/) and [the process of determining the country](https://developers.xsolla.com/doc/shop-builder/features/pricing-policy/#pricing_policy_country_determination).
show_inactive_time_limited_items integer Shows time-limited items that are not available to the user. The validity period of such items has not started or has already expired.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.get_virtual_items_group()

shop.get_virtual_items_group(project_id (REQUIRED),external_id (REQUIRED),limit,offset,locale,additional_fields,country,promo_code,show_inactive_time_limited_items,callback,retry_policy,cancellation_token)

Get items list by specified group

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
external_id (REQUIRED) string Group external ID.
limit integer Limit for the number of elements on the page.
offset integer Number of the element from which the list is generated (the count starts from 0).
locale string Response language. Two-letter lowercase language code per ISO 639-1.
additional_fields array The list of additional fields. These fields will be in the response if you send them in your request.
country string Two-letter uppercase country code per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Check the documentation for detailed information about [countries supported by Xsolla](https://developers.xsolla.com/doc/shop-builder/references/supported-countries/) and [the process of determining the country](https://developers.xsolla.com/doc/shop-builder/features/pricing-policy/#pricing_policy_country_determination).
promo_code string Unique case sensitive code. Contains letters and numbers.
show_inactive_time_limited_items integer Shows time-limited items that are not available to the user. The validity period of such items has not started or has already expired.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.get_item_groups()

shop.get_item_groups(project_id (REQUIRED),promo_code,callback,retry_policy,cancellation_token)

Get item group list

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
promo_code string Unique case sensitive code. Contains letters and numbers.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.create_order_with_item_for_virtual_currency()

shop.create_order_with_item_for_virtual_currency(project_id (REQUIRED),item_sku (REQUIRED),virtual_currency_sku (REQUIRED),platform,body,callback,retry_policy,cancellation_token)

Create order with specified item purchased by virtual currency

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
item_sku (REQUIRED) string Item SKU.
virtual_currency_sku (REQUIRED) string Virtual currency SKU.
platform string Publishing platform the user plays on `xsolla` (default), `playstation_network`, `xbox_live`, `pc_standalone`, `nintendo_shop`, `google_play`, `app_store_ios`, `android_standalone`, `ios_standalone`, `android_other`, `ios_other`, `pc_other`.
body table
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

EXAMPLES

{
  custom_parameters = 
  {
  },
}

shop.get_sellable_items()

shop.get_sellable_items(project_id (REQUIRED),limit,offset,locale,additional_fields,country,promo_code,show_inactive_time_limited_items,callback,retry_policy,cancellation_token)

Get sellable items list

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
limit integer Limit for the number of elements on the page.
offset integer Number of the element from which the list is generated (the count starts from 0).
locale string Response language. Two-letter lowercase language code per ISO 639-1.
additional_fields array The list of additional fields. These fields will be in the response if you send them in your request.
country string Two-letter uppercase country code per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Check the documentation for detailed information about [countries supported by Xsolla](https://developers.xsolla.com/doc/shop-builder/references/supported-countries/) and [the process of determining the country](https://developers.xsolla.com/doc/shop-builder/features/pricing-policy/#pricing_policy_country_determination).
promo_code string Unique case sensitive code. Contains letters and numbers.
show_inactive_time_limited_items integer Shows time-limited items that are not available to the user. The validity period of such items has not started or has already expired.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.get_sellable_item_by_id()

shop.get_sellable_item_by_id(project_id (REQUIRED),item_id (REQUIRED),promo_code,show_inactive_time_limited_items,callback,retry_policy,cancellation_token)

Get sellable item by ID

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
item_id (REQUIRED) string Item ID.
promo_code string Unique case sensitive code. Contains letters and numbers.
show_inactive_time_limited_items integer Shows time-limited items that are not available to the user. The validity period of such items has not started or has already expired.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.get_sellable_item_by_sku()

shop.get_sellable_item_by_sku(project_id (REQUIRED),sku (REQUIRED),promo_code,show_inactive_time_limited_items,callback,retry_policy,cancellation_token)

Get sellable item by SKU

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
sku (REQUIRED) string Item SKU.
promo_code string Unique case sensitive code. Contains letters and numbers.
show_inactive_time_limited_items integer Shows time-limited items that are not available to the user. The validity period of such items has not started or has already expired.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.get_sellable_items_group()

shop.get_sellable_items_group(project_id (REQUIRED),external_id (REQUIRED),limit,offset,locale,additional_fields,country,promo_code,show_inactive_time_limited_items,callback,retry_policy,cancellation_token)

Get sellable items list by specified group

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
external_id (REQUIRED) string Group external ID.
limit integer Limit for the number of elements on the page.
offset integer Number of the element from which the list is generated (the count starts from 0).
locale string Response language. Two-letter lowercase language code per ISO 639-1.
additional_fields array The list of additional fields. These fields will be in the response if you send them in your request.
country string Two-letter uppercase country code per [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2). Check the documentation for detailed information about [countries supported by Xsolla](https://developers.xsolla.com/doc/shop-builder/references/supported-countries/) and [the process of determining the country](https://developers.xsolla.com/doc/shop-builder/features/pricing-policy/#pricing_policy_country_determination).
promo_code string Unique case sensitive code. Contains letters and numbers.
show_inactive_time_limited_items integer Shows time-limited items that are not available to the user. The validity period of such items has not started or has already expired.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.get_reward_chains_list()

shop.get_reward_chains_list(project_id (REQUIRED),limit,offset,callback,retry_policy,cancellation_token)

Get current user's reward chains

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
limit integer Limit for the number of elements on the page.
offset integer Number of the element from which the list is generated (the count starts from 0).
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.get_user_reward_chain_balance()

shop.get_user_reward_chain_balance(project_id (REQUIRED),reward_chain_id (REQUIRED),callback,retry_policy,cancellation_token)

Get current user's value point balance

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
reward_chain_id (REQUIRED) integer Reward chain ID.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.claim_user_reward_chain_step_reward()

shop.claim_user_reward_chain_step_reward(project_id (REQUIRED),reward_chain_id (REQUIRED),step_id (REQUIRED),callback,retry_policy,cancellation_token)

Claim step reward

PARAMETERS

project_id (REQUIRED) integer Project ID. You can find this parameter in your [Publisher Account](https://publisher.xsolla.com/) next to the name of the project.
reward_chain_id (REQUIRED) integer Reward chain ID.
step_id (REQUIRED) integer Reward chain step ID.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.get_user_clan_top_contributors()

shop.get_user_clan_top_contributors(project_id (REQUIRED),reward_chain_id (REQUIRED),callback,retry_policy,cancellation_token)

Get top 10 contributors to reward chain under clan

PARAMETERS

project_id (REQUIRED) integer Project ID.
reward_chain_id (REQUIRED) integer Reward chain ID.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token

shop.user_clan_update()

shop.user_clan_update(project_id (REQUIRED),callback,retry_policy,cancellation_token)

Update current user's clan

PARAMETERS

project_id (REQUIRED) integer Project ID.
callback function Optional callback function
retry_policy table Optional retry policy
cancellation_token table Optional cancellation token