Paywall Logic
Functions
Link copied to clipboard
fun getVariablesAndFreeTrial(productItems: List<ProductItem>, productsByFullId: Map<String, StoreProduct>, isFreeTrialAvailableOverride: Boolean?, customerInfo: CustomerInfo, introOfferEligibility: IntroOfferEligibility = IntroOfferEligibility.AUTOMATIC): ProductProcessingOutcome
Link copied to clipboard
fun handlePaywallError(error: Throwable, event: EventData?, trackEvent: suspend (event: Trackable) -> Result<TrackingResult>? = null): Throwable
Link copied to clipboard
fun isFreeTrialEligibleForCustomProduct(product: StoreProduct, entitlements: Set<Entitlement>, customerInfo: CustomerInfo, introOfferEligibility: IntroOfferEligibility = IntroOfferEligibility.AUTOMATIC): Boolean
Entitlement-history-based trial eligibility for a custom (store == CUSTOM) product, mirroring the check used for web products in computeHasFreeTrial. Used at purchase time so a repeat purchaser who already consumed their trial does not generate a spurious freeTrialStart event — the external payment system charges them immediately.
Link copied to clipboard