PurchaseLogic

interface PurchaseLogic

Interface for handling in-app purchases and restorations directly by the application rather than by RevenueCat. These suspend methods are called by a RevenueCat Paywall in order to execute you app's custom purchase/restore code. These functions are only called when Purchases.purchasesAreCompletedBy is set to MY_APP.

If you prefer to implement custom purchase and restore logic with completion handlers, please implement PurchaseLogicWithCallback.

Inheritors

Functions

Link copied to clipboard
abstract suspend fun performPurchase(activity: Activity, rcPackage: Package): PurchaseLogicResult

Performs an in-app purchase for the specified package.

Link copied to clipboard
abstract suspend fun performRestore(customerInfo: CustomerInfo): PurchaseLogicResult

Restores previously completed purchases for the given customer.