Type Function Return value none Revision Release 2026.3728 Keywords Samsung, IAP, in-app purchases, acknowledgePurchase, acknowledge See also store.purchase() store.consumePurchase() store.restore() store.*
Acknowledges that the user has been granted a purchased non-consumable item or subscription. Samsung IAP requires every non-consumable item and subscription purchase to be acknowledged after your app delivered it; the acknowledgedStatus field of the "restoreCompleted" storeTransaction event tells whether a purchase still needs to be acknowledged.
Consumable items are not acknowledged; use store.consumePurchase() for them.
The result is dispatched as a storeTransaction event with a state of "acknowledged", one event per purchase identifier. Check statusType ("success" when the purchase was acknowledged) and purchaseId of the event.
Acknowledge with the purchaseId of the purchase, provided by the "purchased" and "restoreCompleted" storeTransaction events. The product identifier can not be used.
Acknowledging requires a Galaxy Store version that supports it; on older Galaxy Store versions the acknowledgedStatus of restored purchases is "unsupported".
store.acknowledgePurchase( purchaseId )
String. The purchaseId of the purchase to acknowledge. Several purchases can be acknowledged at once by passing a comma separated string or an array of purchase identifiers. The event.transaction table of a storeTransaction event is accepted as well.
local function transactionListener( event )
local transaction = event.transaction
if ( event.name == "storeTransaction" ) then
if ( transaction.state == "purchased" or transaction.state == "restoreCompleted" ) then
if ( not transaction.isConsumable and transaction.acknowledgedStatus ~= "acknowledged" ) then
-- Grant the item or subscription to the user, then acknowledge it
store.acknowledgePurchase( transaction.purchaseId )
end
elseif ( transaction.state == "acknowledged" ) then
print( "acknowledged " .. transaction.purchaseId .. ": " .. transaction.statusType )
end
end
end