In-App Purchases #
In-app purchases enable you to monetize your games and generate revenue. By offering in-game items or content for purchase, you can create a revenue stream beyond the initial purchase price of the game. This is particularly important for free-to-play games, which rely on in-app purchases to generate revenue.
They can also be used to improve the player experience, providing additional options and flexibility within the game. For example, players may be able to purchase additional lives, power-ups, or access to new levels or content.
You can use the
IAPSystem to manage in-app purchases.
Initialize the IAP system #
The IAP system relies on the Economy System and an
ILogger, both must be passed in as dependencies via the constructor.
Adding products #
You can manually add products which are not defined in the Economy system. These product definitions could come from the Unity IAP definitions.
Purchasing a store item #
You can purchase a store item defined in the Economy system.
You can also purchase an item by product ID.
Processing a purchase #
You can process a purchase.
Restoring purchases #
You can restore purchases.
Getting localized product price #
You can get the localized product price.
You can also get a localized product price by product ID.