Ren'Py includes a high-level in-app purchasing framework. This framework currently only supports unlock-style purchases from Google Play and the Amazon App Store.
Using this framework is fairly simple, and consists of the following functions.
To offer in-app purchases, the purchases (including an associated price) must be set up on the various marketplaces. When building for android, Ren'Py will ask for the marketplace in use when configuring the package.
Returns the name of the enabled store for in-app purchase. This currently returns one of "amazon", "google", or None if no store is configured.
Returns True if the user has purchased product in the past, and False otherwise.
This function requests the purchase of product.
It returns true if the purchase succeded, now or at any time in the past, and false otherwise.
Registers a product with the in-app purchase system.
A string that's used to identify the product internally. Once used to represent a product, this must never change. These strings are generall of the form "com.domain.game.product".
If None, defaults to product.
Contacts the app store and restores any missing purchases.
An action that attempts the purchase of product. This action is sensitive iff and only if the product is purchasable (a store is enabled, and the product has not already been purchased.)
An Action that contacts the app store and restores any missing purchases.