PaywallPlan

data class PaywallPlan(val id: String, val title: String, val price: String, val period: String, val trialText: String? = null, val badge: String? = null, val priceDetail: String? = null, val isSubscription: Boolean = true)(source)

One purchasable option shown on a paywall.

The library never talks to a billing provider. Map your Play Billing ProductDetails, RevenueCat Package or any other source to this class and pass formatted strings.

Parameters

id

your own identifier, handed back in onPurchase so you can find the real product.

title

short name, e.g. "Yearly".

price

formatted price from the store, e.g. "$29.99". Never hard-code prices in production.

period

billing period shown next to the price, e.g. "per year" or "one-time".

trialText

free trial terms, e.g. "7-day free trial". null means no trial.

badge

optional highlight, e.g. "Best value".

priceDetail

optional helper line, e.g. "$2.49/month, billed yearly".

isSubscription

false for one-time purchases such as lifetime access. It changes the auto-renew disclosure shown under the button.

Constructors

Link copied to clipboard
constructor(id: String, title: String, price: String, period: String, trialText: String? = null, badge: String? = null, priceDetail: String? = null, isSubscription: Boolean = true)

Properties

Link copied to clipboard
Link copied to clipboard
val id: String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard