store.restore()

Type Function
Return value none
Revision Release 2026.3728
Keywords Samsung, IAP, in-app purchases, restore
See also store.consumePurchase()
store.acknowledgePurchase()
store.purchase()
store.*

Overview

Users who wipe the information on a device or buy a new device may wish to restore previously purchased items. This function initiates the process of retrieving all valid purchases. This includes consumable items that have not be consumed, non-consumable items, and active subscriptions.

During this process, the storeTransaction listener defined in store.init() may be called multiple times, once for each item, with a state of "restoreCompleted". Each event provides the purchaseId and the acknowledgedStatus of the purchase: consume restored consumable items with store.consumePurchase() and acknowledge non-consumable items and subscriptions with acknowledgedStatus of "notAcknowledged" with store.acknowledgePurchase().

Gotchas

Syntax

store.restore( [productType] )
productType (optional)

String. Which purchases to retrieve: "all" (default), "item" for consumable and non-consumable items only, or "subscription" for subscriptions only.