PaywallPurchaseLogicParams

Parameters provided to PaywallPurchaseLogic when a paywall initiates a purchase.

Contains the package to purchase along with information about product changes (upgrades/downgrades) and the specific subscription option (offer) to use, as configured in the paywall.

Use Builder to create an instance:

val params = PaywallPurchaseLogicParams.Builder(rcPackage)
.oldProductId("com.example.old_product")
.replacementMode(GoogleReplacementMode.CHARGE_PRORATED_PRICE)
.subscriptionOption(subscriptionOption)
.build()

Types

Link copied to clipboard
class Builder(rcPackage: Package)

Builder for creating PaywallPurchaseLogicParams.

Properties

Link copied to clipboard

The product ID of the currently active subscription being replaced, when the user is upgrading or downgrading an existing subscription. Null if this is a new purchase.

Link copied to clipboard

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

Link copied to clipboard

The replacement mode to use for this product change, as configured in the paywall. For Google Play, this will be a com.revenuecat.purchases.models.GoogleReplacementMode. Null if this is a new purchase or the store does not support replacement modes.

Link copied to clipboard

The specific subscription option (offer) to use for this purchase, as configured in the paywall. Null if no specific offer is configured or the product is not a subscription.