PaywallPurchaseLogic

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 your app's custom purchase/restore code. These functions are only called when Purchases.purchasesAreCompletedBy is set to MY_APP.

This interface provides PaywallPurchaseLogicParams containing the package to purchase along with additional information such as product change details (for upgrades/downgrades) and the specific subscription option (offer) configured in the paywall. The params object is designed to be extensible for future additions.

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

Inheritors

Functions

Link copied to clipboard

Performs an in-app purchase with the given purchase params.

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

Restores previously completed purchases for the given customer.