> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Economy (Legacy) quickstart

> Quickstart for PlayFab Legacy Economy (v1) covering initial catalog setup, virtual currency configuration, and basic item and store creation.

# Quickstart (Legacy Economy)

<Info>
  Economy v1 APIs are in maintenance mode and will not be receiving any new features, only bug fixes. **The v1 APIs will be maintained for the foreseeable future.** See the [Economy v2 Overview](/services/playfab/economy-monetization/economy-v2/overview) to learn more about the next version of PlayFab Economy!
</Info>

Making monetization work is one of the biggest challenges in games. PlayFab simplifies this experience by building on top of three foundational pieces: Currencies, Items, and Inventory.

In this quickstart, you will:

1. Set up a virtual currency.
2. Create an item.
3. Add an item to a player's inventory.
4. Learn the next steps for customizing your economy.

## Setting up a virtual currency

Virtual currencies are the foundation of in-game economies. Players and characters can be granted these currencies, which can then be used to buy or trade items.

Items can have a cost in either a virtual currency or real money. Each title can support multiple arbitrary virtual currencies, providing flexibility for your game to implement any medium of exchange (for example, gold, gems, hearts, or interstellar credits).

To create a virtual currency:

1. Open **Game Manager** and select **Economy** on the left side bar.
2. Select the **Currency** tab.
3. Choose **New Currency** and change these fields (as shown in the image below):
   * Set **Currency code (2 uppercase characters)** to **GD**.
   * Set **Display name** to **Gold**.
4. Select **SAVE CURRENCY**.

<img src="https://mintcdn.com/microsoft-4404708b/Oa_DP1q6U1lat7c2/images/playfab/economy-monetization/economy/tutorials/game-manager-economy-currency-new-currency.png?fit=max&auto=format&n=Oa_DP1q6U1lat7c2&q=85&s=fcf039d9e16ac42519f73544b6f3a8fd" alt="Create Item" width="1200" height="394" data-path="images/playfab/economy-monetization/economy/tutorials/game-manager-economy-currency-new-currency.png" />

Now that a currency has been set up, catalog items can be assigned prices corresponding to the virtual currency.

## Creating an item

Many games offer the player items for purchase such as a shield, a level-unlock, or a power-up. These items are specified in a catalog. Before the player can purchase an item from a catalog, you must create the items to populate it.

To create a catalog with an item:

1. Select **Economy** on the left side bar and select the **Catalogs** tab.

2. Choose the **NEW CATALOG** button and enter **main** as the **Catalog version**. An item with the ID of **One** is added automatically.

3. Select **One** and change these fields (as shown in the image below):

   * Set **Item ID** to **apple**.
   * Set **Display name** to **apple**.
   * Set **Description** to **Perfectly normal apple**.

4. The **PRICES** section is at the bottom of the form.

5. Set the apple's price in gold (**GD**) to **5**.

6. Select the **SAVE ITEM** button.

<img src="https://mintcdn.com/microsoft-4404708b/Oa_DP1q6U1lat7c2/images/playfab/economy-monetization/economy/tutorials/create-item.png?fit=max&auto=format&n=Oa_DP1q6U1lat7c2&q=85&s=b07c6dc306edea1d41c9a4d73f5c3915" alt="Edit or Save Currency" width="1280" height="1200" data-path="images/playfab/economy-monetization/economy/tutorials/create-item.png" />

## Adding an item to a player inventory

PlayFab's [Player Item Management (Server)](xref:titleid.playfabapi.com.server.playeritemmanagement) and [Player Item Management (Client)](xref:titleid.playfabapi.com.client.playeritemmanagement) APIs support many strategies for item purchasing:

* Real money
* Virtual currency
* Triggered item grants based on buying another item
* Locked (with a loot-able/purchasable key) and unlocked boxes
* Random result tables
* Non-purchasable items that are granted based on paid or free events within a game
* And more scenarios, especially with [PlayFab CloudScript using Azure Functions](/services/playfab/live-service-management/service-gateway/automation/cloudscript-af)

**Add an item to a player's inventory by purchasing it with virtual currency.**

1. In your game, sign in as a player that has been given virtual currency. ([Giving virtual currency to a player](/services/playfab/economy-monetization/economy/items/quickstart#giving-virtual-currency-to-a-player) has more information, if needed.)

2. Call [GetCatalogItems](xref:titleid.playfabapi.com.client.title-widedatamanagement.getcatalogitems) with the following parameter in the request:
   * `CatalogVersion = "main"`

3. Verify that the `Catalog` in the result contains an **apple** with a **GD** price of **5**.

4. Call [PurchaseItem](xref:titleid.playfabapi.com.client.playeritemmanagement.purchaseitem) to buy the **apple**, with these parameter values in the request:

   * `CatalogVersion = "main"`
   * `ItemId = "apple"`
   * `VirtualCurrency  = "GD"`
   * `Price =  5`

5. Finally, call [GetUserInventory](xref:titleid.playfabapi.com.client.playeritemmanagement.getuserinventory) and look in the result of that method. In the array of items in the player's `Inventory` - you should see an apple!

## Next Steps for customizing your economy

Once you have a Catalog with Items supported by Virtual Currencies, you can light up your economy with:

* **Real World Purchases**: Our [Getting started with PlayFab, Unity IAP, and Android](/services/playfab/economy-monetization/economy/tutorials/getting-started-with-unity-iap-android) and our [Non-receipt payment processing](/services/playfab/economy-monetization/economy/tutorials/non-receipt-payment-processing) tutorials help you connect your virtual economy with existing stores.
* **Leveraging your Catalog**: To create Bundles, Containers and Drop Tables. For more information, see our [Catalogs](/services/playfab/economy-monetization/economy/items/catalogs) tutorial.
* **Using Item attributes**: To define multiple prices and specify stackable, tradable, and limited edition [Items](/services/playfab/economy-monetization/economy/items).
* **Setting up unique in-game vendors or Sales events**: Using [Stores and Sales](/services/playfab/economy-monetization/economy/tutorials/stores-and-sales).
* **Creating some player Segments and use Stores**: To drive different item and bundle offers to your players regardless of where they are in your game lifecycle. For an example, see our [Custom stores for player segments](/services/playfab/economy-monetization/economy/tutorials/custom-stores-for-player-segments) tutorial.
* **Gathering economic data**: Enabling you to improve and iterate your game using PlayFab [Reports](/services/playfab/data-analytics/learn-data/reports/overview).


## Related topics

- [Stores (Economy Legacy) Quickstart](/services/playfab/economy-monetization/economy/stores/quickstart.md)
- [Items (Legacy Economy) quickstart](/services/playfab/economy-monetization/economy/items/quickstart.md)
- [Catalogs (Legacy Economy)](/services/playfab/economy-monetization/economy/items/catalogs.md)
- [Stores and sales in Economy (Legacy)](/services/playfab/economy-monetization/economy/tutorials/stores-and-sales.md)
- [Custom Stores for Player Segments in Economy (Legacy)](/services/playfab/economy-monetization/economy/tutorials/custom-stores-for-player-segments.md)
