Economy
The Economy system provides a complete monetization and progression framework for your game. It handles virtual currencies, in-app purchases, rewarded video ads, donations, and complex reward mechanics.
Key features #
Virtual currencies #
Define multiple in-game currencies that players can earn through gameplay or purchase with real money. The system tracks player balances and handles all currency transactions atomically.
Learn more about virtual currencies
Virtual store #
Create stores where players can purchase items, consumables, or currency packs using soft currency (earned in-game) or hard currency (real money via App Store, Google Play, etc.). The system handles receipt validation, purchase intents, and reward grants.
Learn more about the virtual store
Rewarded video #
Integrate rewarded video ads from ironSource or AppLovin MAX. Players watch ads in exchange for in-game rewards. Hiro handles server-side webhook verification and provides automatic fallbacks if callbacks don’t arrive.
Learn more about rewarded video
Donations #
Enable social features where players can request help and receive contributions from other players. Donors and recipients both receive configurable rewards.
Rewards #
Configure complex reward structures with guaranteed drops, weighted random loot tables, and time-limited modifiers. Rewards can include currencies, items, energy, and more.
Economy configuration #
The Economy system is configured via a JSON file. Here’s an example showing the main sections:
| |
| Property | Type | Description |
|---|---|---|
initialize_user | InitializeUser | The currencies and items a user should start with when their account is created. |
donations | string:Donation | A map of all donations. |
store_items | string:StoreItem | A map of all store items. |
placements | string:Placement | A map of all placements. |
allow_fake_receipts | bool | Should fake receipts be allowed? A receipt is fake if it contains the string: fake receipt. |
Initialize user #
The initialize_user section defines what currencies and items players start with when they first create an account.
initialize_user is updated, players who created an account prior to the change won’t receive the new updates. For example, if version 1.0 of your game initializes players with 100 coins and in version 2.0 this amount is increased to 200 coins, then players who signed up prior to version 2 won’t receive the additional 100 coins.| Property | Type | Description |
|---|---|---|
currencies | string:int64 | A map of currency IDs and quantities that a user account should be created with. |
items | string:int64 | A map of item IDs and quantities that a user account should be created with. |
Related resources #
- In-app purchase validation: Configure server-side receipt validation for Apple, Google, and other platforms.
