SDK for / Overview

UXsollaStoreSubsystem Class Reference

Inheritance diagram for UXsollaStoreSubsystem:

Public Member Functions

virtual void Initialize (FSubsystemCollectionBase &Collection) override
 
virtual void Deinitialize () override
 
void Initialize (const FString &InProjectId)
 
void GetVirtualItems (const FString &Locale, const FString &Country, const TArray< FString > &AdditionalFields, const FOnStoreItemsUpdate &SuccessCallback, const FOnError &ErrorCallback, const int Limit=50, const int Offset=0, const FString &AuthToken=TEXT(""))
 
void GetItemGroups (const FString &Locale, const FOnItemGroupsUpdate &SuccessCallback, const FOnError &ErrorCallback, const int Limit=50, const int Offset=0)
 
void GetVirtualCurrencies (const FString &Locale, const FString &Country, const TArray< FString > &AdditionalFields, const FOnVirtualCurrenciesUpdate &SuccessCallback, const FOnError &ErrorCallback, const int Limit=50, const int Offset=0)
 
void GetVirtualCurrencyPackages (const FString &Locale, const FString &Country, const TArray< FString > &AdditionalFields, const FOnVirtualCurrencyPackagesUpdate &SuccessCallback, const FOnError &ErrorCallback, const int Limit=50, const int Offset=0, const FString &AuthToken=TEXT(""))
 
void GetItemsListBySpecifiedGroup (const FString &ExternalId, const FString &Locale, const FString &Country, const TArray< FString > &AdditionalFields, const FOnGetItemsListBySpecifiedGroup &SuccessCallback, const FOnError &ErrorCallback, const int Limit=50, const int Offset=0, const FString &AuthToken=TEXT(""))
 
void GetAllItemsList (const FString &Locale, const FOnGetItemsList &SuccessCallback, const FOnError &ErrorCallback, const FString &AuthToken=TEXT(""))
 
void FetchPaymentToken (const FString &AuthToken, const FString &ItemSKU, const FString &Currency, const FString &Country, const FString &Locale, const FXsollaParameters CustomParameters, const FOnFetchTokenSuccess &SuccessCallback, const FOnError &ErrorCallback, const int32 Quantity=1, const FString &ExternalId=TEXT(""))
 
void FetchCartPaymentToken (const FString &AuthToken, const FString &CartId, const FString &Currency, const FString &Country, const FString &Locale, const FXsollaParameters CustomParameters, const FOnFetchTokenSuccess &SuccessCallback, const FOnError &ErrorCallback, const FString &ExternalId=TEXT(""))
 
void LaunchPaymentConsole (UObject *WorldContextObject, const int32 OrderId, const FString &AccessToken, const FOnStoreSuccessPayment &SuccessCallback, const FOnError &ErrorCallback, const FOnStoreBrowserClosed &BrowserClosedCallback)
 
void CheckOrder (const FString &AuthToken, const int32 OrderId, const FOnCheckOrder &SuccessCallback, const FOnError &ErrorCallback)
 
void CheckPendingOrder (const FString &AccessToken, const int32 OrderId, const FOnStoreSuccessPayment &SuccessCallback, const FOnError &ErrorCallback, bool bIsUserInvolvedToPayment=false)
 
void CreateOrderWithSpecifiedFreeItem (const FString &AuthToken, const FString &ItemSKU, const FOnPurchaseUpdate &SuccessCallback, const FOnError &ErrorCallback, const int32 Quantity=1)
 
void CreateOrderWithFreeCart (const FString &AuthToken, const FString &CartId, const FOnPurchaseUpdate &SuccessCallback, const FOnError &ErrorCallback)
 
void PurchaseStoreItem (const FStoreItem &StoreItem, const FXsollaPaymentTokenRequestPayload PaymentTokenRequestPayload, const FOnPurchaseUpdate &SuccessCallback, const FOnError &ErrorCallback)
 
void PurchaseCurrencyPackage (const FVirtualCurrencyPackage &CurrencyPackage, const FXsollaPaymentTokenRequestPayload PaymentTokenRequestPayload, const FOnPurchaseUpdate &SuccessCallback, const FOnError &ErrorCallback)
 
void ClearCart (const FString &AuthToken, const FString &CartId, const FOnStoreCartUpdate &SuccessCallback, const FOnError &ErrorCallback)
 
void UpdateCart (const FString &AuthToken, const FString &CartId, const FString &Currency, const FString &Locale, const FOnStoreCartUpdate &SuccessCallback, const FOnError &ErrorCallback)
 
void AddToCart (const FString &AuthToken, const FString &CartId, const FString &ItemSKU, const int32 Quantity, const FOnStoreCartUpdate &SuccessCallback, const FOnError &ErrorCallback)
 
void RemoveFromCart (const FString &AuthToken, const FString &CartId, const FString &ItemSKU, const FOnStoreCartUpdate &SuccessCallback, const FOnError &ErrorCallback)
 
void FillCartById (const FString &AuthToken, const FString &CartId, const TArray< FStoreCartItem > &Items, const FOnStoreCartUpdate &SuccessCallback, const FOnError &ErrorCallback)
 
void GetSpecifiedBundle (const FString &Sku, const FOnGetSpecifiedBundleUpdate &SuccessCallback, const FOnError &ErrorCallback, const FString &AuthToken=TEXT(""))
 
void GetBundles (const FString &Locale, const FString &Country, const TArray< FString > &AdditionalFields, const FOnGetListOfBundlesUpdate &SuccessCallback, const FOnError &ErrorCallback, const int Limit=50, const int Offset=0, const FString &AuthToken=TEXT(""))
 
void GetVirtualCurrency (const FString &CurrencySKU, const FString &Locale, const FString &Country, const TArray< FString > &AdditionalFields, const FOnCurrencyUpdate &SuccessCallback, const FOnError &ErrorCallback)
 
void GetVirtualCurrencyPackage (const FString &PackageSKU, const FString &Locale, const FString &Country, const TArray< FString > &AdditionalFields, const FOnCurrencyPackageUpdate &SuccessCallback, const FOnError &ErrorCallback)
 
void BuyItemWithVirtualCurrency (const FString &AuthToken, const FString &ItemSKU, const FString &CurrencySKU, const EXsollaPublishingPlatform Platform, const FOnPurchaseUpdate &SuccessCallback, const FOnError &ErrorCallback)
 
void GetPromocodeRewards (const FString &AuthToken, const FString &PromocodeCode, const FOnGetPromocodeRewardsUpdate &SuccessCallback, const FOnError &ErrorCallback)
 
void RedeemPromocode (const FString &AuthToken, const FString &PromocodeCode, const FOnPromocodeUpdate &SuccessCallback, const FOnError &ErrorCallback)
 
void RemovePromocodeFromCart (const FString &AuthToken, const FOnPromocodeUpdate &SuccessCallback, const FOnError &ErrorCallback)
 
void GetGamesList (const FString &Locale, const FString &Country, const TArray< FString > &AdditionalFields, const FOnStoreGamesUpdate &SuccessCallback, const FOnError &ErrorCallback, const int Limit=50, const int Offset=0)
 
void GetGamesListBySpecifiedGroup (const FString &ExternalId, const FString &Locale, const FString &Country, const TArray< FString > &AdditionalFields, const FOnGetGamesListBySpecifiedGroup &SuccessCallback, const FOnError &ErrorCallback, const int Limit=50, const int Offset=0)
 
void GetGameItem (const FString &GameSKU, const FString &Locale, const FString &Country, const TArray< FString > &AdditionalFields, const FOnGameUpdate &SuccessCallback, const FOnError &ErrorCallback)
 
void GetGameKeyItem (const FString &ItemSKU, const FString &Locale, const FString &Country, const TArray< FString > &AdditionalFields, const FOnGameKeyUpdate &SuccessCallback, const FOnError &ErrorCallback)
 
void GetGameKeysListBySpecifiedGroup (const FString &ExternalId, const FString &Locale, const FString &Country, const TArray< FString > &AdditionalFields, const FOnGetGameKeysListBySpecifiedGroup &SuccessCallback, const FOnError &ErrorCallback, const int Limit=50, const int Offset=0)
 
void GetDRMList (const FOnDRMListUpdate &SuccessCallback, const FOnError &ErrorCallback)
 
void GetOwnedGames (const FString &AuthToken, const TArray< FString > &AdditionalFields, const FOnOwnedGamesListUpdate &SuccessCallback, const FOnError &ErrorCallback, const int Limit=50, const int Offset=0, const bool bIsSandbox=false)
 
void RedeemGameCodeByClient (const FString &AuthToken, const FString &Code, const FOnRedeemGameCodeSuccess &SuccessCallback, const FOnError &ErrorCallback)
 
void GetSubscriptionPublicPlans (const TArray< int > PlanId, const TArray< FString > &PlanExternalId, const FString &Country, const FString &Locale, const FOnSubscriptionPublicPlansListUpdate &SuccessCallback, const FOnError &ErrorCallback, const int Limit=50, const int Offset=0)
 
void GetSubscriptionPlans (const FString &AuthToken, const TArray< int > PlanId, const TArray< FString > &PlanExternalId, const FString &Country, const FString &Locale, const FOnSubscriptionPlansListUpdate &SuccessCallback, const FOnError &ErrorCallback, const int Limit=50, const int Offset=0)
 
void GetSubscriptions (const FString &AuthToken, const FString &Locale, const FOnSubscriptionsListUpdate &SuccessCallback, const FOnError &ErrorCallback, const int Limit=50, const int Offset=0)
 
void GetSubscriptionDetails (const FString &AuthToken, const int32 SubscriptionId, const FString &Locale, const FOnGetSubscriptionDetailsSuccess &SuccessCallback, const FOnError &ErrorCallback)
 
void GetSubscriptionPurchaseUrl (const FString &AuthToken, const FString &PlanExternalId, const FString &Country, const FOnGetSubscriptionPayStationLinkSuccess &SuccessCallback, const FOnError &ErrorCallback)
 
void GetSubscriptionManagementUrl (const FString &AuthToken, const FString &Country, const FOnGetSubscriptionPayStationLinkSuccess &SuccessCallback, const FOnError &ErrorCallback)
 
void GetSubscriptionRenewalUrl (const FString &AuthToken, const int32 SubscriptionId, const FOnGetSubscriptionPayStationLinkSuccess &SuccessCallback, const FOnError &ErrorCallback)
 
void CancelSubscription (const FString &AuthToken, const int32 SubscriptionId, const FOnCancelSubscriptionSuccess &SuccessCallback, const FOnError &ErrorCallback)
 
TArray< FStoreItemGetVirtualItemsWithoutGroup () const
 
const FStoreItemsDataGetItemsData () const
 
const FStoreCartGetCart () const
 
const FString & GetPendingPaystationUrl () const
 
FString GetItemName (const FString &ItemSKU) const
 
const FStoreItemFindItemBySku (const FString &ItemSku, bool &bHasFound) const
 
const FVirtualCurrencyPackageFindVirtualCurrencyPackageBySku (const FString &ItemSku, bool &bHasFound) const
 
bool IsItemInCart (const FString &ItemSKU) const
 

Public Attributes

FOnCartUpdate OnCartUpdate
 

Protected Member Functions

void GetVirtualItems_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnStoreItemsUpdate SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void GetItemGroups_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnItemGroupsUpdate SuccessCallback, FOnError ErrorCallback)
 
void GetVirtualCurrencies_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnVirtualCurrenciesUpdate SuccessCallback, FOnError ErrorCallback)
 
void GetVirtualCurrencyPackages_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnVirtualCurrencyPackagesUpdate SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void GetItemsListBySpecifiedGroup_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnGetItemsListBySpecifiedGroup SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void GetAllItemsList_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnGetItemsList SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void FetchPaymentToken_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnFetchTokenSuccess SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void CheckOrder_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnCheckOrder SuccessCallback, FOnError ErrorCallback)
 
void CreateOrderWithSpecifiedFreeItem_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnPurchaseUpdate SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void CreateOrderWithFreeCart_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnPurchaseUpdate SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void CreateCart_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnStoreCartUpdate SuccessCallback, FOnError ErrorCallback)
 
void ClearCart_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnStoreCartUpdate SuccessCallback, FOnError ErrorCallback)
 
void UpdateCart_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnStoreCartUpdate SuccessCallback, FOnError ErrorCallback)
 
void AddToCart_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnStoreCartUpdate SuccessCallback, FOnError ErrorCallback)
 
void RemoveFromCart_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnStoreCartUpdate SuccessCallback, FOnError ErrorCallback)
 
void FillCartById_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnStoreCartUpdate SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void GetListOfBundles_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnGetListOfBundlesUpdate SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void GetSpecifiedBundle_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnGetSpecifiedBundleUpdate SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void GetVirtualCurrency_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnCurrencyUpdate SuccessCallback, FOnError ErrorCallback)
 
void GetVirtualCurrencyPackage_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnCurrencyPackageUpdate SuccessCallback, FOnError ErrorCallback)
 
void BuyItemWithVirtualCurrency_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnPurchaseUpdate SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void GetPromocodeRewards_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnGetPromocodeRewardsUpdate SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void RedeemPromocode_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnPromocodeUpdate SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void RemovePromocodeFromCart_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnPromocodeUpdate SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void GetGamesList_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnStoreGamesUpdate SuccessCallback, FOnError ErrorCallback)
 
void GetGamesListBySpecifiedGroup_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnGetGamesListBySpecifiedGroup SuccessCallback, FOnError ErrorCallback)
 
void GetGameItem_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnGameUpdate SuccessCallback, FOnError ErrorCallback)
 
void GetGameKeyItem_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnGameKeyUpdate SuccessCallback, FOnError ErrorCallback)
 
void GetGameKeysListBySpecifiedGroup_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnGetGameKeysListBySpecifiedGroup SuccessCallback, FOnError ErrorCallback)
 
void GetDRMList_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnDRMListUpdate SuccessCallback, FOnError ErrorCallback)
 
void GetOwnedGames_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnOwnedGamesListUpdate SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void RedeemGameCodeByClient_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnRedeemGameCodeSuccess SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void GetSubscriptionPublicPlans_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnSubscriptionPublicPlansListUpdate SuccessCallback, FOnError ErrorCallback)
 
void GetSubscriptionPlans_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnSubscriptionPlansListUpdate SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void GetSubscriptions_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnSubscriptionsListUpdate SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void GetSubscriptionDetails_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnGetSubscriptionDetailsSuccess SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void GetSubscriptionPaystationLink_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnGetSubscriptionPayStationLinkSuccess SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void CancelSubscription_HttpRequestComplete (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnCancelSubscriptionSuccess SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void HandleRequestError (XsollaHttpRequestError ErrorData, FOnError ErrorCallback)
 
void HandlePurchaseFreeItemsRequest (FHttpRequestPtr HttpRequest, FHttpResponsePtr HttpResponse, const bool bSucceeded, FOnPurchaseUpdate SuccessCallback, FErrorHandlersWrapper ErrorHandlersWrapper)
 
void LoadData ()
 
void SaveData ()
 
bool IsSandboxEnabled () const
 
void InnerPurchase (const FString &Sku, bool bIsFree, const TArray< FXsollaVirtualCurrencyPrice > &VirtualPrices, const FXsollaPaymentTokenRequestPayload PaymentTokenRequestPayload, const FOnPurchaseUpdate &SuccessCallback, const FOnError &ErrorCallback)
 
void FetchTokenCallback (const FString &AccessToken, int32 InOrderId)
 
void BuyVirtualOrFreeItemCallback (int32 InOrderId)
 
void CheckPendingOrderSuccessCallback ()
 

Protected Attributes

FString ProjectID
 
FStoreItemsData ItemsData
 
FStoreCart Cart
 
FVirtualCurrencyPackagesData VirtualCurrencyPackages
 
FString CachedCartCurrency
 
FString CachedAuthToken
 
FString CachedCartId
 
FString CachedCartLocale
 
FString PengindPaystationUrl
 
UXsollaStoreBrowserWrapperMyBrowser
 

Member Function Documentation

◆ AddToCart()

void UXsollaStoreSubsystem::AddToCart (const FString & AuthToken,
const FString & CartId,
const FString & ItemSKU,
const int32 Quantity,
const FOnStoreCartUpdate & SuccessCallback,
const FOnError & ErrorCallback 
)

Updates the quantity of a previously added item in the cart with the specified ID or in the current user cart. If there is no item with the specified SKU in the cart, it will be added. More about the use cases.

Parameters
AuthTokenUser authorization token obtained during authorization using Xsolla Login (more about authorization options).
CartId(optional) Identifier of a cart to which item will be added. The current user cart will be modified if empty.
ItemSKUDesired item SKU.
QuantityNumber of items to be added to the cart.
SuccessCallbackCalled after successfully adding a new item to the cart.
ErrorCallbackCalled after the request resulted with an error.

◆ BuyItemWithVirtualCurrency()

void UXsollaStoreSubsystem::BuyItemWithVirtualCurrency (const FString & AuthToken,
const FString & ItemSKU,
const FString & CurrencySKU,
const EXsollaPublishingPlatform Platform,
const FOnPurchaseUpdate & SuccessCallback,
const FOnError & ErrorCallback 
)

Creates an order with a specified item. The created order will get a new order status. More about the use cases.

Parameters
AuthTokenUser authorization token obtained during authorization using Xsolla Login (more about authorization options).
ItemSKUDesired item SKU.
CurrencySKUCurrency to buy virtual items with. Three-letter currency code per ISO 4217 (USD by default).
PlatformPublishing 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.
SuccessCallbackCalled after the successful item purchase.
ErrorCallbackCalled after the request resulted with an error.

◆ CancelSubscription()

void UXsollaStoreSubsystem::CancelSubscription (const FString & AuthToken,
const int32 SubscriptionId,
const FOnCancelSubscriptionSuccess & SuccessCallback,
const FOnError & ErrorCallback 
)

Changes a regular subscription status to non_renewing (subscription is automatically canceled after expiration). More about the use cases.

Parameters
AuthTokenUser authorization token obtained during authorization using Xsolla Login (more about authorization options).
SubscriptionIdSubscription ID.
SuccessCallbackCalled after successful subscription cancelling.
ErrorCallbackCalled after the request resulted with an error.

◆ CheckOrder()

void UXsollaStoreSubsystem::CheckOrder (const FString & AuthToken,
const int32 OrderId,
const FOnCheckOrder & SuccessCallback,
const FOnError & ErrorCallback 
)

Checks pending order status by its ID.

Parameters
AuthTokenUser authorization token.
OrderIdIdentifier of order to be checked.
SuccessCallbackCallback function called after successful order check. Order status will be received.
ErrorCallbackCallback function called after the request resulted with an error.

◆ CheckPendingOrder()

void UXsollaStoreSubsystem::CheckPendingOrder (const FString & AccessToken,
const int32 OrderId,
const FOnStoreSuccessPayment & SuccessCallback,
const FOnError & ErrorCallback,
bool bIsUserInvolvedToPayment = false 
)

Checks pending order.

Parameters
AccessTokenPayment token used during purchase processing.
OrderIdIdentifier of order.
SuccessCallbackCalled after the payment was successfully completed.
ErrorCallbackCalled after the request resulted with an error.
bIsUserInvolvedToPaymentWhether payment UI involved in purchase. true for purchase for real currency. false for free item purchase and purchase for virtual currency

◆ ClearCart()

void UXsollaStoreSubsystem::ClearCart (const FString & AuthToken,
const FString & CartId,
const FOnStoreCartUpdate & SuccessCallback,
const FOnError & ErrorCallback 
)

Removes all items from the cart with the specified ID or from the cart of the current user. More about the use cases.

Parameters
AuthTokenUser authorization token obtained during authorization using Xsolla Login (more about authorization options).
CartId(optional) Identifier of a cart to be cleared.
SuccessCallbackCalled after successful cart clearing.
ErrorCallbackCalled after the request resulted with an error.

◆ CreateOrderWithFreeCart()

void UXsollaStoreSubsystem::CreateOrderWithFreeCart (const FString & AuthToken,
const FString & CartId,
const FOnPurchaseUpdate & SuccessCallback,
const FOnError & ErrorCallback 
)

Create order with free cart. The created order will get a done order status. More about the use cases.

Parameters
AuthTokenUser authorization token obtained during authorization using Xsolla Login (more about authorization options).
CartId(optional) Identifier of the cart for the purchase. The current user cart will be purchased if empty.
SuccessCallbackCalled after the payment was successfully completed.
ErrorCallbackCalled after the request resulted with an error.

◆ CreateOrderWithSpecifiedFreeItem()

void UXsollaStoreSubsystem::CreateOrderWithSpecifiedFreeItem (const FString & AuthToken,
const FString & ItemSKU,
const FOnPurchaseUpdate & SuccessCallback,
const FOnError & ErrorCallback,
const int32 Quantity = 1 
)

Create order with specified free item. The created order will get a done order status. More about the use cases.

Parameters
AuthTokenUser authorization token obtained during authorization using Xsolla Login (more about authorization options).
ItemSKUDesired free item SKU.
SuccessCallbackCalled after the payment was successfully completed.
ErrorCallbackCalled after the request resulted with an error.
QuantityItem quantity.

◆ FetchCartPaymentToken()

void UXsollaStoreSubsystem::FetchCartPaymentToken (const FString & AuthToken,
const FString & CartId,
const FString & Currency,
const FString & Country,
const FString & Locale,
const FXsollaParameters CustomParameters,
const FOnFetchTokenSuccess & SuccessCallback,
const FOnError & ErrorCallback,
const FString & ExternalId = TEXT("") 
)

Creates an order with items from the cart with the specified ID or from the cart of the current user. Returns the payment token and order ID. More about the use cases.

Parameters
AuthTokenUser authorization token obtained during authorization using Xsolla Login (more about authorization options).
CartId(optional) Identifier of the cart for the purchase. The current user cart will be purchased if empty.
Currency(optional) Desired payment currency. Three-letter currency code per ISO 4217 (USD by default). Leave empty to use the default value.
Country(optional) Desired payment country ISO code. Leave empty to use the default value.
Locale(optional) Desired payment locale. Leave empty to use the default value.
CustomParameters(optional) Map of custom parameters. Leave empty to use the default value.
SuccessCallbackCalled after the payment token was successfully fetched.
ErrorCallbackCalled after the request resulted with an error.
ExternalId(optional) Transaction external ID.

◆ FetchPaymentToken()

void UXsollaStoreSubsystem::FetchPaymentToken (const FString & AuthToken,
const FString & ItemSKU,
const FString & Currency,
const FString & Country,
const FString & Locale,
const FXsollaParameters CustomParameters,
const FOnFetchTokenSuccess & SuccessCallback,
const FOnError & ErrorCallback,
const int32 Quantity = 1,
const FString & ExternalId = TEXT("") 
)

Initiates an item purchase session and fetches token for payment console. More about the use cases.

Parameters
AuthTokenUser authorization token obtained during authorization using Xsolla Login (more about authorization options).
ItemSKUDesired item SKU.
Currency(optional) Desired payment currency. Three-letter currency code per ISO 4217 (USD by default). Leave empty to use the default value.
Country(optional) Desired payment country.
Two-letter uppercase country code per ISO 3166-1 alpha-2.
Leave empty to use the default value.
Locale(optional) Desired payment locale.
The following languages are supported: Arabic (ar), Bulgarian (bg), Czech (cs), German (de), Spanish (es), French (fr), Hebrew (he), Italian (it), Japanese (ja), Korean (ko), Polish (pl), Portuguese (pt), Romanian (ro), Russian (ru), Thai (th), Turkish (tr), Vietnamese (vi), Chinese Simplified (cn), Chinese Traditional (tw), English (en, default).
Leave empty to use the default value.
CustomParameters(optional) Map of custom parameters. Leave empty to use the default value.
SuccessCallbackCalled after payment token was successfully fetched.
ErrorCallbackCalled after the request resulted with an error.
QuantityItem quantity.
ExternalId(optional) Transaction external ID.

◆ FillCartById()

void UXsollaStoreSubsystem::FillCartById (const FString & AuthToken,
const FString & CartId,
const TArray< FStoreCartItem > & Items,
const FOnStoreCartUpdate & SuccessCallback,
const FOnError & ErrorCallback 
)

Fills the cart with the specified ID or the cart of the current user with items. If there is already an item with the same SKU in the cart, the existing item position will be replaced by the passed value. More about the use cases.

Parameters
AuthTokenUser authorization token obtained during authorization using Xsolla Login (more about authorization options).
CartId(optional) Identifier of cart which will be filled.
ItemsItem for filling the cart. If there is already an item with the same SKU in the cart, the existing item position will be replaced by the passed value.
SuccessCallbackCalled after cart is successfully filled.
ErrorCallbackCalled after the request resulted with an error.

◆ FindItemBySku()

const FStoreItem & UXsollaStoreSubsystem::FindItemBySku (const FString & ItemSku,
bool & bHasFound 
) const

Returns item from the cache with the given SKU.

◆ FindVirtualCurrencyPackageBySku()

const FVirtualCurrencyPackage & UXsollaStoreSubsystem::FindVirtualCurrencyPackageBySku (const FString & ItemSku,
bool & bHasFound 
) const

Returns package from the cache with the given SKU.

◆ GetAllItemsList()

void UXsollaStoreSubsystem::GetAllItemsList (const FString & Locale,
const FOnGetItemsList & SuccessCallback,
const FOnError & ErrorCallback,
const FString & AuthToken = TEXT("") 
)

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. More about the use cases.

Parameters
LocaleResponse language.
The following languages are supported: Arabic (ar), Bulgarian (bg), Czech (cs), German (de), Spanish (es), French (fr), Hebrew (he), Italian (it), Japanese (ja), Korean (ko), Polish (pl), Portuguese (pt), Romanian (ro), Russian (ru), Thai (th), Turkish (tr), Vietnamese (vi), Chinese Simplified (cn), Chinese Traditional (tw), English (en, default).
Leave empty to use the default value.
SuccessCallbackCalled after server response.
ErrorCallbackCalled after the request resulted with an error.
AuthTokenUser authorization token obtained during authorization using Xsolla Login (more about authorization options). Can be empty. If specified, the method returns items that match the personalization rules for the current user.

◆ GetBundles()

void UXsollaStoreSubsystem::GetBundles (const FString & Locale,
const FString & Country,
const TArray< FString > & AdditionalFields,
const FOnGetListOfBundlesUpdate & SuccessCallback,
const FOnError & ErrorCallback,
const int Limit = 50,
const int Offset = 0,
const FString & AuthToken = TEXT("") 
)

Returns a list of bundles according to pagination settings. The list includes bundles for which display in the store is enabled in the settings. More about the use cases.

Parameters
LocaleResponse language.
The following languages are supported: Arabic (ar), Bulgarian (bg), Czech (cs), German (de), Spanish (es), French (fr), Hebrew (he), Italian (it), Japanese (ja), Korean (ko), Polish (pl), Portuguese (pt), Romanian (ro), Russian (ru), Thai (th), Turkish (tr), Vietnamese (vi), Chinese Simplified (cn), Chinese Traditional (tw), English (en, default).
CountryCountry to calculate regional prices and restrictions to catalog. Two-letter uppercase country code per ISO 3166-1 alpha-2. Calculated based on the user's IP address if not specified.
AdditionalFieldsThe list of additional fields. These fields will be in a response if you send it in a request. Available fields media_list, order, and long_description.
SuccessCallbackCalled after bundles are successfully received.
ErrorCallbackCalled after the request resulted with an error.
LimitLimit for the number of elements on the page. The maximum number of elements on a page is 50.
OffsetNumber of the element from which the list is generated (the count starts from 0).
AuthTokenUser authorization token obtained during authorization using Xsolla Login (more about authorization options). Can be empty. If specified, the method returns items that match the personalization rules for the current user.

◆ GetCart()

const FStoreCart & UXsollaStoreSubsystem::GetCart () const

Returns cached cart data

◆ GetDRMList()

void UXsollaStoreSubsystem::GetDRMList (const FOnDRMListUpdate & SuccessCallback,
const FOnError & ErrorCallback 
)

Returns the list of available DRMs.

Parameters
SuccessCallbackCalled after successful request of specified DRM data.
ErrorCallbackCalled after the request resulted with an error.

◆ GetGameItem()

void UXsollaStoreSubsystem::GetGameItem (const FString & GameSKU,
const FString & Locale,
const FString & Country,
const TArray< FString > & AdditionalFields,
const FOnGameUpdate & SuccessCallback,
const FOnError & ErrorCallback 
)

Returns a game item with the specified SKU for the catalog.

Parameters
GameSKUDesired game SKU.
LocaleResponse language. Two-letter lowercase language code per ISO 639-1.
CountryCountry 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.
AdditionalFieldsThe list of additional fields. These fields will be in a response if you send it in a request. Available fields media_list, order, and long_description.
SuccessCallbackCalled after successful request of specified game data.
ErrorCallbackCalled after the request resulted with an error.

◆ GetGameKeyItem()

void UXsollaStoreSubsystem::GetGameKeyItem (const FString & ItemSKU,
const FString & Locale,
const FString & Country,
const TArray< FString > & AdditionalFields,
const FOnGameKeyUpdate & SuccessCallback,
const FOnError & ErrorCallback 
)

Get Game Key Item Returns a game key item with the specified SKU for the catalog.

Parameters
ItemSKUDesired game item SKU.
LocaleResponse language. Two-letter lowercase language code per ISO 639-1.
CountryCountry 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.
AdditionalFieldsThe list of additional fields. These fields will be in a response if you send it in a request. Available fields media_list, order, and long_description.
SuccessCallbackCalled after successful request of specified game data.
ErrorCallbackCalled after the request resulted with an error.

◆ GetGameKeysListBySpecifiedGroup()

void UXsollaStoreSubsystem::GetGameKeysListBySpecifiedGroup (const FString & ExternalId,
const FString & Locale,
const FString & Country,
const TArray< FString > & AdditionalFields,
const FOnGetGameKeysListBySpecifiedGroup & SuccessCallback,
const FOnError & ErrorCallback,
const int Limit = 50,
const int Offset = 0 
)

Returns a game key list from the specified group for building a catalog.

Parameters
ExternalIdGroup external ID.
LocaleResponse language.
The following languages are supported: Arabic (ar), Bulgarian (bg), Czech (cs), German (de), Spanish (es), French (fr), Hebrew (he), Italian (it), Japanese (ja), Korean (ko), Polish (pl), Portuguese (pt), Romanian (ro), Russian (ru), Thai (th), Turkish (tr), Vietnamese (vi), Chinese Simplified (cn), Chinese Traditional (tw), English (en, default).
CountryCountry 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 in not specified.
AdditionalFieldsThe list of additional fields. These fields will be in a response if you send it in a request. Available fields media_list, order, and long_description.
SuccessCallbackCalled after successful request of specified game key data.
ErrorCallbackCalled after the request resulted with an error.
LimitLimit for the number of elements on the page.
OffsetNumber of the element from which the list is generated (the count starts from 0).

◆ GetGamesList()

void UXsollaStoreSubsystem::GetGamesList (const FString & Locale,
const FString & Country,
const TArray< FString > & AdditionalFields,
const FOnStoreGamesUpdate & SuccessCallback,
const FOnError & ErrorCallback,
const int Limit = 50,
const int Offset = 0 
)

Returns list of games for building a catalog.

Parameters
LocaleResponse language.
The following languages are supported: Arabic (ar), Bulgarian (bg), Czech (cs), German (de), Spanish (es), French (fr), Hebrew (he), Italian (it), Japanese (ja), Korean (ko), Polish (pl), Portuguese (pt), Romanian (ro), Russian (ru), Thai (th), Turkish (tr), Vietnamese (vi), Chinese Simplified (cn), Chinese Traditional (tw), English (en, default).
CountryCountry for which to calculate regional prices and restrictions in a catalog. Two-letter uppercase country code per ISO 3166-1 alpha-2. Calcualtions are based on the user's IP address if the country is not specified.
AdditionalFieldsThe list of additional fields. These fields will be in a response if you send it in a request. Available fields media_list, order, and long_description.
SuccessCallbackCalled after successful request of specified games list data.
ErrorCallbackCalled after the request resulted with an error.
LimitLimit for the number of elements on the page.
OffsetNumber of the element from which the list is generated (the count starts from 0).

◆ GetGamesListBySpecifiedGroup()

void UXsollaStoreSubsystem::GetGamesListBySpecifiedGroup (const FString & ExternalId,
const FString & Locale,
const FString & Country,
const TArray< FString > & AdditionalFields,
const FOnGetGamesListBySpecifiedGroup & SuccessCallback,
const FOnError & ErrorCallback,
const int Limit = 50,
const int Offset = 0 
)

Returns the list of games from the specified group for building a catalog.

Parameters
ExternalIdGroup external ID.
LocaleResponse language.
The following languages are supported: Arabic (ar), Bulgarian (bg), Czech (cs), German (de), Spanish (es), French (fr), Hebrew (he), Italian (it), Japanese (ja), Korean (ko), Polish (pl), Portuguese (pt), Romanian (ro), Russian (ru), Thai (th), Turkish (tr), Vietnamese (vi), Chinese Simplified (cn), Chinese Traditional (tw), English (en, default).
CountryCountry 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.
AdditionalFieldsThe list of additional fields. These fields will be in a response if you send it in a request. Available fields media_list, order, and long_description.
SuccessCallbackCalled after successful request of specified game list data.
ErrorCallbackCalled after the request resulted with an error.
LimitLimit for the number of elements on the page.
OffsetNumber of the element from which the list is generated (the count starts from 0).

◆ GetItemGroups()

void UXsollaStoreSubsystem::GetItemGroups (const FString & Locale,
const FOnItemGroupsUpdate & SuccessCallback,
const FOnError & ErrorCallback,
const int Limit = 50,
const int Offset = 0 
)

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

Parameters
Locale(optional) Response language (e.g. item name, item description).
The following languages are supported: Arabic (ar), Bulgarian (bg), Czech (cs), German (de), Spanish (es), French (fr), Hebrew (he), Italian (it), Japanese (ja), Korean (ko), Polish (pl), Portuguese (pt), Romanian (ro), Russian (ru), Thai (th), Turkish (tr), Vietnamese (vi), Chinese Simplified (cn), Chinese Traditional (tw), English (en, default).
Leave empty to use the default value.
SuccessCallbackCalled after virtual item groups were successfully received.
ErrorCallbackCalled after the request resulted with an error.
LimitLimit for the number of elements on the page.
OffsetNumber of the element from which the list is generated (the count starts from 0).

◆ GetItemName()

FString UXsollaStoreSubsystem::GetItemName (const FString & ItemSKU) const

Returns name of the cached item with the given SKU.

◆ GetItemsData()

const FStoreItemsData & UXsollaStoreSubsystem::GetItemsData () const

Returns cached items data.

◆ GetItemsListBySpecifiedGroup()

void UXsollaStoreSubsystem::GetItemsListBySpecifiedGroup (const FString & ExternalId,
const FString & Locale,
const FString & Country,
const TArray< FString > & AdditionalFields,
const FOnGetItemsListBySpecifiedGroup & SuccessCallback,
const FOnError & ErrorCallback,
const int Limit = 50,
const int Offset = 0,
const FString & AuthToken = TEXT("") 
)

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. More about the use cases.

Parameters
ExternalIdGroup external ID.
LocaleResponse language.
The following languages are supported: Arabic (ar), Bulgarian (bg), Czech (cs), German (de), Spanish (es), French (fr), Hebrew (he), Italian (it), Japanese (ja), Korean (ko), Polish (pl), Portuguese (pt), Romanian (ro), Russian (ru), Thai (th), Turkish (tr), Vietnamese (vi), Chinese Simplified (cn), Chinese Traditional (tw), English (en, default).
Leave empty to use the default value.
CountryCountry to calculate regional prices and restrictions to catalog. Two-letter uppercase country code per ISO 3166-1 alpha-2. By default, it is determined by the user's IP address.
AdditionalFieldsThe list of additional fields. These fields will be in a response if you send it in a request. Available fields media_list, order, and long_description.
SuccessCallbackCalled after server response.
ErrorCallbackCalled after the request resulted with an error.
LimitLimit for the number of elements on the page. The maximum number of elements on a page is 50.
OffsetNumber of the element from which the list is generated (the count start from 0).
AuthTokenUser authorization token obtained during authorization using Xsolla Login (more about authorization options). Can be empty. If specified, the method returns items that match the personalization rules for the current user.

◆ GetOwnedGames()

void UXsollaStoreSubsystem::GetOwnedGames (const FString & AuthToken,
const TArray< FString > & AdditionalFields,
const FOnOwnedGamesListUpdate & SuccessCallback,
const FOnError & ErrorCallback,
const int Limit = 50,
const int Offset = 0,
const bool bIsSandbox = false 
)

Returns the list of games owned by the user. The response will contain an array of games owned by a particular user.

Parameters
AuthTokenUser authorization token obtained during authorization using Xsolla Login (more about authorization options).
AdditionalFieldsThe list of additional fields. These fields will be in a response if you send it in a request. Available fields attributes.
SuccessCallbackCalled after successful request of specified owned games data.
ErrorCallbackCalled after the request resulted with an error.
LimitLimit for the number of elements on the page.
OffsetNumber of the element from which the list is generated (the count starts from 0).
bIsSandboxWhat type of entitlements should be returned. If the parameter is set to true, the entitlements received by the user in the sandbox mode only are returned. If the parameter is set to false, the entitlements received by the user in the live mode only are returned.

◆ GetPendingPaystationUrl()

const FString & UXsollaStoreSubsystem::GetPendingPaystationUrl () const

Returns the pending PayStation URL to be opened in browser.

◆ GetPromocodeRewards()

void UXsollaStoreSubsystem::GetPromocodeRewards (const FString & AuthToken,
const FString & PromocodeCode,
const FOnGetPromocodeRewardsUpdate & SuccessCallback,
const FOnError & ErrorCallback 
)

Returns a list of items that can be credited to the user when the promo code is redeemed. Allows users to choose from several available items. More about the use cases.

Parameters
AuthTokenUser authorization token obtained during authorization using Xsolla Login (more about authorization options).
PromocodeCodeUnique case sensitive code. Contains letters and numbers.
SuccessCallbackCalled after successfully receiving promocode rewards.
ErrorCallbackCalled after the request resulted with an error.

◆ GetSpecifiedBundle()

void UXsollaStoreSubsystem::GetSpecifiedBundle (const FString & Sku,
const FOnGetSpecifiedBundleUpdate & SuccessCallback,
const FOnError & ErrorCallback,
const FString & AuthToken = TEXT("") 
)

Returns information about the contents of the specified bundle. In the bundle settings, display in the store must be enabled. More about the use cases.

Parameters
SkuBundle SKU.
SuccessCallbackCalled after the cart is successfully filled.
ErrorCallbackCalled after the request resulted with an error.
AuthTokenUser authorization token obtained during authorization using Xsolla Login (more about authorization options). Can be empty. If specified, the method returns items that match the personalization rules for the current user.

◆ GetSubscriptionDetails()

void UXsollaStoreSubsystem::GetSubscriptionDetails (const FString & AuthToken,
const int32 SubscriptionId,
const FString & Locale,
const FOnGetSubscriptionDetailsSuccess & SuccessCallback,
const FOnError & ErrorCallback 
)

Returns information about a subscription by its ID. Subscription can be have any status. More about the use cases.

Parameters
AuthTokenUser authorization token obtained during authorization using Xsolla Login (more about authorization options).
SubscriptionIdSubscription ID.
LocaleLanguage of the UI. By default, it is determined by the user's IP address.
Can be enforced by using language code: The following languages are supported: Arabic (ar), Bulgarian (bg), Czech (cs), German (de), Spanish (es), French (fr), Hebrew (he), Italian (it), Japanese (ja), Korean (ko), Polish (pl), Portuguese (pt), Romanian (ro), Russian (ru), Thai (th), Turkish (tr), Vietnamese (vi), Chinese Simplified (cn), Chinese Traditional (tw), English (en).
SuccessCallbackCalled after subscription data have been successfully recieved.
ErrorCallbackCalled after the request resulted with an error.

◆ GetSubscriptionManagementUrl()

void UXsollaStoreSubsystem::GetSubscriptionManagementUrl (const FString & AuthToken,
const FString & Country,
const FOnGetSubscriptionPayStationLinkSuccess & SuccessCallback,
const FOnError & ErrorCallback 
)

Returns the URL of the management interface for the selected subscription. More about the use cases.

Parameters
AuthTokenUser authorization token obtained during authorization using Xsolla Login (more about authorization options).
CountryUser's country. Two-letter uppercase country code per ISO 3166-1 alpha-2. Affects the choice of locale and currency. By default, it is determined by the user's IP address.
SuccessCallbackCalled after the URL has been successfully recieved.
ErrorCallbackCalled after the request resulted with an error.

◆ GetSubscriptionPlans()

void UXsollaStoreSubsystem::GetSubscriptionPlans (const FString & AuthToken,
const TArray< int > PlanId,
const TArray< FString > & PlanExternalId,
const FString & Country,
const FString & Locale,
const FOnSubscriptionPlansListUpdate & SuccessCallback,
const FOnError & ErrorCallback,
const int Limit = 50,
const int Offset = 0 
)

Returns a list of plans available to authorized users, including plans purchased by the user while promotions are active. More about the use cases.

Parameters
AuthTokenUser authorization token obtained during authorization using Xsolla Login (more about authorization options).
PlanIdArray of subscription plan IDs. Plan ID can be found in the URL of the subscription details page in Publisher Account ( https://publisher.xsolla.com/{merchant_id}/projects/{project_id}/subscriptions/plans/{merplan_id}).
PlanExternalIdArray of subscription plan external IDs (32 characters per ID). Plan external ID can be found in Publisher Account in the Subscriptions > Subscription plans section next to the plan name.
CountryUser's country. Affects the choice of locale and currency. Two-letter uppercase country code per ISO 3166-1 alpha-2. By default, it is determined by the user's IP address.
LocaleLanguage of the UI. By default, it is determined by the user's IP address.
Can be enforced by using language code: The following languages are supported: Arabic (ar), Bulgarian (bg), Czech (cs), German (de), Spanish (es), French (fr), Hebrew (he), Italian (it), Japanese (ja), Korean (ko), Polish (pl), Portuguese (pt), Romanian (ro), Russian (ru), Thai (th), Turkish (tr), Vietnamese (vi), Chinese Simplified (cn), Chinese Traditional (tw), English (en).
SuccessCallbackCalled after a list of plans has been successfully recieved.
ErrorCallbackCalled after the request resulted with an error.
LimitLimit for the number of elements on the page (15 elements are displayed by default).
OffsetNumber of elements from which the list is generated (the count starts from 0).

◆ GetSubscriptionPublicPlans()

void UXsollaStoreSubsystem::GetSubscriptionPublicPlans (const TArray< int > PlanId,
const TArray< FString > & PlanExternalId,
const FString & Country,
const FString & Locale,
const FOnSubscriptionPublicPlansListUpdate & SuccessCallback,
const FOnError & ErrorCallback,
const int Limit = 50,
const int Offset = 0 
)

Returns a list of all plans, including plans purchased by the user while promotions are active. More about the use cases.

Parameters
PlanIdArray of subscription plan IDs. Plan ID can be found in the URL of the subscription details page in Publisher Account ( https://publisher.xsolla.com/{merchant_id}/projects/{project_id}/subscriptions/plans/{merplan_id}).
PlanExternalIdArray of subscription plan external IDs (32 characters per ID). Plan external ID can be found in Publisher Account in the Subscriptions > Subscription plans section next to the plan name.
User'scountry. Affects the choice of locale and currency. Two-letter uppercase country code per ISO 3166-1 alpha-2. By default, it is determined by the user's IP address.
LocaleLanguage of the UI. By default, it is determined by the user's IP address.
Can be enforced by using language code: The following languages are supported: Arabic (ar), Bulgarian (bg), Czech (cs), German (de), Spanish (es), French (fr), Hebrew (he), Italian (it), Japanese (ja), Korean (ko), Polish (pl), Portuguese (pt), Romanian (ro), Russian (ru), Thai (th), Turkish (tr), Vietnamese (vi), Chinese Simplified (cn), Chinese Traditional (tw), English (en).
SuccessCallbackCalled after public plans have been successfully recieved.
ErrorCallbackCalled after the request resulted with an error.
LimitLimit for the number of elements on the page (15 elements are displayed by default).
OffsetNumber of elements from which the list is generated (the count starts from 0).

◆ GetSubscriptionPurchaseUrl()

void UXsollaStoreSubsystem::GetSubscriptionPurchaseUrl (const FString & AuthToken,
const FString & PlanExternalId,
const FString & Country,
const FOnGetSubscriptionPayStationLinkSuccess & SuccessCallback,
const FOnError & ErrorCallback 
)

Returns Pay Station URL for the subscription purchase. More about the use cases.

Parameters
AuthTokenUser authorization token obtained during authorization using Xsolla Login (more about authorization options).
PlanExternalIdSubscription plan external ID (32 characters). Plan external ID can be found in Publisher Account in the Subscriptions > Subscription plans section next to the plan name.
CountryUser's country. Affects the choice of locale and currency. Two-letter uppercase country code per ISO 3166-1 alpha-2. By default, it is determined by the user's IP address.
SuccessCallbackCalled after the URL has been successfully recieved.
ErrorCallbackCalled after the request resulted with an error.

◆ GetSubscriptionRenewalUrl()

void UXsollaStoreSubsystem::GetSubscriptionRenewalUrl (const FString & AuthToken,
const int32 SubscriptionId,
const FOnGetSubscriptionPayStationLinkSuccess & SuccessCallback,
const FOnError & ErrorCallback 
)

Returns the URL of the renewal interface for the selected subscription More about the use cases.

Parameters
AuthTokenUser authorization token obtained during authorization using Xsolla Login (more about authorization options).
SubscriptionIdSubscription ID.
SuccessCallbackCalled after the URL has been successfully recieved.
ErrorCallbackCalled after the request resulted with an error.

◆ GetSubscriptions()

void UXsollaStoreSubsystem::GetSubscriptions (const FString & AuthToken,
const FString & Locale,
const FOnSubscriptionsListUpdate & SuccessCallback,
const FOnError & ErrorCallback,
const int Limit = 50,
const int Offset = 0 
)

Returns a list of active recurrent subscriptions that have the status active, non renewing, and pause. More about the use cases.

Parameters
AuthTokenUser authorization token obtained during authorization using Xsolla Login (more about authorization options).
LocaleLanguage of the UI. By default, it is determined by the user's IP address.
Can be enforced by using language code: The following languages are supported: Arabic (ar), Bulgarian (bg), Czech (cs), German (de), Spanish (es), French (fr), Hebrew (he), Italian (it), Japanese (ja), Korean (ko), Polish (pl), Portuguese (pt), Romanian (ro), Russian (ru), Thai (th), Turkish (tr), Vietnamese (vi), Chinese Simplified (cn), Chinese Traditional (tw), English (en).
SuccessCallbackCalled after the list pf subscriptions has been successfully recieved.
ErrorCallbackCalled after the request resulted with an error.
LimitLimit for the number of elements on the page (15 elements are displayed by default).
OffsetNumber of elements from which the list is generated (the count starts from 0).

◆ GetVirtualCurrencies()

void UXsollaStoreSubsystem::GetVirtualCurrencies (const FString & Locale,
const FString & Country,
const TArray< FString > & AdditionalFields,
const FOnVirtualCurrenciesUpdate & SuccessCallback,
const FOnError & ErrorCallback,
const int Limit = 50,
const int Offset = 0 
)

Returns a list of virtual currencies according to pagination settings. More about the use cases.

Parameters
LocaleResponse language.
The following languages are supported: Arabic (ar), Bulgarian (bg), Czech (cs), German (de), Spanish (es), French (fr), Hebrew (he), Italian (it), Japanese (ja), Korean (ko), Polish (pl), Portuguese (pt), Romanian (ro), Russian (ru), Thai (th), Turkish (tr), Vietnamese (vi), Chinese Simplified (cn), Chinese Traditional (tw), English (en, default).
Leave empty to use the default value.
CountryCountry to calculate regional prices and restrictions to catalog. Two-letter uppercase country code per ISO 3166-1 alpha-2. By default, it is determined by the user's IP address.
AdditionalFieldsThe list of additional fields. These fields will be in a response if you send it in a request. Available fields media_list, order and long_description.
SuccessCallbackCalled after virtual currencies were successfully received.
ErrorCallbackCalled after the request resulted with an error.
LimitLimit for the number of elements on the page. The maximum number of elements on a page is 50.
OffsetNumber of the element from which the list is generated (the count starts from 0).

◆ GetVirtualCurrency()

void UXsollaStoreSubsystem::GetVirtualCurrency (const FString & CurrencySKU,
const FString & Locale,
const FString & Country,
const TArray< FString > & AdditionalFields,
const FOnCurrencyUpdate & SuccessCallback,
const FOnError & ErrorCallback 
)

Returns virtual currency with specified SKU.

Parameters
CurrencySKUDesired currency SKU.
LocaleResponse language.
The following languages are supported: The following languages are supported: Arabic (ar), Bulgarian (bg), Czech (cs), German (de), Spanish (es), French (fr), Hebrew (he), Italian (it), Japanese (ja), Korean (ko), Polish (pl), Portuguese (pt), Romanian (ro), Russian (ru), Thai (th), Turkish (tr), Vietnamese (vi), Chinese Simplified (cn), Chinese Traditional (tw), English (en, default).
Leave empty to use the default value.
CountryCountry to calculate regional prices and restrictions to catalog. Two-letter uppercase country code per ISO 3166-1 alpha-2. Calculated based on the user's IP address if not specified.
AdditionalFieldsThe list of additional fields. These fields will be in a response if you send it in a request. Available fields media_list, order, and long_description.
SuccessCallbackCalled after successful request of specified virtual currency data.
ErrorCallbackCalled after the request resulted with an error.

◆ GetVirtualCurrencyPackage()

void UXsollaStoreSubsystem::GetVirtualCurrencyPackage (const FString & PackageSKU,
const FString & Locale,
const FString & Country,
const TArray< FString > & AdditionalFields,
const FOnCurrencyPackageUpdate & SuccessCallback,
const FOnError & ErrorCallback 
)

Returns a list of virtual currency packages according to pagination settings. The maximum number of elements on a page is 50. The list includes packages for which display in the store is enabled in the settings. More about the use cases.

Parameters
PackageSKUDesired currency package SKU.
LocaleResponse language.
The following languages are supported: Arabic (ar), Bulgarian (bg), Czech (cs), German (de), Spanish (es), French (fr), Hebrew (he), Italian (it), Japanese (ja), Korean (ko), Polish (pl), Portuguese (pt), Romanian (ro), Russian (ru), Thai (th), Turkish (tr), Vietnamese (vi), Chinese Simplified (cn), Chinese Traditional (tw), English (en, default).
Leave empty to use the default value.
CountryCountry to calculate regional prices and restrictions to catalog. Two-letter uppercase country code per ISO 3166-1 alpha-2. Calculated based on the user's IP address if not specified.
AdditionalFieldsThe list of additional fields. These fields will be in a response if you send it in a request. Available fields media_list, order and long_description.
SuccessCallbackCalled after successful request of specified virtual currency package data.
ErrorCallbackCalled after the request resulted with an error.

◆ GetVirtualCurrencyPackages()

void UXsollaStoreSubsystem::GetVirtualCurrencyPackages (const FString & Locale,
const FString & Country,
const TArray< FString > & AdditionalFields,
const FOnVirtualCurrencyPackagesUpdate & SuccessCallback,
const FOnError & ErrorCallback,
const int Limit = 50,
const int Offset = 0,
const FString & AuthToken = TEXT("") 
)

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. More about the use cases.

Parameters
LocaleResponse language.
The following languages are supported: Arabic (ar), Bulgarian (bg), Czech (cs), German (de), Spanish (es), French (fr), Hebrew (he), Italian (it), Japanese (ja), Korean (ko), Polish (pl), Portuguese (pt), Romanian (ro), Russian (ru), Thai (th), Turkish (tr), Vietnamese (vi), Chinese Simplified (cn), Chinese Traditional (tw), English (en, default).
Leave empty to use the default value.
CountryCountry to calculate regional prices and restrictions to catalog. Two-letter uppercase country code per ISO 3166-1 alpha-2. By default, it is determined by the user's IP address.
AdditionalFieldsThe list of additional fields. These fields will be in a response if you send it in a request. Available fields media_list, order, and long_description.
SuccessCallbackCalled after virtual currency packages were successfully received.
ErrorCallbackCalled after the request resulted with an error.
LimitLimit for the number of elements on the page. The maximum number of elements on a page is 50.
OffsetNumber of the element from which the list is generated (the count starts from 0).
AuthTokenUser authorization token obtained during authorization using Xsolla Login (more about authorization options). Can be empty. If specified, the method returns items that match the personalization rules for the current user.

◆ GetVirtualItems()

void UXsollaStoreSubsystem::GetVirtualItems (const FString & Locale,
const FString & Country,
const TArray< FString > & AdditionalFields,
const FOnStoreItemsUpdate & SuccessCallback,
const FOnError & ErrorCallback,
const int Limit = 50,
const int Offset = 0,
const FString & AuthToken = TEXT("") 
)

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. More about the use cases.

Parameters
LocaleResponse language.
The following languages are supported: Arabic (ar), Bulgarian (bg), Czech (cs), German (de), Spanish (es), French (fr), Hebrew (he), Italian (it), Japanese (ja), Korean (ko), Polish (pl), Portuguese (pt), Romanian (ro), Russian (ru), Thai (th), Turkish (tr), Vietnamese (vi), Chinese Simplified (cn), Chinese Traditional (tw), English (en, default).
Leave empty to use the default value.
CountryCountry to calculate regional prices and restrictions to catalog. Two-letter uppercase country code per ISO 3166-1 alpha-2. Calculated based on the user's IP address if not specified.
AdditionalFieldsThe list of additional fields. These fields will be in a response if you send it in a request. Available fields media_list, order and long_description.
SuccessCallbackCalled after virtual items were successfully received.
ErrorCallbackCalled after the request resulted with an error.
LimitLimit for the number of elements on the page. The maximum number of elements on a page is 50.
OffsetNumber of the element from which the list is generated (the count starts from 0).
AuthTokenUser authorization token obtained during authorization using Xsolla Login (more about authorization options). Can be empty. If specified, the method returns items that match the personalization rules for the current user.

◆ GetVirtualItemsWithoutGroup()

TArray< FStoreItem > UXsollaStoreSubsystem::GetVirtualItemsWithoutGroup () const

Returns the list of cached virtual items without any Category provided.

◆ HandleRequestError()

void UXsollaStoreSubsystem::HandleRequestError (XsollaHttpRequestError ErrorData,
FOnError ErrorCallback 
)
protected

Return true if error is happened

◆ Initialize()

void UXsollaStoreSubsystem::Initialize (const FString & InProjectId)

Initializes the controller with the provided Project ID (used to override project settings).

Parameters
InProjectIdNew Project ID value from Publisher Account. It can be found in Publisher Account next to the name of your project.

◆ IsItemInCart()

bool UXsollaStoreSubsystem::IsItemInCart (const FString & ItemSKU) const

Checks if the certain item is in the cart.

◆ IsSandboxEnabled()

bool UXsollaStoreSubsystem::IsSandboxEnabled () const
protected

Check whether sandbox is enabled

◆ LaunchPaymentConsole()

void UXsollaStoreSubsystem::LaunchPaymentConsole (UObject * WorldContextObject,
const int32 OrderId,
const FString & AccessToken,
const FOnStoreSuccessPayment & SuccessCallback,
const FOnError & ErrorCallback,
const FOnStoreBrowserClosed & BrowserClosedCallback 
)

Opens payment UI for the provided access token. More about the use cases:

Parameters
WorldContextObjectThe world context.
OrderIdOrder identifier.
AccessTokenPayment token used during purchase processing.
SuccessCallbackCalled after the payment was successfully completed.
ErrorCallbackCalled after the request resulted with an error.
BrowserClosedCallbackCalled 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.

◆ LoadData()

void UXsollaStoreSubsystem::LoadData ()
protected

Load save game and extract data

◆ PurchaseCurrencyPackage()

void UXsollaStoreSubsystem::PurchaseCurrencyPackage (const FVirtualCurrencyPackageCurrencyPackage,
const FXsollaPaymentTokenRequestPayload PaymentTokenRequestPayload,
const FOnPurchaseUpdate & SuccessCallback,
const FOnError & ErrorCallback 
)

Initiate purchase by passing virtual currency package

Parameters
CurrencyPackageDesired currency package.
PaymentTokenRequestPayload(optional).
SuccessCallbackCalled after the payment was successfully completed.
ErrorCallbackCalled after the request resulted with an error.

◆ PurchaseStoreItem()

void UXsollaStoreSubsystem::PurchaseStoreItem (const FStoreItemStoreItem,
const FXsollaPaymentTokenRequestPayload PaymentTokenRequestPayload,
const FOnPurchaseUpdate & SuccessCallback,
const FOnError & ErrorCallback 
)

Initiates purchase by passing store item

Parameters
StoreItemDesired store item.
PaymentTokenRequestPayload(optional)
SuccessCallbackCalled after the payment was successfully completed.
ErrorCallbackCalled after the request resulted with an error.

◆ RedeemGameCodeByClient()

void UXsollaStoreSubsystem::RedeemGameCodeByClient (const FString & AuthToken,
const FString & Code,
const FOnRedeemGameCodeSuccess & SuccessCallback,
const FOnError & ErrorCallback 
)

Grants an entitlement by a provided game code.

Parameters
AuthTokenUser authorization token obtained during authorization using Xsolla Login (more about authorization options).
CodeGame code.
SuccessCallbackCalled after successful redemption.
ErrorCallbackCalled after the request resulted with an error.

◆ RedeemPromocode()

void UXsollaStoreSubsystem::RedeemPromocode (const FString & AuthToken,
const FString & PromocodeCode,
const FOnPromocodeUpdate & SuccessCallback,
const FOnError & ErrorCallback 
)

Redeems a promo code. After activating the promo code, the user gets free items and/or the price of the cart is reduced. More about the use cases.

Parameters
AuthTokenUser authorization token obtained during authorization using Xsolla Login (more about authorization options).
PromocodeCodeUnique case sensitive code. Contains letters and numbers.
SuccessCallbackCalled after successful promocode redemption.
ErrorCallbackCalled after the request resulted with an error.

◆ RemoveFromCart()

void UXsollaStoreSubsystem::RemoveFromCart (const FString & AuthToken,
const FString & CartId,
const FString & ItemSKU,
const FOnStoreCartUpdate & SuccessCallback,
const FOnError & ErrorCallback 
)

Removes the item from the cart with the specified ID or from the cart of the current user. More about the use cases.

Parameters
AuthTokenUser authorization token obtained during authorization using Xsolla Login (more about authorization options).
CartId(optional) Identifier of a cart from which the item will be removed.
ItemSKUDesired item SKU.
SuccessCallbackCalled after successfully removing an item from the cart.
ErrorCallbackCalled after the request resulted with an error.

◆ RemovePromocodeFromCart()

void UXsollaStoreSubsystem::RemovePromocodeFromCart (const FString & AuthToken,
const FOnPromocodeUpdate & SuccessCallback,
const FOnError & ErrorCallback 
)

Removes a promo code from a cart. After the promo code is removed, the total price of all items in the cart will be recalculated without bonuses and discounts provided by a promo code More about the use cases.

Parameters
AuthTokenUser authorization token obtained during authorization using Xsolla Login (more about authorization options).
SuccessCallbackCalled after successful promocode redemption.
ErrorCallbackCalled after the request resulted with an error.

◆ SaveData()

void UXsollaStoreSubsystem::SaveData ()
protected

Save cached data or reset one if necessary

◆ UpdateCart()

void UXsollaStoreSubsystem::UpdateCart (const FString & AuthToken,
const FString & CartId,
const FString & Currency,
const FString & Locale,
const FOnStoreCartUpdate & SuccessCallback,
const FOnError & ErrorCallback 
)

Returns a list of items from the cart with the specified ID or from the cart of the current user. For each item, complete data is returned. More about the use cases.

Parameters
AuthTokenUser authorization token obtained during authorization using Xsolla Login (more about authorization options).
CartId(optional) Identifier of the cart to be updated. The current user cart will be updated if empty.
CurrencyThe currency in which prices are displayed (USD by default). Three-letter currency code per ISO 4217.
LocaleResponse language.
The following languages are supported: Arabic (ar), Bulgarian (bg), Czech (cs), German (de), Spanish (es), French (fr), Hebrew (he), Italian (it), Japanese (ja), Korean (ko), Polish (pl), Portuguese (pt), Romanian (ro), Russian (ru), Thai (th), Turkish (tr), Vietnamese (vi), Chinese Simplified (cn), Chinese Traditional (tw), English (en, default).
SuccessCallbackCalled after local cache of cart items was successfully updated.
ErrorCallbackCalled after the request resulted with an error.

Member Data Documentation

◆ CachedAuthToken

FString UXsollaStoreSubsystem::CachedAuthToken
protected

Cached auth token (used for silent cart update)

◆ CachedCartCurrency

FString UXsollaStoreSubsystem::CachedCartCurrency
protected

Cached cart desired currency (used for silent cart update)

◆ CachedCartId

FString UXsollaStoreSubsystem::CachedCartId
protected

Cached cart identifier (used for silent cart update)

◆ CachedCartLocale

FString UXsollaStoreSubsystem::CachedCartLocale
protected

Cached cart locale (used for silent cart update)

◆ Cart

FStoreCart UXsollaStoreSubsystem::Cart
protected

Current cart

◆ ItemsData

FStoreItemsData UXsollaStoreSubsystem::ItemsData
protected

Cached virtual items list

◆ OnCartUpdate

FOnCartUpdate UXsollaStoreSubsystem::OnCartUpdate

Event occurred when the cart was changed or updated.

◆ PengindPaystationUrl

FString UXsollaStoreSubsystem::PengindPaystationUrl
protected

Pending PayStation URL to be opened in browser

◆ ProjectID

FString UXsollaStoreSubsystem::ProjectID
protected

Cached Xsolla Store project id

◆ VirtualCurrencyPackages

FVirtualCurrencyPackagesData UXsollaStoreSubsystem::VirtualCurrencyPackages
protected

Cached virtual currency packages


The documentation for this class was generated from the following file: