store.canMakePurchases

Type Boolean
Revision Release 2026.3728
Keywords Samsung, IAP, in-app purchases, canMakePurchases
See also store.purchase()
store.*

Overview

This property will be true if the store supports purchases, which is the case after store.init() succeeded. Following confirmation, the store.purchase() function can be used to purchase items.

Syntax

store.canMakePurchases

Example

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

-- Transaction listener function
local function transactionListener( event )
    local transaction = event.transaction
end

-- Initialize Samsung IAP
store.init( transactionListener )

-- Sometime later, purchase an item
if ( store.canMakePurchases ) then
    store.purchase( "com.coronalabs.ExampleInAppPurchase.Consumable" )
end