PlaytoliaStore provides the item catalog and purchase flow. It syncs automatically after login.
Fetching items
var allItems = PlaytoliaStore.GetItems();
var consumables = PlaytoliaStore.GetItemsByType("Consumable");
var nonConsum = PlaytoliaStore.GetItemsByType("NonConsumable");
var subs = PlaytoliaStore.GetItemsByType("Subscription");
var results = PlaytoliaStore.SearchItems("Gold");
var item = PlaytoliaStore.GetItemById("gold_500");
var item = PlaytoliaStore.GetItemBySku("com.mygame.gold500");
StoreItem fields
Id, Name, Sku, Type (Consumable/NonConsumable/Subscription), Grants[]
Each Grant has: GrantId, GrantType, GrantAmount, Currency?
Making a purchase
PlaytoliaStore.BeginPurchaseFlow("gold_500",
onSuccess: () => Debug.Log("Purchase succeeded!"),
onError: (error) => Debug.LogError("Purchase failed: " + error)
);
// Also accepts a StoreItem directly
var item = PlaytoliaStore.GetItemById("gold_500");
PlaytoliaStore.BeginPurchaseFlow(item,
onSuccess: () => { /* grant confirmed */ },
onError: (error) => { /* show error to player */ }
);
The onSuccess and onError callbacks are optional. When the purchase completes successfully, the SDK automatically updates the player’s wallet, entitlements, and subscriptions.
Store data is empty until the player is authenticated. All item getters return null or empty lists before login.
Listening to changes
void Start() => PlaytoliaStore.AddListener(OnStoreChanged);
void OnDestroy() => PlaytoliaStore.RemoveListener(OnStoreChanged);