Xsolla::Catalog::XsollaCatalog

Public Functions

Name
static voidGetItems(Action< StoreItems > onSuccess, Action< Error > onError, string locale =null, string country =null, string additionalFields =“long_description”, SdkType sdkType =SdkType.Store)
Returns a full list of virtual items. The list includes items for which display in the store is enabled in the settings. For each virtual item, complete data is returned. If called after user authentication, the method returns items that match the personalization rules for the current user.
static voidGetPaginatedItems(Action< StoreItems > onSuccess, Action< Error > onError, int limit, int offset, string locale =null, string country =null, string additionalFields =“long_description”, SdkType sdkType =SdkType.Store)
Returns a list of virtual items according to pagination settings. The list includes items for which display in the store is enabled in the settings. For each virtual item, complete data is returned. If called after user authentication, the method returns items that match the personalization rules for the current user. Attention: The number of items returned in a single response is limited. The default and maximum value is 50 items per response. To get more data page by page, use limit and offset fields.
static voidGetCatalogSimplified(Action< StoreShortItems > onSuccess, Action< Error > onError, string locale =null)
Returns a full list of virtual items. The list includes items for which display in the store is enabled in the settings. For each virtual item, the SKU, name, description, and data about the groups it belongs to are returned. If used after user authentication, the method returns items that match the personalization rules for the current user.
static voidGetGroupItems(string groupExternalId, Action< StoreItems > onSuccess, Action< Error > onError, string locale =null, string country =null, string additionalFields =null)
Returns a list of items for the specified group. The list includes items for which display in the store is enabled in the settings. In the settings of the group, the display in the store must be enabled. If called after user authentication, the method returns items that match the personalization rules for the current user.
static voidGetPaginatedGroupItems(string groupExternalId, Action< StoreItems > onSuccess, Action< Error > onError, int limit, int offset, string locale =null, string country =null, string additionalFields =null)
Returns a list of items for the specified group according to pagination settings. The list includes items for which display in the store is enabled in the settings. In the settings of the group, the display in the store must be enabled. If called after user authentication, the method returns items that match the personalization rules for the current user. Attention: The number of items returned in a single response is limited. The default and maximum value is 50 items per response. To get more data page by page, use limit and offset fields.
static voidGetItemGroups(Action< Groups > onSuccess, Action< Error > onError, string locale =null, string promoCode =null)
Returns a full list of virtual item groups. The list includes groups for which display in the store is enabled in the settings.
static voidGetVirtualCurrencyList(Action< VirtualCurrencyItems > onSuccess, Action< Error > onError, string locale =null, string country =null, string additionalFields =null)
Returns a full list of virtual currencies. The list includes currencies for which display in the store is enabled in settings.
static voidGetPaginatedVirtualCurrencyList(Action< VirtualCurrencyItems > onSuccess, Action< Error > onError, int limit, int offset, string locale =null, string country =null, string additionalFields =null)
Returns a list of virtual currencies according to pagination settings. The list includes currencies for which display in the store is enabled in settings. Attention: The number of currencies returned in a single response is limited. The default and maximum value is 50 currencies per response. To get more data page by page, use limit and offset fields.
static voidGetVirtualCurrencyPackagesList(Action< VirtualCurrencyPackages > onSuccess, Action< Error > onError, string locale =null, string country =null, string additionalFields =null, SdkType sdkType =SdkType.Store)
Returns a list of full virtual currency packages. The list includes packages for which display in the store is enabled in the settings. If called after user authentication, the method returns packages that match the personalization rules for the current user.
static voidGetPaginatedVirtualCurrencyPackagesList(Action< VirtualCurrencyPackages > onSuccess, Action< Error > onError, int limit, int offset, string locale =null, string country =null, string additionalFields =null, SdkType sdkType =SdkType.Store)
Returns a list of virtual currency packages according to pagination settings. The list includes packages for which display in the store is enabled in the settings. If called after user authentication, the method returns packages that match the personalization rules for the current user. Attention: The number of packages returned in a single response is limited. The default and maximum value is 50 packages per response. To get more data page by page, use limit and offset fields.
static voidGetBundles(Action< BundleItems > onSuccess, Action< Error > onError, string locale =null, string country =null, string additionalFields =null)
Returns a full list of bundles. The list includes bundles for which display in the store is enabled in the settings. If called after user authentication, the method returns items that match the personalization rules for the current user.
static voidGetPaginatedBundles(Action< BundleItems > onSuccess, Action< Error > onError, int limit, int offset, string locale =null, string country =null, string additionalFields =null)
Returns a list of bundles according to pagination settings. The list includes bundles for which display in the store is enabled in the settings. If called after user authentication, the method returns items that match the personalization rules for the current user. Attention: The number of bundles returned in a single response is limited. The default and maximum value is 50 bundles per response. To get more data page by page, use limit and offset fields.
static voidGetBundle(string sku, Action< BundleItem > onSuccess, Action< Error > onError, string locale =null, string country =null)
Returns information about the contents of the specified bundle. In the bundle settings, display in the store must be enabled. If used after user authentication, the method returns items that match the personalization rules for the current user.
static voidRedeemCouponCode(string couponCode, Action< CouponRedeemedItems > onSuccess, Action< Error > onError)
Redeems the coupon code and delivers a reward to the user in one of the following ways:
static voidGetCouponRewards(string couponCode, Action< CouponReward > onSuccess, Action< Error > onError)
Returns a list of items that can be credited to the user when the coupon is redeemed. Can be used to let users choose one of many items as a bonus. The usual case is choosing a DRM if the coupon contains a game as a bonus.
static voidCreateOrder(string itemSku, Action< OrderData > onSuccess, Action< Error > onError, PurchaseParams purchaseParams =null, Dictionary< string, string > customHeaders =null, SdkType sdkType =SdkType.Store)
Creates an order with a specified item. The created order will get a new order status.
static voidCreateOrderByVirtualCurrency(string itemSku, string priceSku, Action< OrderId > onSuccess, Action< Error > onError, PurchaseParams purchaseParams =null, string platform =null, Dictionary< string, string > customHeaders =null)
Creates an order with a specified item, returns unique identifier of the created order and the Pay Station token for the purchase of the specified product by virtual currency. The created order will get a new order status.
static voidCreateOrderWithFreeItem(string itemSku, Action< OrderId > onSuccess, Action< Error > onError, PurchaseParams purchaseParams =null, Dictionary< string, string > customHeaders =null)
Create order with specified free item. The created order will get a done order status.
static voidPurchase(string itemSku, Action< OrderStatus > onSuccess, Action< Error > onError, Action< OrderData > onOrderCreated =null, Action< BrowserCloseInfo > onBrowseClosed =null, PurchaseParams purchaseParams =null, Dictionary< string, string > customHeaders =null, PlatformSpecificAppearance platformSpecificAppearance =null, SdkType sdkType =SdkType.Store)
Launches purchase process for a specified item. This method encapsulates methods for creating an order, opening a payment UI, and tracking the order status.
static voidPurchaseForVirtualCurrency(string itemSku, string priceSku, Action< OrderStatus > onSuccess, Action< Error > onError, Action< OrderId > onOrderCreated =null, PurchaseParams purchaseParams =null, string platform =null, Dictionary< string, string > customHeaders =null, SdkType sdkType =SdkType.Store)
Launch purchase process for a specified item by virtual currency. This method encapsulates methods for creating an order and tracking the order status.
static voidPurchaseFreeItem(string itemSku, Action< OrderStatus > onSuccess, Action< Error > onError, Action< OrderId > onOrderCreated =null, PurchaseParams purchaseParams =null, Dictionary< string, string > customHeaders =null, SdkType sdkType =SdkType.Store)
Launches purchase process for a specified free item. This method encapsulates methods for creating an order and tracking the order status.
static voidGetCatalog(Action< StoreItems > onSuccess, Action< Error > onError, int limit =50, int offset =0, string locale =null, string country =null, string additionalFields =“long_description”)
Deprecated. Use GetItems instead. Returns a list of virtual items according to pagination settings. The list includes items for which display in the store is enabled in the settings. For each virtual item, complete data is returned. If used after user authentication, the method returns items that match the personalization rules for the current user. Attention: The number of items returned in a single response is limited. The default and maximum value is 50 items per response. To get more data page by page, use limit and offset fields.

Public Functions Documentation

function GetItems

Copy
Full screen
Small screen
1static void GetItems(
2    Action< StoreItems > onSuccess,
3    Action< Error > onError,
4    string locale =null,
5    string country =null,
6    string additionalFields ="long_description",
7    SdkType sdkType =SdkType.Store
8)

Returns a full list of virtual items. The list includes items for which display in the store is enabled in the settings. For each virtual item, complete data is returned. If called after user authentication, the method returns items that match the personalization rules for the current user.

Parameters:

  • onSuccess Called after virtual items were successfully received.
  • onError Called after the request resulted with an error.
  • locale Response language. Two-letter lowercase language code. Leave empty to use the default value.
  • country Country for which to calculate regional prices and restrictions in a catalog. Two-letter uppercase country code per ISO 3166-1 alpha-2. Calculations are based on the user’s IP address if the country is not specified. Check the documentation for detailed information about countries supported by Xsolla.
  • additionalFields The list of additional fields. These fields will be in a response if you send them in a request. Available fields media_list, order, and long_description.
  • sdkType SDK type. Used for internal analytics.

More about the use cases.

function GetPaginatedItems

Copy
Full screen
Small screen
 1static void GetPaginatedItems(
 2    Action< StoreItems > onSuccess,
 3    Action< Error > onError,
 4    int limit,
 5    int offset,
 6    string locale =null,
 7    string country =null,
 8    string additionalFields ="long_description",
 9    SdkType sdkType =SdkType.Store
10)

Returns a list of virtual items according to pagination settings. The list includes items for which display in the store is enabled in the settings. For each virtual item, complete data is returned. If called after user authentication, the method returns items that match the personalization rules for the current user. Attention: The number of items returned in a single response is limited. The default and maximum value is 50 items per response. To get more data page by page, use limit and offset fields.

Parameters:

  • onSuccess Called after virtual items were successfully received.
  • onError Called after the request resulted with an error.
  • limit Limit for the number of elements on the page. The maximum number of elements on a page is 50.
  • offset Number of the element from which the list is generated (the count starts from 0).
  • locale Response language. Two-letter lowercase language code. Leave empty to use the default value.
  • country Country for which to calculate regional prices and restrictions in a catalog. Two-letter uppercase country code per ISO 3166-1 alpha-2. Calculations are based on the user’s IP address if the country is not specified. Check the documentation for detailed information about countries supported by Xsolla.
  • additionalFields The list of additional fields. These fields will be in a response if you send them in a request. Available fields media_list, order, and long_description.
  • sdkType SDK type. Used for internal analytics.

More about the use cases.

function GetCatalogSimplified

Copy
Full screen
Small screen
1static void GetCatalogSimplified(
2    Action< StoreShortItems > onSuccess,
3    Action< Error > onError,
4    string locale =null
5)

Returns a full list of virtual items. The list includes items for which display in the store is enabled in the settings. For each virtual item, the SKU, name, description, and data about the groups it belongs to are returned. If used after user authentication, the method returns items that match the personalization rules for the current user.

Parameters:

  • onSuccess Called after server response.
  • onError Called after the request resulted with an error.
  • locale Response language. Two-letter lowercase language code. Leave empty to use the default value.

More about the use cases.

function GetGroupItems

Copy
Full screen
Small screen
1static void GetGroupItems(
2    string groupExternalId,
3    Action< StoreItems > onSuccess,
4    Action< Error > onError,
5    string locale =null,
6    string country =null,
7    string additionalFields =null
8)

Returns a list of items for the specified group. The list includes items for which display in the store is enabled in the settings. In the settings of the group, the display in the store must be enabled. If called after user authentication, the method returns items that match the personalization rules for the current user.

Parameters:

  • groupExternalId Group external ID.
  • onSuccess Called after server response.
  • onError Called after the request resulted with an error.
  • locale Response language. Two-letter lowercase language code. Leave empty to use the default value.
  • country Country for which to calculate regional prices and restrictions in a catalog. Two-letter uppercase country code per ISO 3166-1 alpha-2. Calculations are based on the user’s IP address if the country is not specified. Check the documentation for detailed information about countries supported by Xsolla.
  • additionalFields The list of additional fields. This fields will be in a response if you send its in a request. Available fields media_list, order, long_description.

More about the use cases.

function GetPaginatedGroupItems

Copy
Full screen
Small screen
 1static void GetPaginatedGroupItems(
 2    string groupExternalId,
 3    Action< StoreItems > onSuccess,
 4    Action< Error > onError,
 5    int limit,
 6    int offset,
 7    string locale =null,
 8    string country =null,
 9    string additionalFields =null
10)

Returns a list of items for the specified group according to pagination settings. The list includes items for which display in the store is enabled in the settings. In the settings of the group, the display in the store must be enabled. If called after user authentication, the method returns items that match the personalization rules for the current user. Attention: The number of items returned in a single response is limited. The default and maximum value is 50 items per response. To get more data page by page, use limit and offset fields.

Parameters:

  • groupExternalId Group external ID.
  • onSuccess Called after server response.
  • onError Called after the request resulted with an error.
  • limit Limit for the number of elements on the page. The maximum number of elements on a page is 50.
  • offset Number of the element from which the list is generated (the count starts from 0).
  • locale Response language. Two-letter lowercase language code. Leave empty to use the default value.
  • country Country for which to calculate regional prices and restrictions in a catalog. Two-letter uppercase country code per ISO 3166-1 alpha-2. Calculations are based on the user’s IP address if the country is not specified. Check the documentation for detailed information about countries supported by Xsolla.
  • additionalFields The list of additional fields. This fields will be in a response if you send its in a request. Available fields media_list, order, long_description.

More about the use cases.

function GetItemGroups

Copy
Full screen
Small screen
1static void GetItemGroups(
2    Action< Groups > onSuccess,
3    Action< Error > onError,
4    string locale =null,
5    string promoCode =null
6)

Returns a full list of virtual item groups. The list includes groups for which display in the store is enabled in the settings.

Parameters:

  • onSuccess Called after virtual item groups were successfully received.
  • onError Called after the request resulted with an error.
  • locale Defines localization of the item text fields.Two-letter lowercase language code. Leave empty to use the default value.
  • promoCode Promo code. Unique case-sensitive code. Contains letters and numbers.

More about the use cases.

function GetVirtualCurrencyList

Copy
Full screen
Small screen
1static void GetVirtualCurrencyList(
2    Action< VirtualCurrencyItems > onSuccess,
3    Action< Error > onError,
4    string locale =null,
5    string country =null,
6    string additionalFields =null
7)

Returns a full list of virtual currencies. The list includes currencies for which display in the store is enabled in settings.

Parameters:

  • onSuccess Called after virtual currencies were successfully received.
  • onError Called after the request resulted with an error.
  • locale Response language. Two-letter lowercase language code. Leave empty to use the default value.
  • country Country for which to calculate regional prices and restrictions in a catalog. Two-letter uppercase country code per ISO 3166-1 alpha-2. Calculations are based on the user’s IP address if the country is not specified. Check the documentation for detailed information about countries supported by Xsolla.
  • additionalFields The list of additional fields. These fields will be in a response if you send them in a request. Available fields media_list, order, and long_description.

More about the use cases.

function GetPaginatedVirtualCurrencyList

Copy
Full screen
Small screen
1static void GetPaginatedVirtualCurrencyList(
2    Action< VirtualCurrencyItems > onSuccess,
3    Action< Error > onError,
4    int limit,
5    int offset,
6    string locale =null,
7    string country =null,
8    string additionalFields =null
9)

