Docs › Paywalls
Showing paywalls and onboarding flows
iOS
// 1. a sheet
.sheet(isPresented: $show) { PaywallView(onPurchase: { _ in show = false }) }
// 2. only for people without "pro"
ContentView().presentPaywallIfNeeded(entitlement: "pro")
// 3. a specific offering
PaywallView(offering: try await Purchases.shared.offerings()["summer_sale"])
// 4. plans and button over your own screen
MyFeatureScreen().paywallFooter()
Android
PaywallScreen(activity, onClose = { finish() }, onPurchased = { info -> unlock(info) })
Onboarding flows
A flow is a sequence of screens — questions (saved on the customer as attributes), benefits, permission asks (notifications, tracking) — ending on a paywall. Build in Onboarding flows, attach to a placement (onboarding), then:
FlowView(placement: "onboarding") { info in finishOnboarding() }
FlowScreen(activity, placement = "onboarding") { info -> finishOnboarding() }
Answers can drive targeting: e.g. people who answered goal = sleep get the sleep offering. Paywall analytics shows each screen's drop-off.
Events the SDK sends
paywall_impression (purchase screen shown), paywall_step (multi-step), paywall_close, flow_answer and purchases. They feed Paywall analytics and experiment results.