Xsolla::Inventory::XsollaInventory

Public Functions

Name
static voidGetVirtualCurrencyBalance(Action< VirtualCurrencyBalances > onSuccess, Action< Error > onError, string platform =null)
Returns the current user’s balance of virtual currency. For each virtual currency, complete data is returned.
static voidGetInventoryItems(Action< InventoryItems > onSuccess, Action< Error > onError, int limit =50, int offset =0, string locale =null, string platform =null)
Returns a list of virtual items from the user’s inventory according to pagination settings. For each virtual item, complete data is returned. 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 voidConsumeInventoryItem(ConsumeItem item, Action onSuccess, Action< Error > onError, string platform =null)
Consumes an inventory item. Use for only for consumable virtual items.
static voidGetTimeLimitedItems(Action< TimeLimitedItems > onSuccess, Action< Error > onError, string platform =null)
Returns a list of time-limited items from the user’s inventory. For each item, complete data is returned.

Public Functions Documentation

function GetVirtualCurrencyBalance

Copy
Full screen
Small screen
1static void GetVirtualCurrencyBalance(
2    Action< VirtualCurrencyBalances > onSuccess,
3    Action< Error > onError,
4    string platform =null
5)

Returns the current user’s balance of virtual currency. For each virtual currency, complete data is returned.

Parameters:

  • onSuccess Called after server response.
  • onError Called after virtual currency balance was successfully received.
  • 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.

More about the use cases.

function GetInventoryItems

Copy
Full screen
Small screen
1static void GetInventoryItems(
2    Action< InventoryItems > onSuccess,
3    Action< Error > onError,
4    int limit =50,
5    int offset =0,
6    string locale =null,
7    string platform =null
8)

Returns a list of virtual items from the user’s inventory according to pagination settings. For each virtual item, complete data is returned. 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 purchased 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 Defines localization of item’s text fields. Two-letter lowercase language code. Leave empty to use the default value.
  • 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.

More about the use cases.

function ConsumeInventoryItem

Copy
Full screen
Small screen
1static void ConsumeInventoryItem(
2    ConsumeItem item,
3    Action onSuccess,
4    Action< Error > onError,
5    string platform =null
6)

Consumes an inventory item. Use for only for consumable virtual items.

Parameters:

  • item Contains consume parameters.
  • onSuccess Called after successful inventory item consumption.
  • onError Called after the request resulted with an error.
  • 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.

More about the use cases.

function GetTimeLimitedItems

Copy
Full screen
Small screen
1static void GetTimeLimitedItems(
2    Action< TimeLimitedItems > onSuccess,
3    Action< Error > onError,
4    string platform =null
5)

Returns a list of time-limited items from the user’s inventory. For each item, complete data is returned.

Parameters:

  • onSuccess Called after list of user time limited items was successfully received.
  • onError Called after the request resulted with an error.
  • 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.

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