Documentation

Economy

Economy

Add a virtual purchase to your game

Set up virtual purchases to allow players to exchange in-game currency or items for other resources.
Read time 1 minuteLast updated 2 days ago

The following instructions describe how to define the parameters of virtual purchase in your game’s economy.
  1. In the Unity Dashboard, go to Development > Products.
  2. Select Economy.
  3. Select Configuration.
  4. Select Add resource.
  5. Give the transaction a resource name, and an ID for use in API calls. For example, if your virtual purchase is for a sword, the item name could be Buy Sword, and the ID is auto-generated from the name but you can change it to anything that suits you and your game.
  6. Under Type, select Virtual Purchase.
  7. Fill in the following sections:
  • In the What does the player receive? section, set the resource field to a currency or inventory item the player acquires as a result of this transaction, and set the amount of the item the player receives. You can set multiple resources.
  • In the What does the player spend? section, set the resource field to a currency or inventory item the player needs to give to acquire the item, and the amount of that item the player needs to spend. You can set multiple resources.
  1. To add optional custom JSON data you want allocated to this virtual purchase, select Add custom JSON and enter the JSON into the field. Refer to Custom data.
  2. Select Create.
The new virtual purchase now appears on the Configuration page of Economy.

Additional resources