store.*

Type Library
Revision 2014.2419
Keywords store, IAP, Google IAP v3
Availability Basic, Pro, Enterprise
Platforms Android

Overview

This plugin allows you to support in-app purchases using Google's in-app billing version 3.

For more information see the In-App Purchases (IAP) guide.

Functions

Migration

If you are migrating from Google IAP v2, please see the Migration Guide for an overview of key differences between each version.

Project Settings

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",
            supportedPlatforms = { android=true }
        },
    },
}

In addition, you must enable the BILLING permission in build.settings:

settings =
{
    android =
    {
        usesPermissions =
        {
            "com.android.vending.BILLING",
        },
    },
}

Project Configuration

To use Google IAP v3, 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",
        },
    },
}

Implementation

For details on how to implement and use Google IAP v3, please see the In-App Purchases (IAP) guide.