PlayFab Items and Inventory Overview
Economy v2 is now Generally Available. For support and feedback, go to the PlayFab Forum.
Key concepts
- Catalog - A catalog is a collection of all the items that are available in your game. Catalogs offer an easy way to manage your game’s virtual items. For more information, see the Catalog Overview.
- Catalog Items – Individual items defined in your catalog. They can represent any kind of virtual good, such as weapons, outfits, power-ups, loot boxes, etc. You can customize properties and behaviors to suit your game design.
- Catalog Stores - Stores allow you to create multiple item listings for different purposes, such as seasonal events, promotions, or testing. See Stores.
- Bundles - Bundles are catalog items that contain references to other items. When a player purchases a bundle, the referenced items are unpacked and added to their inventory.
- Subscriptions - Subscriptions grant time-based access to durable goods. Items within a subscription are available in a player’s inventory for the duration of the subscription. See Subscriptions.
- Player Inventory Collections - Inventory is a record of the items that a player owns in your game. It contains information about item amounts, virtual currency balances, and custom properties. All player accounts can have one or more inventories called Collections.
- Stacks - Stacks allow multiple distinct instances of the same item to exist within a single inventory, each with their own amount and custom properties. See Stacks.
- Virtual Currency - Virtual currency is a type of item used as a medium of exchange in your game. You can use virtual currency to buy items from the catalog or a store, implement soft currency from in-app purchases, or drive gameplay mechanics.
Key APIs
A rich set of APIs is available for interacting with items and inventories in your game. You can use these APIs to perform actions such as purchasing items, granting items, updating inventory, transferring items between players, and querying transaction history.Inventory Management
- GetInventoryItems - Retrieve the current inventory of an entity. Supports pagination with
ContinuationTokenand bulk loading via TurboLoading. - AddInventoryItems - Add items directly to a player’s inventory.
- SubtractInventoryItems - Reduce item amounts in a player’s inventory.
- UpdateInventoryItems - Set item amounts or modify Display Properties on inventory items.
- DeleteInventoryItems - Remove entire stacks of items from a player’s inventory.
Purchasing and Trading
- PurchaseInventoryItems - Buy catalog items or bundles using virtual currency. Deducts the currency from the player’s inventory and grants the purchased item.
- TransferInventoryItems - Transfer items between players, between a player’s inventory collections, or between stacks within the same inventory.
Batch Operations
- ExecuteInventoryOperations - Batch up to 10 inventory operations (Add, Subtract, Update, Purchase, Transfer, Delete) in a single atomic request. If any operation fails, the entire batch is rolled back.
History and Diagnostics
- GetTransactionHistory - Retrieve transaction events from a player’s inventory. Supports filtering by timestamp and pagination for reviewing the full operation history. See Transaction History.
Reliability
- Idempotency - All inventory APIs support an
IdempotencyIdparameter to safely retry requests without duplicate side effects. IDs are enforced for 14 days. See Idempotency.
