Documentation Index
Fetch the complete documentation index at: https://docs.playtolia.com/llms.txt
Use this file to discover all available pages before exploring further.
PlaytoliaStore provides the item catalog and purchase flow. It syncs automatically after login.
Fetching items
StoreItem fields
Id, Name, Sku, Type (Consumable/NonConsumable/Subscription), Grants[]
Each Grant has: GrantId, GrantType, GrantAmount, Currency?
Making a purchase
onSuccess callback receives a PurchaseReceipt with the transaction ID, store, and purchased item. The onError callback receives a PurchaseError with a machine-readable error code, stage, and message. Both callbacks are optional.
When the purchase completes successfully, the SDK automatically updates the player’s wallet, entitlements, and subscriptions.
PurchaseReceipt
| Field | Type | Description |
|---|---|---|
Item | StoreItem | The purchased store item |
ReceiptId | string | Platform transaction ID |
Store | string | "google_play" or "apple_app_store" |
PurchaseError
| Field | Type | Description |
|---|---|---|
Code | string | Machine-readable error code |
Message | string | Human-readable description |
Stage | string | PURCHASE, VERIFICATION, or ACKNOWLEDGEMENT |
ReceiptId | string? | Set if the platform purchase succeeded |
ItemId | string? | Playtolia store item ID |
ItemSku | string? | Platform SKU |
Error codes
| Code | Stage | When |
|---|---|---|
BILLING_UNAVAILABLE | PURCHASE | Platform billing not available on device |
ITEM_NOT_FOUND | PURCHASE | Item ID not found in store |
USER_CANCELLED | PURCHASE | User dismissed the purchase dialog |
PURCHASE_FAILED | PURCHASE | Platform billing error |
VERIFICATION_FAILED | VERIFICATION | Backend verification failed |
ACKNOWLEDGEMENT_FAILED | ACKNOWLEDGEMENT | Platform acknowledgement failed after verification |
Listening to changes
Wallets
Track currency after purchases
Entitlements
Track non-consumable unlocks