Xsolla::Catalog::XsollaCatalog
Public Functions
| Name | |
|---|---|
| static void | GetItems(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 void | GetPaginatedItems(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 void | GetCatalogSimplified(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 void | GetGroupItems(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 void | GetPaginatedGroupItems(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 void | GetItemGroups(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 void | GetVirtualCurrencyList(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 void | GetPaginatedVirtualCurrencyList(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 void | GetVirtualCurrencyPackagesList(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 void | GetPaginatedVirtualCurrencyPackagesList(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 void | GetBundles(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 void | GetPaginatedBundles(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 void | GetBundle(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 void | RedeemCouponCode(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 void | GetCouponRewards(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 void | CreateOrder(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 void | CreateOrderByVirtualCurrency(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 void | CreateOrderWithFreeItem(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 void | Purchase(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 void | PurchaseForVirtualCurrency(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 void | PurchaseFreeItem(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 void | 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
- C#
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, andlong_description. - sdkType SDK type. Used for internal analytics.
function GetPaginatedItems
- C#
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, andlong_description. - sdkType SDK type. Used for internal analytics.
function GetCatalogSimplified
- C#
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.
function GetGroupItems
- C#
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.
function GetPaginatedGroupItems
- C#
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.
function GetItemGroups
- C#
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.
function GetVirtualCurrencyList
- C#
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, andlong_description.
function GetPaginatedVirtualCurrencyList
- C#
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, andlong_description.
function GetVirtualCurrencyPackagesList
- C#
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, andlong_description. - sdkType SDK type. Used for internal analytics.
function GetPaginatedVirtualCurrencyPackagesList
- C#
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, andlong_description. - sdkType SDK type. Used for internal analytics.
function GetBundles
- C#
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.
function GetPaginatedBundles
- C#
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.
function GetBundle
- C#
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.
function RedeemCouponCode
- C#
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)
function GetCouponRewards
- C#
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.
function CreateOrder
- C#
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, andcurrency. - customHeaders Custom web request headers
- sdkType SDK type. Used for internal analytics.
function CreateOrderByVirtualCurrency
- C#
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, andquantity. - 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.
function CreateOrderWithFreeItem
- C#
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, andcurrency. - customHeaders Custom web request headers
function Purchase
- C#
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.
function PurchaseForVirtualCurrency
- C#
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, andcurrency. - 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.
function PurchaseFreeItem
- C#
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, andcurrency. - customHeaders Custom HTTP request headers.
- sdkType SDK type. Used for internal analytics.
function GetCatalog
- C#
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)
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, andlong_description.
Found a typo or other text error? Select the text and press Ctrl+Enter.