It is very easy to implement simple in-app purchase capabilities in iOS and Android using a recent beta of AGK. Unfortunately there is little to no documentation detailing the process yet, but I successfully implemented it on my own as have others.
To initialize in-app purchase, you'd use the following code, preferably during the app's initialization.
InAppPurchaseSetTitle ("App Name") // Name for alert dialogs etc.
InAppPurchaseAddProductID ("iap_product_id", 0) // IAP product ID you configured through iTunes / Google
InAppPurchaseSetup()
For consistency, if releasing to both Android and iTunes, make sure the IAP product ID is identical through Google Play and iTunes Connect. I generally use 'com.mycompany.myapp.iaptitle' in both places. The 0 flag in the second line is the IAP type: 0 for non-consumable, 1 for consumable.
Then, to trigger the purchase process of a product, you can do the following:
// Request to purchase upgrade from store
InAppPurchaseActivate(0) // 0 = id of product
// Wait for user to purchase or cancel prompt
While GetInAppPurchaseState() = 0
Sync()
EndWhile
// User has canceled or already purchased
If GetInAppPurchaseAvailable(0) < 1
// ...
Endif
// User has upgraded!
ElseIf GetInAppPurchaseAvailable(0)
// ... (unlock features, etc).
Endif
You can check to see whether a particular product has already been purchased via:
If GetInAppPurchaseAvailable(0)
// ... (unlock features, etc).
Endif
Previous purchases can be restored on iOS (for non-consumable products) using:
On Android they will be restored when you call InAppPurchaseSetup().
The hardest part is just going through the processes of configuring the IAP through iTunes / Google. Also, you cannot test IAP through the AppGameKit Player, but must instead compile the app natively for the platform you are distributing it to.