Economy #

The Economy features enable you to define multiple in-game currencies and rewards, allow players to spend soft or hard currency in exchange for in-game energy, inventory, and rewards, and offer video ad watches as a way for players to obtain rewards.

Customization parameters #

The following JSON represents the customization parameters you can use to configure the default user experience for the economy system.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{
  "initialize_user": {
    "currencies": {
      "<currencyName1>": 100,
      "<currencyName2>": 50
    },
    "items": {
      "<itemId1>": 1,
      "<itemId2>": 10
    }
  },
  "store_items": {
    "<itemId1>": {
      "name": "Item one",
      "description": "The description for item one",
      "category": "<categoryName>",
      "cost": {
        "currencies": {},
        "sku": "com.example.item1"
      },
      "reward": {
        "guaranteed": {
          "currencies": {
            "gold": {
              "min": 100
            }
          },
          "items": {
            "hero_card": {
              "min": 1,
              "max": 5
            }
          }
        }
      },
      "additional_properties": {
        "<propertyName>": "value"
      }
    }
  },
  "placements": {
    "<placementId1>": {
      "reward": {},
      "additional_properties": {
        "<propertyName>": "value"
      }
    }
  },
  "donations": {
    "<donationId1>": {
      "name": "Donation one",
      "description": "Description for donation one",
      "count": 1,
      "max_count": 10,
      "user_contribution_max_count": 2,
      "duration_sec": 10000,
      "recipient_reward": {},
      "contributor_reward": {},
      "additional_properties": {
        "<propertyName>": "value"
      }
    }
  }
}

The JSON schema defines several objects which define the various store items, collectables, consumables, placements and donations that will be available in your game. You can configure as few or as many of each as needed for your desired gameplay. It also defines an initialize_user object which defines what currencies, collectables and consumables a user starts with.

initialize_user #

The initialize_user object is structured as follows:

PropertyDescription
currenciesA string:int dictionary of currencies and quantities the user should start with.
itemsA string:int dictionary of items and quantities the user should start with.

store_items #

Each item inside the store_items object is keyed by id and may define the following::

PropertySubpropertyDescription
nameThe name for this store item.
descriptionThe description for this store item.
categoryThe category for this store item.
costThe cost for this store item, either in soft currency using the currencies subproperty or via IAP using the sku subproperty.
currenciesA string:int dictionary of currencies and quantities the user must pay to purchase this item.
skuThe SKU code of the in-app purchase the user must complete to obtain this item.
rewardAn object that defines what rewards a player should receive once they purchase this item.
additional_propertiesA string:string dictionary of key value pairs that can contain additional context.

placements #

Each placement inside the placements object is keyed by id and may define the following:

PropertySubpropertyDescription
rewardAn object that defines what rewards a player should receive once they purchase this item.
additional_propertiesA string:string dictionary of key value pairs that can contain additional context.

donations #

Each donation inside the donations object is keyed by id and may define the following:

PropertySubpropertyDescription
nameThe name for this donation.
descriptionThe description for this donation.
countThe initial count to start this donation with.
max_countThe maximum amount of donations required for this to be completed.
user_contribution_max_countThe maximum amount of times each user can donate towards this donation.
duration_secHow long (in seconds) this donation is active.
rewardAn object that defines what rewards a player should receive once the donation is fulfilled.
contributor_rewardAn object that defines what rewards the sender should receive once the donation is fulfilled.
additional_propertiesA string:string dictionary of key value pairs that can contain additional context.