Returns a list of virtual currencies according to pagination settings. The list includes currencies for which display in the store is enabled in settings. Attention: The number of currencies returned in a single response is limited. The default and maximum value is 50 currencies per response. To get more data page by page, use limit and offset fields.

Parameters:

  • onSuccess Called after virtual currencies were successfully received.
  • onError Called after the request resulted with an error.
  • limit Limit for the number of elements on the page. The maximum number of elements on a page is 50.
  • offset Number of the element from which the list is generated (the count starts from 0).
  • locale Response language. Two-letter lowercase language code. Leave empty to use the default value.
  • country Country for which to calculate regional prices and restrictions in a catalog. Two-letter uppercase country code per ISO 3166-1 alpha-2. Calculations are based on the user’s IP address if the country is not specified. Check the documentation for detailed information about countries supported by Xsolla.
  • additionalFields The list of additional fields. These fields will be in a response if you send them in a request. Available fields media_list, order, and long_description.

More about the use cases.

function GetVirtualCurrencyPackagesList

Copy
Full screen
Small screen
1static void GetVirtualCurrencyPackagesList(
2    Action< VirtualCurrencyPackages > onSuccess,
3    Action< Error > onError,
4    string locale =null,
5    string country =null,
6    string additionalFields =null,
7    SdkType sdkType =SdkType.Store
8)

Returns a list of full virtual currency packages. The list includes packages for which display in the store is enabled in the settings. If called after user authentication, the method returns packages that match the personalization rules for the current user.

Parameters:

  • onSuccess Called after virtual currency packages were successfully received.
  • onError Called after the request resulted with an error.
  • locale Response language. Two-letter lowercase language code. Leave empty to use the default value.
  • country Country for which to calculate regional prices and restrictions in a catalog. Two-letter uppercase country code per ISO 3166-1 alpha-2. Calculations are based on the user’s IP address if the country is not specified. Check the documentation for detailed information about countries supported by Xsolla.
  • additionalFields The list of additional fields. These fields will be in a response if you send them in a request. Available fields media_list, order, and long_description.
  • sdkType SDK type. Used for internal analytics.

More about the use cases.

function GetPaginatedVirtualCurrencyPackagesList

Copy
Full screen
Small screen
 1static void GetPaginatedVirtualCurrencyPackagesList(
 2    Action< VirtualCurrencyPackages > onSuccess,
 3    Action< Error > onError,
 4    int limit,
 5    int offset,
 6    string locale =null,
 7    string country =null,
 8    string additionalFields =null,
 9    SdkType sdkType =SdkType.Store
10)

Returns a list of virtual currency packages according to pagination settings. The list includes packages for which display in the store is enabled in the settings. If called after user authentication, the method returns packages that match the personalization rules for the current user. Attention: The number of packages returned in a single response is limited. The default and maximum value is 50 packages per response. To get more data page by page, use limit and offset fields.

Parameters:

  • onSuccess Called after virtual currency packages were successfully received.
  • onError Called after the request resulted with an error.
  • limit Limit for the number of elements on the page. The maximum number of elements on a page is 50.
  • offset Number of the element from which the list is generated (the count starts from 0).
  • locale Response language. Two-letter lowercase language code. Leave empty to use the default value.
  • country Country for which to calculate regional prices and restrictions in a catalog. Two-letter uppercase country code per ISO 3166-1 alpha-2. Calculations are based on the user’s IP address if the country is not specified. Check the documentation for detailed information about countries supported by Xsolla.
  • additionalFields The list of additional fields. These fields will be in a response if you send them in a request. Available fields media_list, order, and long_description.
  • sdkType SDK type. Used for internal analytics.

More about the use cases.

function GetBundles

Copy
Full screen
Small screen
1static void GetBundles(
2    Action< BundleItems > onSuccess,
3    Action< Error > onError,
4    string locale =null,
5    string country =null,
6    string additionalFields =null
7)

