Skip to content

Economy

The Economy provides out-of-the box support for managing in-game currencies, items, purchases and player inventory. The ChilliConnect SDKs provide methods for querying player inventory and currency balances, purchasing items, redeeming In App Purchases against catalog items, convert currencies and more.

Currencies

Players have currency balances associated with them which can be queried and manipulated through the ChilliConnect API. These balances can then be used in virtual purchases or currency conversions to give the player the ability to get new items. For more information on currencies, See the Catalog Currencies guide.

The following API methods can be used to query and manipulate player currency balances:

Currency Conversions

Currency Conversions allow players to convert from one currency to another. For more information on Currency Conversions, See the Catalog Currency Conversions guide

Currencies can be converted using the ConvertCurrency API method.

Inventory Items

Unlike currencies where only an amount is stored against the player accounts, each instance of an Inventory Items stored against a player is unique and identified by a unique ItemId. Each item also contains a Data property that can be used to store custom instance state against each item. For more information on Inventory Items, See the Catalog Inventory Items guide

Player inventory can be managed through the following API methods:

Real Money Purchases

When the player makes an In App Purchase, you can use the Economy Management redeem methods to securely credit the player accounts with the defined rewards. For more information on Real Money Purchases, See the Catalog Real Money Purchases guide

In App Purchases can be redeemed against the player account using the following API methods:

RealMoney purchases flagged as one-time purchases are useful for things like starter packs or seasonal offers where you want to ensure a purchase can only be made once. Repurchasing a one-time Real Money purchase will, however, not result in an error. This is to ensure players won't lose money should there be a client-side issue.

If you have assigned a Real Money Purchase to be bought only once, you can find which purchases are still available to a player by utilising GetOneTimeMoneyPurchases.

If you have "Automatically Record IAPs" turned on via Dashboard Metrics Settings these endpoints require you to also send up LocalCost and LocalCurrency so that the IAP gets recorded properly. If either of these values are not sent, or LocalCurrency is not in ISO-4217 format the request will fail.

For more information on how to configure In App Purchase validation in ChilliConnect, see our IAP Guide.

Virtual Purchases

Virtual purchases are used to allow players to purchase in game currencies or items using their currency balances or items in their inventory. For more information on Virtual Purchases, See the Catalog Virtual Purchases guide

Virtual purchases flagged as one-time purchases are useful for rewards of one-time actions, such as a player linking a Facebook account. When the cost of VirtualPurchases is set to free, one-time purchases also a useful tool for gifting items to all players, such as for holiday celebrations.

Unlike RealMoney purchases, re-buying a VirtualPurchase that has been declared as a one-time purchase will result in an error.

If you have assigned a Virtual Purchase to be bought only once, you can find which purchases are still available to a player by utilising GetOneTimeVirtualPurchases. T

Virtual purchases can be made through the MakeVirtualPurchase API method.