Type Library Revision Release 2024.3703 Keywords Google, IAP, in-app purchases Platforms Android
This plugin is deprecated. Please migrate to Google Billing. For more information and key differences see its documentation.
The Google IAP plugin allows you to support
For in-app purchasing on other platforms, see the documentation for Apple IAP, Amazon IAP or Store API.
To use Google IAP, begin by setting up your Google Payments Merchant Center account and linking it to the Google Play Developer Console.
Additional configuration must occur within the Google Play Developer Console. If you need assistance with this process, please see Google’s documentation.
local store = require( "plugin.google.iap.v3" )
To use this plugin, add an entry into the plugins
table of build.settings
. When added, the build server will integrate the plugin during the build phase.
settings = { plugins = { ["plugin.google.iap.v3"] = { publisherId = "com.coronalabs" }, }, }
In addition, you must enable the BILLING
permission in build.settings
:
settings = { android = { usesPermissions = { "com.android.vending.BILLING", }, }, }
Finally, the license
table must be added to the project config.lua
file. Inside this table, the key
value should be set to the corresponding key obtained from the Google Play Developer Console.
application = { license = { google = { key = "YOUR_KEY", }, }, }