Interface IapticSubscriptionViewProps

Props for IapticSubscriptionView Component

// Basic usage example:
<IapticSubscriptionView
entitlementLabels={{ premium: 'Premium Features' }}
styles={{ productCard: { backgroundColor: '#FFF' }}}
/>
interface IapticSubscriptionViewProps {
    entitlementLabels?: Record<string, { detail?: string; label: string }>;
    onPurchaseComplete?: () => void;
    showRestorePurchase?: boolean;
    sortProducts?: boolean;
    styles?: Partial<IapticSubscriptionViewStyles>;
    termsUrl?: string;
    theme?: Partial<IapticTheme>;
    visible?: boolean;
}

Properties

entitlementLabels?: Record<string, { detail?: string; label: string }>

Localized descriptions for each entitlement/feature

{}
{ 
* premium: { label: 'Premium Features', detail: 'Unlimited Downloads' },
* adFree: { label: 'Ad-Free', detail: 'Remove All Ads While Watching Videos' }
* }
  • IapticRN.listEntitlements
  • IapticProductDefinition.entitlements
onPurchaseComplete?: () => void

Callback when a purchase is complete (show a thank you message or whatever)

onPurchaseComplete={() => console.log('Purchase complete')}
showRestorePurchase?: boolean

Show restore purchases button when there's no active subscription

true
sortProducts?: boolean

Sort products by number of entitlements (most first)

true
sortProducts={false} // Disable automatic sorting
styles?: Partial<IapticSubscriptionViewStyles>

Custom styles for component elements (merges with defaults)

styles={{
modalContainer: { backgroundColor: 'rgba(0,0,0,0.8)' },
ctaButton: { backgroundColor: '#FF3B30' }
}}
termsUrl?: string

URL to Terms & Conditions (optional)

termsUrl="https://example.com/terms"
theme?: Partial<IapticTheme>

Theme configuration for colors

theme={{ primaryColor: '#FF3B30', backgroundColor: '#F5F5F5' }}
visible?: boolean

Controls visibility of the modal

false