Economy v2 is now Generally Available. For support and feedback, go to the PlayFab Forum.
Creating a Store
To create a store, you must first make sure you have other published Catalog Items, Currency, or UGC that you want to be accessible/purchasable in your game. You can follow the steps in the Economy v2 QuickstartGameManager
- Navigate to Economy > Catalog (V2).
- Under the Stores tab, select New Store.
API
You can use theCreateDraftItem to create a store.
An example CreateDraftItem request to create a store:
The above is a store that sells two items, the
LaserSword and the WeaponBundle. Both items are existing catalog items with some existing base price as defined in the catalog. This store, overrides their existing prices and now offers the LaserSword for 1 Diamond and the WeaponBundle for 10 Gold and 10 Silver.
This request would return a response that the store has been created and published:
Id that is now associated with our published store.
To help simplify the concept, the Item Ids have been swapped from GUIDs to the Item Names to better illustrate the example of using Stores.
Using a Store
Stores are used when players call thePurchaseInventoryItems API. When you call PurchaseInventoryItems, one of the optional properties is a StoreId parameter where we can pass in the Store we use to apply to this purchase request.
An example PurchaseInventoryItems request using a store:
{{StoreId}} passed into the purchase request and how the anticipated PriceAmount now matches the 1 Diamond Cost as set in our store.
Searching a Store
When you use theSearchItems API, one of the properties you can pass in is the Store parameter. This parameter allows you to search within the context of a store. In addition to being able to check if an item exists in a particular store, it also can be used to display the overridden prices of the store’s items/contents. You can also use the AlternateId of the store to search for it.
