Skip to main content

Client Economy API Reference

PGOS provides a series of services to help you build a in-game economy, including virtual currencies, in-game items, stores, and inventory.

API List

APIDescription
GetBalancesGet all balances of the player.
GetStoreGet the specified store defined on the portal.
GetStoreWithPlatformGet the specified store defined on the portal. This interface can get the value of 'platform_item_mapping'.
GetStoreBriefsGet brief information of specified stores.
GetStoreCategoriesGet the specified store categories defined on the portal.
CreateStoreOrderCreate an order before purchase the specified store item in the store. After committing the order, the PGOS virtual server events event_item_granted/event_currency_changed will be triggered.
CommitStoreOrderAfter committing the order, the payment will be deducted and the items will be dispatched. The PGOS virtual server events event_item_granted/event_currency_changed will be triggered. The event_custom_data filled in the parameter CreateStoreOrderParams will be passed to these events.
QueryStoreOrderQuery order status.
GetInventoryGet all item instances in the player's inventory.
GetInventoryWithFilterGet all item instances in the player's inventory.
ConsumeInstanceConsume the specified item instance in the player's inventory. The virtual server function bound to the consumer action will be called.
OpenContainerInstanceOpen the specified container instance in the player's inventory. The PGOS virtual server events event_item_revoked and event_item_granted/event_currency_changed will be triggered.
RevokeInstanceRevoke the specified item instance in the player's inventory. The PGOS virtual server event event_item_revoked will be triggered.
SetInstanceTagsUpdate the tags data of the specified item instance in the player's inventory. Instance tags can have up to 32 keys, with each key limited to 128 bytes and each value limited to 1024 bytes(in a narrow-character string).
CheckBeforePlatformPurchaseCheck before purchasing items on 3rd-party platforms. Used to check situations where items cannot be purchased due to unique items, mapping configuration, etc.
SyncPlayerPlatformInventorySynchronize the 3rd-party platform's inventory to PGOS. It is recommended to call it once after logging in to PGOS. The PGOS virtual server events event_item_granted/event_currency_changed will be triggered.
SyncSteamPlayerInventorySynchronize the Steam platform's inventory to PGOS. It is recommended to call it once after logging in to PGOS. The PGOS virtual server events event_item_granted/event_currency_changed will be triggered.
SyncSteamPurchaseSynchronize item instances purchased by players from Steam to PGOS. The PGOS virtual server events event_item_granted/event_currency_changed will be triggered.
SyncXboxPlayerInventorySynchronize the Xbox platform's inventory to PGOS. It is recommended to call it once after logging in to PGOS. The PGOS virtual server events event_item_granted/event_currency_changed will be triggered.
SyncXboxPurchaseSynchronize item instances purchased by players from Xbox to PGOS. The PGOS virtual server events event_item_granted/event_currency_changed will be triggered.

Event List

EventDescription
OnInventoryGrantedThe event will be triggered when new item instances are granted to player's inventory.
OnBalanceUpdatedThe event will be triggered when any currency amount changed.

API Details

GetBalances

Get all balances of the player.

/**
* Get all balances of the player.
*
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void GetBalances(
TFunction<void(const FPgosResult& Ret, const FPgosClientGetBalancesResult* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientGetBalancesResult* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

GetStore

Get the specified store defined on the portal.

/**
* Get the specified store defined on the portal.
*
* @param Params Request params.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void GetStore(
const FPgosClientGetStoreParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosClientStore* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientGetStoreParams&Request params.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientStore* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

GetStoreWithPlatform

Get the specified store defined on the portal. This interface can get the value of 'platform_item_mapping'.

Deprecated, use GetStore instead.

/**
* Get the specified store defined on the portal. This interface can get the value of 'platform_item_mapping'.
* [DEPRECATED!!!] GetStoreWithPlatform was declared deprecated, consider using GetStore instead.
*
* @param Params Request params.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void GetStoreWithPlatform(
const FPgosClientGetStoreWithPlatformParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosClientStore* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientGetStoreWithPlatformParams&Request params.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientStore* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

GetStoreBriefs

Get brief information of specified stores.

/**
* Get brief information of specified stores.
*
* @param Params Request params.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void GetStoreBriefs(
const FPgosClientGetStoreBriefsParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosClientGetStoreBriefsResult* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientGetStoreBriefsParams&Request params.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientGetStoreBriefsResult* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

GetStoreCategories

Get the specified store categories defined on the portal.

/**
* Get the specified store categories defined on the portal.
*
* @param Params Request params.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void GetStoreCategories(
const FPgosClientGetStoreCategoriesParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosClientGetStoreCategoriesResult* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientGetStoreCategoriesParams&Request params.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientGetStoreCategoriesResult* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

CreateStoreOrder

Create an order before purchase the specified store item in the store. After committing the order, the PGOS virtual server events event_item_granted/event_currency_changed will be triggered.

/**
* Create an order before purchase the specified store item in the store.
*
* After committing the order, the PGOS virtual server events `event_item_granted`/`event_currency_changed` will be triggered.
*
* @param Params Request params.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void CreateStoreOrder(
const FPgosClientCreateStoreOrderParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosClientCreateStoreOrderResult* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientCreateStoreOrderParams&Request params.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientCreateStoreOrderResult* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

CommitStoreOrder

After committing the order, the payment will be deducted and the items will be dispatched. The PGOS virtual server events event_item_granted/event_currency_changed will be triggered. The event_custom_data filled in the parameter CreateStoreOrderParams will be passed to these events.

/**
* After committing the order, the payment will be deducted and the items will be dispatched.
*
* The PGOS virtual server events `event_item_granted`/`event_currency_changed` will be triggered.
* The `event_custom_data` filled in the parameter `CreateStoreOrderParams` will be passed to these events.
*
* @param Params Request params.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void CommitStoreOrder(
const FPgosClientCommitStoreOrderParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosClientCommitStoreOrderResult* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientCommitStoreOrderParams&Request params.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientCommitStoreOrderResult* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

QueryStoreOrder

Query order status.

/**
* Query order status.
*
* @param Params Request params.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void QueryStoreOrder(
const FPgosClientQueryStoreOrderParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosClientQueryStoreOrderResult* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientQueryStoreOrderParams&Request params.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientQueryStoreOrderResult* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

GetInventory

Get all item instances in the player's inventory.

/**
* Get all item instances in the player's inventory.
*
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void GetInventory(
TFunction<void(const FPgosResult& Ret, const FPgosItemInstPack* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosItemInstPack* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

GetInventoryWithFilter

Get all item instances in the player's inventory.

/**
* Get all item instances in the player's inventory.
*
* @param Params Request params.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void GetInventoryWithFilter(
const FPgosClientGetInventoryWithFilterParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosItemInstPack* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientGetInventoryWithFilterParams&Request params.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosItemInstPack* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

ConsumeInstance

Consume the specified item instance in the player's inventory. The virtual server function bound to the consumer action will be called.

/**
* Consume the specified item instance in the player's inventory.
*
* The virtual server function bound to the consumer action will be called.
*
* @param Params Request params.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void ConsumeInstance(
const FPgosClientConsumeInstanceParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosClientConsumeInstanceResult* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientConsumeInstanceParams&Request params.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientConsumeInstanceResult* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

OpenContainerInstance

Open the specified container instance in the player's inventory. The PGOS virtual server events event_item_revoked and event_item_granted/event_currency_changed will be triggered.

/**
* Open the specified container instance in the player's inventory.
*
* The PGOS virtual server events `event_item_revoked` and `event_item_granted`/`event_currency_changed` will be triggered.
*
* @param Params Request params.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void OpenContainerInstance(
const FPgosClientOpenContainerInstanceParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosClientOpenContainerResult* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientOpenContainerInstanceParams&Request params.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientOpenContainerResult* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

RevokeInstance

Revoke the specified item instance in the player's inventory. The PGOS virtual server event event_item_revoked will be triggered.

/**
* Revoke the specified item instance in the player's inventory.
*
* The PGOS virtual server event `event_item_revoked` will be triggered.
*
* @param Params Request params.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void RevokeInstance(
const FPgosClientRevokeInstanceParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosClientInstanceOperationResult* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientRevokeInstanceParams&Request params.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientInstanceOperationResult* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

SetInstanceTags

Update the tags data of the specified item instance in the player's inventory. Instance tags can have up to 32 keys, with each key limited to 128 bytes and each value limited to 1024 bytes(in a narrow-character string).

/**
* Update the `tags` data of the specified item instance in the player's inventory.
* Instance `tags` can have up to 32 keys, with each key limited to 128 bytes and each value limited to 1024 bytes(in a narrow-character string).
*
* @param Params Request params.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void SetInstanceTags(
const FPgosClientSetInstanceTagsParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosClientSetInstanceTagsResult* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientSetInstanceTagsParams&Request params.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientSetInstanceTagsResult* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

CheckBeforePlatformPurchase

Check before purchasing items on 3rd-party platforms. Used to check situations where items cannot be purchased due to unique items, mapping configuration, etc.

/**
* Check before purchasing items on 3rd-party platforms. Used to check situations where items cannot be purchased due to unique items, mapping configuration, etc.
*
* @param Params Request params.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void CheckBeforePlatformPurchase(
const FPgosClientCheckBeforePlatformPurchaseParams& Params,
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientCheckBeforePlatformPurchaseParams&Request params.
ResultCallbackTFunction<void(const FPgosResult& Ret)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

SyncPlayerPlatformInventory

Synchronize the 3rd-party platform's inventory to PGOS. It is recommended to call it once after logging in to PGOS. The PGOS virtual server events event_item_granted/event_currency_changed will be triggered.

Deprecated, use SyncSteamPlayerInventory/SyncXboxPlayerInventory instead.

/**
* Synchronize the 3rd-party platform's inventory to PGOS.
* It is recommended to call it once after logging in to PGOS.
*
* The PGOS virtual server events `event_item_granted`/`event_currency_changed` will be triggered.
* [DEPRECATED!!!] SyncPlayerPlatformInventory was declared deprecated, consider using SyncSteamPlayerInventory/SyncXboxPlayerInventory instead.
*
* @param Params Request params.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void SyncPlayerPlatformInventory(
const FPgosClientSyncPlayerPlatformInventoryParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosClientSyncPlayerPlatformInventoryResult* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientSyncPlayerPlatformInventoryParams&Request params.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientSyncPlayerPlatformInventoryResult* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

SyncSteamPlayerInventory

Synchronize the Steam platform's inventory to PGOS. It is recommended to call it once after logging in to PGOS. The PGOS virtual server events event_item_granted/event_currency_changed will be triggered.

/**
* Synchronize the Steam platform's inventory to PGOS.
* It is recommended to call it once after logging in to PGOS.
*
* The PGOS virtual server events `event_item_granted`/`event_currency_changed` will be triggered.
*
* @param Params Request params.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void SyncSteamPlayerInventory(
const FPgosClientSyncSteamPlayerInventoryParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosClientSyncSteamPurchaseResult* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientSyncSteamPlayerInventoryParams&Request params.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientSyncSteamPurchaseResult* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

SyncSteamPurchase

Synchronize item instances purchased by players from Steam to PGOS. The PGOS virtual server events event_item_granted/event_currency_changed will be triggered.

/**
* Synchronize item instances purchased by players from Steam to PGOS.
*
* The PGOS virtual server events `event_item_granted`/`event_currency_changed` will be triggered.
*
* @param Params Request params.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void SyncSteamPurchase(
const FPgosClientSyncSteamPurchaseParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosClientSyncSteamPurchaseResult* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientSyncSteamPurchaseParams&Request params.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientSyncSteamPurchaseResult* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

SyncXboxPlayerInventory

Synchronize the Xbox platform's inventory to PGOS. It is recommended to call it once after logging in to PGOS. The PGOS virtual server events event_item_granted/event_currency_changed will be triggered.

/**
* Synchronize the Xbox platform's inventory to PGOS.
* It is recommended to call it once after logging in to PGOS.
*
* The PGOS virtual server events `event_item_granted`/`event_currency_changed` will be triggered.
*
* @param Params Request params.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void SyncXboxPlayerInventory(
const FPgosClientSyncXboxPlayerInventoryParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosClientSyncXboxPurchaseResult* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientSyncXboxPlayerInventoryParams&Request params.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientSyncXboxPurchaseResult* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

SyncXboxPurchase

Synchronize item instances purchased by players from Xbox to PGOS. The PGOS virtual server events event_item_granted/event_currency_changed will be triggered.

/**
* Synchronize item instances purchased by players from Xbox to PGOS.
*
* The PGOS virtual server events `event_item_granted`/`event_currency_changed` will be triggered.
*
* @param Params Request params.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void SyncXboxPurchase(
const FPgosClientSyncXboxPurchaseParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosClientSyncXboxPurchaseResult* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientSyncXboxPurchaseParams&Request params.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientSyncXboxPurchaseResult* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

Event Details

OnInventoryGranted

The event will be triggered when new item instances are granted to player's inventory.

/**
* OnInventoryGranted:
* The event will be triggered when new item instances are granted to player's inventory.
*
* @param Event Event result.
*/
DECLARE_MULTICAST_DELEGATE_OneParam(FOnInventoryGranted, const FPgosClientInventoryGrantedEvt& /*Event*/);
FOnInventoryGranted& OnInventoryGranted() { return InventoryGrantedDelegate; }

Type Reference:

OnBalanceUpdated

The event will be triggered when any currency amount changed.

/**
* OnBalanceUpdated:
* The event will be triggered when any currency amount changed.
*
* @param Event Event result.
*/
DECLARE_MULTICAST_DELEGATE_OneParam(FOnBalanceUpdated, const FPgosClientBalanceUpdatedEvt& /*Event*/);
FOnBalanceUpdated& OnBalanceUpdated() { return BalanceUpdatedDelegate; }

Type Reference: