Purchase Controller
The interface that handles Superwall's subscription-related logic.
By default, the Superwall SDK handles all subscription-related logic. However, if you'd like more control, you can return a PurchaseController when configuring the SDK via Superwall.configure(apiKey, purchaseController, options, completion).
When implementing this, you also need to set the subscription status using Superwall.subscriptionStatus.
To learn how to implement the PurchaseController in your app and best practices, see Purchases and Subscription Status.
Inheritors
Functions
Link copied to clipboard
abstract suspend fun purchase(activity: Activity, productDetails: ProductDetails, basePlanId: String?, offerId: String?): PurchaseResult
Called when the user initiates purchasing of a product.
Link copied to clipboard
Called when the user initiates a restore.