Returns a full list of bundles. The list includes bundles for which display in the store is enabled in the settings. If called after user authentication, the method returns items that match the personalization rules for the current user.

Parameters:

  • onSuccess Called after bundles are successfully received.
  • onError Called after the request resulted with an error.
  • locale Defines localization of the item text fields. Two-letter lowercase language code. Leave empty to use the default value.
  • country Country for which to calculate regional prices and restrictions in a catalog. Two-letter uppercase country code per ISO 3166-1 alpha-2. Calculations are based on the user’s IP address if the country is not specified. Check the documentation for detailed information about countries supported by Xsolla.
  • additionalFields The list of additional fields. This fields will be in a response if you send its in a request. Available fields media_list, order, long_description.

More about the use cases.

function GetPaginatedBundles

Copy
Full screen
Small screen
1static void GetPaginatedBundles(
2    Action< BundleItems > onSuccess,
3    Action< Error > onError,
4    int limit,
5    int offset,
6    string locale =null,
7    string country =null,
8    string additionalFields =null
9)

Returns a list of bundles according to pagination settings. The list includes bundles for which display in the store is enabled in the settings. If called after user authentication, the method returns items that match the personalization rules for the current user. Attention: The number of bundles returned in a single response is limited. The default and maximum value is 50 bundles per response. To get more data page by page, use limit and offset fields.

Parameters:

  • onSuccess Called after bundles are successfully received.
  • onError Called after the request resulted with an error.
  • limit Limit for the number of elements on the page. The maximum number of elements on a page is 50.
  • offset Number of the element from which the list is generated (the count starts from 0).
  • locale Defines localization of the item text fields. Two-letter lowercase language code. Leave empty to use the default value.
  • country Country for which to calculate regional prices and restrictions in a catalog. Two-letter uppercase country code per ISO 3166-1 alpha-2. Calculations are based on the user’s IP address if the country is not specified. Check the documentation for detailed information about countries supported by Xsolla.
  • additionalFields The list of additional fields. This fields will be in a response if you send its in a request. Available fields media_list, order, long_description.

More about the use cases.

function GetBundle

Copy
Full screen
Small screen
1static void GetBundle(
2    string sku,
3    Action< BundleItem > onSuccess,
4    Action< Error > onError,
5    string locale =null,
6    string country =null
7)

Returns information about the contents of the specified bundle. In the bundle settings, display in the store must be enabled. If used after user authentication, the method returns items that match the personalization rules for the current user.

Parameters:

  • sku Bundle SKU.
  • onSuccess Called after the cart is successfully filled.
  • onError Called after the request resulted with an error.
  • locale Defines localization of the item text fields. Two-letter lowercase language code. Leave empty to use the default value.
  • country Country for which to calculate regional prices and restrictions in a catalog. Two-letter uppercase country code per ISO 3166-1 alpha-2. Calculations are based on the user’s IP address if the country is not specified. Check the documentation for detailed information about countries supported by Xsolla.

More about the use cases.

function RedeemCouponCode

Copy
Full screen
Small screen
1static void RedeemCouponCode(
2    string couponCode,
3    Action< CouponRedeemedItems > onSuccess,
4    Action< Error > onError
5)

Redeems the coupon code and delivers a reward to the user in one of the following ways:

Parameters:

  • couponCode Unique case sensitive code. Contains letters and numbers.

  • onSuccess Called after successful coupon redemption.

  • onError Called after the request resulted with an error.

  • to their inventory (virtual items, virtual currency packages, or bundles)

  • via email (game keys)

  • to the entitlement system (game keys)

More about the use cases.

function GetCouponRewards

Copy
Full screen
Small screen
1static void GetCouponRewards(
2    string couponCode,
3    Action< CouponReward > onSuccess,
4    Action< Error > onError
5)

Returns a list of items that can be credited to the user when the coupon is redeemed. Can be used to let users choose one of many items as a bonus. The usual case is choosing a DRM if the coupon contains a game as a bonus.

Parameters:

  • couponCode Unique case sensitive code. Contains letters and numbers.
  • onSuccess Called after receiving coupon rewards successfully.
  • onError Called after the request resulted with an error.

More about the use cases.

function CreateOrder

Copy
Full screen
Small screen
1static void CreateOrder(
2    string itemSku,
3    Action< OrderData > onSuccess,
4    Action< Error > onError,
5    PurchaseParams purchaseParams =null,
6    Dictionary< string, string > customHeaders =null,
7    SdkType sdkType =SdkType.Store
8)

Creates an order with a specified item. The created order will get a new order status.

Parameters:

  • itemSku Item SKU to purchase.
  • onSuccess Called after server response.
  • onError Called after the request resulted with an error.
  • purchaseParams Purchase parameters such as country, locale, and currency.
  • customHeaders Custom web request headers
  • sdkType SDK type. Used for internal analytics.

More about the use cases.

function CreateOrderByVirtualCurrency

Copy
Full screen
Small screen
1static void CreateOrderByVirtualCurrency(
2    string itemSku,
3    string priceSku,
4    Action< OrderId > onSuccess,
5    Action< Error > onError,
6    PurchaseParams purchaseParams =null,
7    string platform =null,
8    Dictionary< string, string > customHeaders =null
9)

Creates an order with a specified item, returns unique identifier of the created order and the Pay Station token for the purchase of the specified product by virtual currency. The created order will get a new order status.

Parameters:

  • itemSku Item SKU to purchase.
  • priceSku Virtual currency SKU.
  • onSuccess Called after server response.
  • onError Called after the request resulted with an error.
  • purchaseParams Purchase parameters such as country, locale, currency, and quantity.
  • platform Publishing platform the user plays on.

Can be xsolla (default), playstation_network, xbox_live, pc_standalone, nintendo_shop, google_play, app_store_ios, android_standalone, ios_standalone, android_other, ios_other, or pc_other.

  • customHeaders Custom HTTP request headers.

More about the use cases.

function CreateOrderWithFreeItem

Copy
Full screen
Small screen
1static void CreateOrderWithFreeItem(
2    string itemSku,
3    Action< OrderId > onSuccess,
4    Action< Error > onError,
5    PurchaseParams purchaseParams =null,
6    Dictionary< string, string > customHeaders =null
7)

Create order with specified free item. The created order will get a done order status.

Parameters:

  • itemSku Desired free item SKU.
  • onSuccess Called after the order was successfully created.
  • onError Called after the request resulted with an error.
  • purchaseParams Purchase parameters such as country, locale, and currency.
  • customHeaders Custom web request headers

More about the use cases.

function Purchase

Copy
Full screen
Small screen
 1static void Purchase(
 2    string itemSku,
 3    Action< OrderStatus > onSuccess,
 4    Action< Error > onError,
 5    Action< OrderData > onOrderCreated =null,
 6    Action< BrowserCloseInfo > onBrowseClosed =null,
 7    PurchaseParams purchaseParams =null,
 8    Dictionary< string, string > customHeaders =null,
 9    PlatformSpecificAppearance platformSpecificAppearance =null,
10    SdkType sdkType =SdkType.Store
11)

Launches purchase process for a specified item. This method encapsulates methods for creating an order, opening a payment UI, and tracking the order status.

Parameters:

  • itemSku Desired free item SKU.
  • onSuccess Called after the order transitions to the ‘done’ status.
  • onError Called after the request resulted with an error.
  • onOrderCreated Called after the order is created.
  • onBrowseClosed Called after the browser is closed. The event is tracked only when the payment UI is opened in the built-in browser. External browser events can’t be tracked.
  • purchaseParams Purchase and payment UI parameters, such as locale, currency, etc.
  • customHeaders Custom web request headers
  • platformSpecificAppearance Additional settings of payment UI appearance for different platforms.
  • sdkType SDK type. Used for internal analytics.

More about the use cases.

function PurchaseForVirtualCurrency

