performPurchase

abstract suspend fun performPurchase(activity: Activity, rcPackage: Package): PurchaseLogicResult

Performs an in-app purchase for the specified package.

If a purchase is successful, syncPurchases will automatically be called by RevenueCat to update our database. However, if you are using Amazon's store, you must call syncAmazonPurchase in your code.

Return

A PurchaseLogicResult object containing the outcome of the purchase operation.

Parameters

activity

The current Android Activity triggering the purchase.

rcPackage

The package representing the in-app product that the user intends to purchase.