samsung-iap.* — Samsung IAP

Type Library
Revision Release 2026.3728
Keywords IAP, Samsung IAP, Samsung In App Purchase
Platforms Android
Sample https://github.com/solar2d/plugins-sample-samsung-iap

Overview

The Samsung IAP plugin lets you sell in-app items and subscriptions through the Samsung Galaxy Store. It is built on the Samsung In-App Purchase SDK version 6.5.2 (com.samsung.developer:iap).

Requirements

Registration/Setup

In order to test and use In App Purchases you must setup a Samsung Seller Account, create a listing to test and deploy your app for on to the Samsung App Store. Under your Seller Profile be sure add the Samsung email(s) you plan to use to test under License Test. Also you need to upload an initial binary/apk for your app in order to create and test IAP products.

Gotchas

Syntax

local store = require( "plugin.samsung.iap" )

Properties

store.target

store.isActive

store.canLoadProducts

store.canMakePurchases

Functions

store.init()

store.loadProducts()

store.purchase()

store.restore()

store.consumePurchase()

store.acknowledgePurchase()

store.changeSubscriptionPlan()

Events

init

storeTransaction

productList

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.samsung.iap"] =
        {
            publisherId = "com.solar2d"
        },
    },      
}
Note

For Android, the following permissions/features are automatically added when using this plugin:

  • "android.permission.INTERNET"
  • "com.samsung.android.iap.permission.BILLING"

The <queries> manifest element for the Galaxy Store package (com.sec.android.app.samsungapps) is also added automatically; the manifestChildElements entry that previous versions of this plugin required in build.settings is no longer needed, but harmless if kept.

Support