Copy
Full screen
Small screen
 1static void PurchaseForVirtualCurrency(
 2    string itemSku,
 3    string priceSku,
 4    Action< OrderStatus > onSuccess,
 5    Action< Error > onError,
 6    Action< OrderId > onOrderCreated =null,
 7    PurchaseParams purchaseParams =null,
 8    string platform =null,
 9    Dictionary< string, string > customHeaders =null,
10    SdkType sdkType =SdkType.Store
11)

Launch purchase process for a specified item by virtual currency. This method encapsulates methods for creating an order and tracking the order status.

Parameters:

  • itemSku Desired free item SKU.
  • priceSku Virtual currency SKU.
  • onSuccess Called after the order transitions to the ‘done’ status.
  • onError Called after the request resulted with an error.
  • onOrderCreated Called after the order is created.
  • purchaseParams Purchase parameters such as country, locale, and currency.
  • platform Publishing platform the user plays on.

Can be xsolla (default), playstation_network, xbox_live, pc_standalone, nintendo_shop, google_play, app_store_ios, android_standalone, ios_standalone, android_other, ios_other, or pc_other.

  • customHeaders Custom HTTP request headers.
  • sdkType SDK type. Used for internal analytics.

More about the use cases.

function PurchaseFreeItem

Copy
Full screen
Small screen
1static void PurchaseFreeItem(
2    string itemSku,
3    Action< OrderStatus > onSuccess,
4    Action< Error > onError,
5    Action< OrderId > onOrderCreated =null,
6    PurchaseParams purchaseParams =null,
7    Dictionary< string, string > customHeaders =null,
8    SdkType sdkType =SdkType.Store
9)

Launches purchase process for a specified free item. This method encapsulates methods for creating an order and tracking the order status.

Parameters:

  • itemSku Desired free item SKU.
  • onSuccess Called after the order transitions to the ‘done’ status.
  • onError Called after the request resulted with an error.
  • onOrderCreated Called after the order is created.
  • purchaseParams Purchase parameters such as country, locale, and currency.
  • customHeaders Custom HTTP request headers.
  • sdkType SDK type. Used for internal analytics.

More about the use cases.

function GetCatalog

Copy
Full screen
Small screen
1static void GetCatalog(
2    Action< StoreItems > onSuccess,
3    Action< Error > onError,
4    int limit =50,
5    int offset =0,
6    string locale =null,
7    string country =null,
8    string additionalFields ="long_description"
9)
Deprecated
Use GetItems instead.

Returns a list of virtual items according to pagination settings. The list includes items for which display in the store is enabled in the settings. For each virtual item, complete data is returned. If used after user authentication, the method returns items that match the personalization rules for the current user. Attention: The number of items returned in a single response is limited. The default and maximum value is 50 items per response. To get more data page by page, use limit and offset fields.

Parameters:

  • onSuccess Called after virtual items were successfully received.
  • onError Called after the request resulted with an error.
  • limit Limit for the number of elements on the page. The maximum number of elements on a page is 50.
  • offset Number of the element from which the list is generated (the count starts from 0).
  • locale Response language. Two-letter lowercase language code. Leave empty to use the default value.
  • country Country for which to calculate regional prices and restrictions in a catalog. Two-letter uppercase country code per ISO 3166-1 alpha-2. Calculations are based on the user’s IP address if the country is not specified. Check the documentation for detailed information about countries supported by Xsolla.
  • additionalFields The list of additional fields. These fields will be in a response if you send them in a request. Available fields media_list, order, and long_description.

More about the use cases.

Was this article helpful?
Thank you!
Is there anything we can improve? Message
We’re sorry to hear that
Please explain why this article wasn’t helpful to you. Message
Thank you for your feedback!
We’ll review your message and use it to help us improve your experience.
Last updated: October 27, 2026

Found a typo or other text error? Select the text and press Ctrl+Enter.

Report a problem
We always review our content. Your feedback helps us improve it.
Provide an email so we can follow up
Thank you for your feedback!
We couldn't send your feedback
Try again later or contact us at [email protected].