Back to AtesKit
Monetization

Paywall Components

AtesKit provides production-ready paywall screens with RevenueCat integration, trial management, and premium UI components for seamless monetization.

RevenueCat Integration

AtesKit paywalls are fully integrated with RevenueCat for subscription management. Simply configure your API key in AKConfig and paywalls handle everything automatically.
Auto-Loading: Products loaded from RevenueCat automatically
State Management: Purchase, restore, and trial states handled internally
Localization: Prices and periods localized per user region
Trial Support: Automatic trial detection and UI adaptation

AKPaywallSingleProductView

Paywall Views
A premium single-product paywall with hero carousel, feature highlights, and trial toggle. Perfect for apps with one main subscription tier.
USE CASES
Single subscription tier apps
Premium upgrade screens
Trial-first monetization
Simple pricing models
KEY FEATURES
Infinity carousel header with stretchy effect
Mystical background gradient
Shimmer animated app name
Feature rows with icons
Trial toggle (if enabled)
Auto-managed purchase states
Restore purchases
Terms & Privacy links
USAGE EXAMPLE
Swift
// Automatic usage via AKConfig
@EnvironmentObject var config: AKConfig

// Paywall automatically shows when:
// 1. config.paywall = true
// 2. User taps premium feature without subscription

// Manual presentation
.sheet(isPresented: $showPaywall) {
    AKPaywallSingleProductView()
        .environmentObject(config)
}

// Features displayed:
// - Premium readings with AI
// - Unlimited insights
// - Daily tokens
// All localized automatically

AKPaywallMultiProductView

Paywall Views
A comprehensive multi-product paywall with selectable subscription options, trial toggle, and discount badges. Ideal for apps with multiple pricing tiers.
USE CASES
Multiple subscription tiers
Weekly, monthly, yearly options
Freemium with upgrades
Discount campaigns
KEY FEATURES
Multiple product selection
Trial toggle with auto-filtering
Discount rate badges
Active subscription indicators
Price per period display
Smooth selection animations
Auto-managed state
PARAMETERS
config.products
[StoreProduct]
Array of products from RevenueCat
config.selectedProduct
StoreProduct?
Currently selected product
config.isTrialEnabled
Bool
Whether trial is available
USAGE EXAMPLE
Swift
// Automatic usage
@EnvironmentObject var config: AKConfig

// Products are automatically loaded from RevenueCat
// User can select between options:
// - Weekly subscription
// - Monthly subscription  
// - Yearly subscription (with discount)

// Trial toggle automatically filters products
// with/without introductory offers

.sheet(isPresented: $showPaywall) {
    AKPaywallMultiProductView()
        .environmentObject(config)
}

AKFeatureRow

UI Components
A reusable feature row component for displaying paywall benefits with icon, title, and subtitle. Supports localization.
USE CASES
Feature lists in paywalls
Benefit highlights
Premium features showcase
Onboarding screens
PARAMETERS
icon
String
SF Symbol name
title
String
Localized title key
subtitle
String
Localized subtitle key
USAGE EXAMPLE
Swift
AKFeatureRow(
    icon: "sparkles",
    title: "paywall.premium.readings",
    subtitle: "paywall.premium.readings.subtitle"
)

AKFeatureRow(
    icon: "infinity",
    title: "paywall.unlimited.insights",
    subtitle: "paywall.unlimited.insights.subtitle"
)

AKFeatureRow(
    icon: "calendar",
    title: "paywall.daily.tokens",
    subtitle: "paywall.daily.tokens.subtitle"
)

AKSubscriptionOptionView

Product Components
A selectable subscription option card with trial info, discount badges, and active state indicators. Used within multi-product paywalls.
USE CASES
Subscription tier selection
Product comparison
Trial vs paid options
Active subscription display
KEY FEATURES
Checkmark selection indicator
Discount rate badge
Trial period display
Active subscription label
Price per period calculation
Smooth animations
PARAMETERS
isTrial
Binding<Bool>
Trial toggle binding
product
StoreProduct
RevenueCat product
USAGE EXAMPLE
Swift
@State private var isTrialEnabled = true

ForEach(config.products, id: \.productIdentifier) { product in
    AKSubscriptionOptionView(
        isTrial: $isTrialEnabled,
        product: product
    )
    .disabled(product == config.activeProduct)
}

// Automatically shows:
// - "First 7 days free, then $9.99/month"
// - "Full Access just for $4.99/week"
// - "%50 OFF" badge for discounts
// - "Already Active Subscription" for current tier

Setup Guide

1. Configure AKConfig
Swift
@StateObject private var config: AKConfig = .AKConfigBuilder()
    .setAppName("MyApp")
    .setSubscriptionType(.onlySubscription) // or .freemium
    .setApiKey("appl_YOUR_REVENUECAT_KEY")
    .build()
2. Add Paywall Modifier
Swift
ContentView()
    .presentPaywallIfNeeds // Auto-shows paywall when needed
    .environmentObject(config)
3. Trigger Paywall
Swift
// Automatic trigger
if !config.isSubscripted {
    config.paywall = true // Shows paywall automatically
}

// Or check before premium features
Button("Premium Feature") {
    if config.isSubscripted {
        // Show premium content
    } else {
        config.paywall = true
    }
}

Best Practices

Localization: Use localized string keys for all paywall text
Trial First: Enable trials to increase conversion rates
Clear Value: Use AKFeatureRow to highlight premium benefits
Legal Links: Always include Terms & Privacy Policy links