Mobile Master IAP

The Mobile Master IAP is the most complete and updated In-App-Purchase available for mobile for both Android and IOS.

It uses the most recent Google IAP and Apple IAP SDK for Cordova.

The best benefit for this plugin is that it supports all editors and runtimes of Construct. Both, Construct 2 and Construct 3.

There are two special features exclusive to this plugin, to with:

  • Subscriptions

  • Server validation with data credentials.

This plugin is both an easy to use and packed with tools and features to achieve complete application in-app purchases.

Intstructions

1. The first step is to add the Mobile Master IAP addon into the project.

2. If the application is for Android, add or create a manifest.json which should contain the the JSON object with a key "play_store_key", then set the value (the blank space covered with quotation marks) to your application's play store key. Or if this is for iOS, skip this step.

3. The IAP is an integration feature, which ideally should be added once the game is already polished. This means that your application must be fully configured from the platform console. That includes the store listing, default pricing, localized pricing, etc. It also needs to be at least on alpha release. Otherwise, it won't run properly.

Please do take note, this is a very crucial step!

4. For Android, the Google Play Developer Console should be, as previously mentioned, fully set up. The store listing and in-app purchases products should be fully configured and the application should also be at least verified for alpha release, to get in-app purchases to fully work.

5. It's also worth separately mentioning that in adding or editing local prices, it is of upmost importance that you don't forget to check enabled all the countries for local prices, the default price is just your local price basis for the conversion to other country's local price, but you still need to check enable the countries that you want to sell your products to. 

Please do take note, that this is a very crucial step! For more info, click here.

6. Lastly, from the plugin properties. If the Debug Mode is enabled, plugin debugging logs, including errors will be shown on the [F12] Developer Tools Console from the mobile device's USB Debugging - Inspect Devices.

This only works on a debug .apk or .ipa launched with Safari's web inspector, while debugging from an iPhone connected to a MacOS device.

Actions, Conditions & Expressions

Actions

Actions.png
  • Initialization :

    • Initialize - Initialize after all the products and subscriptions are installed. Initialize all before continuing further.

  • Install Product - Install the product to be listed for initialization. Install before initializing.

    • Product ID- The Product ID enlisted from the store.

    • Product Type - Type of product. Consumables are products that can be bought again.

  • Install Subscription - Install the subscription to be listed for initialization. Install before initializing.

    • Product ID- The Product ID enlisted from the store.

Monetization :

  • Purchase - Purchase the product.

    • Product ID - The Product ID enlisted from the store.

  • Subscribe - Subscribe the product.

    • Product ID- The Product ID enlisted from the store.


App Sync :

  • Restore Purchases - Restore the unconsumed products that were bought.

Conditions

Initialization :

  • On Initialize Succeeded - Triggered when the initialization process from installing the products has succeeded.

  • On Initialize Failed - Triggered when the initialization process from installing the products has failed.

  • Is Initialized - Checks if the initialization process from installing the products has already been completed.

Conditions.png

App Sync :

  • On Restore Succeeded - Triggered when a restore purchases attempt has succeeded.

  • On Restore Failed - Triggered when a restore purchases attempt has failed.


Debugging :

  • On Error - Triggered when an error occurs. The Expression 'ErrorMessage' will return the error message.


Monetization :: Purchase :

  • On Purchase Succeeded - Triggered when a purchase attempt has succeeded.

  • On Purchase Failed - Triggered when a purchase attempt has failed.

  • Compare Purchase ProductID - "On Purchase Succeeded" or "On Purchase Failed", a Purchase attempt

    • Product ID - The Product ID enlisted from the store.


Monetization :: Subscription :

  • On Subscription Succeeded - Triggered when a subscription attempt has succeeded.

  • On Subscription Failed - Triggered when a subscription attempt has failed.

  • Compare Subscription ProductID - "On Subscription Succeeded" or "On Subscription Failed", a Subscription attempt

    • Product ID - The Product ID enlisted from the store.


Monetization :: Universal :

  • For Each Product - Loop through all the installed in-app purchase products.

  • Has Paid Product - Check if a Non-Consumable Product or a Subscription is bought or active.

    • Product ID - The Product ID enlisted from the store.

Expressions

Debugging :

  • errorMessage - Return the Error Message from the Mobile IAP plugin when the 'On Error' is triggered.

Initialization :: Recent :

  • recentPurchaseProductID - Return the recent Purchase Product ID that was attempted. "" if null.

  • recentSubscriptionProductID - Return the recent Subscription Product ID that was attempted. "" if null.

Initialization :: Get Data :

  • getProductTitle - Return the Product Title from a Product ID. "" if null.

    • "ProductID" - The Product ID enlisted from the store.

  • getProductDescription - Return the Product Description from a Product ID. "" if null.

    • "ProductID" - The Product ID enlisted from the store.

  • getProductCurrency - Return the Product Currency from a Product ID. "" if null.

    • "ProductID" - The Product ID enlisted from the store.

  • getProductLocalizedPrice - Return the Product Localized Price from a Product ID. "" if null.

    • "ProductID" - The Product ID enlisted from the store.

  • getProductDecimalPrice - Return the Product Decimal Price from a Product ID. '-1' if null.

    • "ProductID" - The Product ID enlisted from the store.

  • getProductType - Return the Product Type. '0' for Non-Consumables, '1' for Consumables and '2' for Subscriptions. '-1' if null.

    • "ProductID" - The Product ID enlisted from the store.


Initialization :: For Each :

  • loopProductID - Return the loop Product ID from a 'For Each Product'. "" if null.


Validation :: Get Data :

  • getTransactionID - Return the purchase/subscription transaction/order id.

    • "ProductID" - The Product ID enlisted from the store.

  • getReceipt - Return the purchase/subscription receipt. On iOS it will be the base64 string of the receipt, on Android it will be a string of a json with all the transaction details required for validation.

    • "ProductID" - The Product ID enlisted from the store.

  • getSignature - Return the purchase/subscription signature. On Android it can be used to consume a purchase. On iOS it will be an empty string.

    • "ProductID" - The Product ID enlisted from the store.


Purchase / Subscription :

  • curTransactionID - Return the transaction/order id from the current purchase/subscription.

  • curReceipt - Return the receipt from the current purchase/subscription.

  • curSignature - Return the signature from the current purchase/subscription.

  • curProductID - Return the product id from the current purchase/subscription.

Properties

Universal - General Plugin Properties.

  • Debug Mode - If "Enabled", the runtime will log errors. This should be "Disabled" on production.

    • Enabled

    • Disabled

Google Developer Console Setup

The Mobile Master IAP is a Google Play SDK integration feature. This means that adding this feature should ideally only be done after the game is already polished, where the game is set for at least an alpha release. At this point, all console configuration should have already been set up, that includes the store listing, product items, local pricing having all countries to be released to are checked enabled.

This ensures that the Google Play integration features, in this case the in-app purchases would work properly.

There are only 3 basic requirements to implement the Mobile Master IAP.

  • Play Store Key -​ this is inputted inside the added manifest.json from your project files.

  • Published Game - the game should already be verified and published, at least for alpha release.

  • Complete console configuration - this includes the store listing, store localized prices per country, etc.

These are the basic requirements to fully integrate in-app purchases into your game application.

Common Beginner Issues

It's also worth mentioning two (2) common issues beginners encounter. 

  • Billing related errors - it could be either from the build or during run-time. If it's a build error, it's might be a missing manifest.json, you might have not added it yet, you can check the dedicated manual or from the instructions on the first section. If it's a run-time error, check if you've added the play_store_key and if you've entered the correct value. You can also check the dedicated manual or from the instructions on the first section.

  • Unavailable or initialization errors - this happens when Google Play doesn't allow your application to run in-app purchases.
     

    • One possible reason is that your application is in alpha test but in limited internal testing or the like, if another device tries your application without registering the currently used account for internal testing, then the in-app purchase will be unavailable to that account.
       

    • Another, is that your console configuration is not set up completely. Usually it's just the store listing, and such. But if not, then it must be the product localization price not properly set.

      Beginners sometimes only set the default price, not knowing that the default price is just a local basis price to generate a conversion for the other country's localization price.

      But, without checking enabled all countries or your preferred countries to sell your product. Then, it wouldn't work on any country since no country was ever selected, and Google Play Developer Console doesn't warn this. It's also important to double-check each price per-country, because some countries can't have their prices be auto-generated. 

      I really recommend you keep all of these in mind, these are very important information to remember!

Once all of those are cleared, you can then proceed your application to release or maybe add more features from the collection.

That ends this quick lesson, have a happy game development!

Android Sample Project

Sample Setup Project

Specifications

  • Instructions - The sample project has comments and instructions on how to use the addon and its features.

  • A.C.E. Coverage - It covers the implementation of each action, condition and expression.

  • Tips and Tricks - It provides some tips and tricks to a better use of the addon and of the event-sheet system alongside it.

Supporters

Only

User Manual

The Mobile Master IAP is a monetization addon, an addon that involves monetary transactions, doing this once right for a developer is an upmost necessary, so to make sure everyone has the means to do that right one time, the user manual was made.

It covers the implementation, workflow and build process of the addon. Also has redundancy information from this current documentation, just in case.

Although, don't think of this as a replacement for the Google Developer documentation or the Apple Developer documentation, it's of upmost importance everyone reads those too. I will not be liable for any violation or malpractice use of any addons or used services in the collection, including this one. So, please read the official documentations too.

I hope everyone reads well and good luck!

Feature Showcase

The Mobile Master IAP is a monetization addon, an addon that involves monetary transactions, doing this once right for a developer is an upmost necessary, so to make sure everyone has the means to do that right one time, the user manual was made.

Feature Demo

iOS Sample Project

Sample Setup Project

Specifications

  • Instructions - The sample project has comments and instructions on how to use the addon and its features.

  • A.C.E. Coverage - It covers the implementation of each action, condition and expression.

  • Tips and Tricks - It provides some tips and tricks to a better use of the addon and of the event-sheet system alongside it.

Supporters

Only

Features

The Mobile Master IAP is a monetization addon for in-app purchases for both android and ios. It's from the Mobile Master Collection under the Construct Master Collection and supports both Construct 2 and Construct 3 with also supporting both the c2runtime and c3runtime.

Features :

  • Complete Google IAP SDK features.

  • Complete Apple IAP SDK features.

  • Easy to use and no programming required.

  • Well-supported and fully tested.

  • PDF documentation support.

  • Fingerprint support & other new features.

  • Non-consumables

  • Consumables

  • Subscriptions

  • Server validation implementation.

  • Server validation data.

  • Store product details.

  • Construct 2 editor support.

  • Construct 3 editor support.

  • Construct 2 runtime.

  • Construct 3 runtime.

  • C3 Build Service, PhoneGap.

  • Cordova CLI & Android Studio.

 
 
 
 
 
 
 
 
 

Get the tools

for your pro games!

Constuct Master Collection - Itch.io
Constuct Master Collection - Discord
Constuct Master Collection - Construct 3

© Construct Master Collection 2020 • All rights reserved

Contact Information: