Type Function Return value none Revision Release 2022.3683 Keywords Google, IAP, in-app purchases, purchase See also store.init() store.*
Initiates a purchase transaction on a provided product by sending out a purchase request to the store, then dispatches a storeTransaction event to the listener defined in store.init().
This call does not work for subscription purchases.
store.purchaseSubscription( productIdentifier [, options] )
String. String representing the product identifier of the item to purchase.
Table. A table that specifies additional parameters of the purchase API call.
The options
table contains details about the purchase request.
String. Specifies an optional string that is uniquely associated with the user's account in your app. This value would be obfuscated (SHA-256 hash) before sending to Google. For more details see documentation.
String. Specifies an optional obfuscated string that is uniquely associated with the user's account in your app. If set, accountId
would be ignored. For more details see documentation.
String. Specifies an optional string that is uniquely associated with the user's profile in your app. This value would be obfuscated (SHA-256 hash) before sending to Google. For more details see documentation.
String. Specifies an optional obfuscated string that is uniquely associated with the user's profile in your app. If set, profileId
would be ignored. For more details see documentation).
Boolean. Specifies whether the offer is personalized to the buyer see documentation.
Table. Params used to upgrade or downgrade a subscription. documentation.
String. Value which is Google Play Billing purchase token that the user is upgrading or downgrading from
String. Specifies the Google Play Billing mode of proration during subscription upgrade/downgrade. Supported values for prorationMode
: unknownSubscriptionUpgrade
, deferred
, immediateAndChargeFullPrice
, immediateAndChargeProratedPrice
, immediateWithoutProration
, and immediateWithTimeProration
. i.e {purchaseToken="abcd123",prorationMode="immediateWithoutProration" }