---
description: Unofficial Capacitor plugin for Superwall SDK to manage in-app subscriptions and paywalls with support for Android and iOS.
title: Capacitor Superwall Plugin for Android & iOS - Capawesome
image: https://capawesome.io/docs/assets/images/social/plugins/superwall.png
---

[ Skip to content](#capawesomecapacitor-superwall) 

[ 🎉 Introducing **Capawesome Platform** — one platform for Live Updates, Native Builds, App Store Publishing, and Insider SDKs.](https://capawesome.io) 

* [  Formbricks ](/docs/plugins/formbricks/)
* [  Geocoder ](/docs/plugins/geocoder/)
* [  Google Sign-In ](/docs/plugins/google-sign-in/)
* [  libSQL ](/docs/plugins/libsql/)
* [  Live Update ](/docs/plugins/live-update/)
* [  Managed Configurations ](/docs/plugins/managed-configurations/)
* [  Media Session ](/docs/plugins/media-session/)
* [  ML Kit ](/docs/plugins/mlkit/)
* [  NFC ](/docs/plugins/nfc/)
* [  OAuth ](/docs/plugins/oauth/)
* [  Pedometer ](/docs/plugins/pedometer/)
* [  Photo Editor ](/docs/plugins/photo-editor/)
* [  PostHog ](/docs/plugins/posthog/)
* [  Printer ](/docs/plugins/printer/)
* [  Purchases ](/docs/plugins/purchases/)
* [  RealtimeKit ](/docs/plugins/realtimekit/)
* [  Screen Orientation ](/docs/plugins/screen-orientation/)
* [  Screenshot ](/docs/plugins/screenshot/)
* [  Secure Preferences ](/docs/plugins/secure-preferences/)
* [  Speech Recognition ](/docs/plugins/speech-recognition/)
* [  Speech Synthesis ](/docs/plugins/speech-synthesis/)
* [  Share Target ](/docs/plugins/share-target/)
* [  Square Mobile Payments ](/docs/plugins/square-mobile-payments/)
* [  SQLite ](/docs/plugins/sqlite/)
* Superwall [  Superwall ](/docs/plugins/superwall/)
* [  Configuration ](#configuration)
* [  Usage ](#usage)
* [  API ](#api)
* [  Enums ](#enums)
* [  Changelog ](#changelog)
* [  License ](#license)
* [  Torch ](/docs/plugins/torch/)
* [  Wifi ](/docs/plugins/wifi/)
* [  Zip ](/docs/plugins/zip/)
* [  Cloud ](/docs/cloud/)
* [  Live Updates ](/docs/cloud/live-updates/)
* Advanced
* Integrations
* [  Native Builds ](/docs/cloud/native-builds/)
* [  Configuration ](/docs/cloud/native-builds/configuration/)
* [  Environments ](/docs/cloud/native-builds/environments/)
* Guides
* [  Sample Projects ](/docs/cloud/native-builds/sample-projects/)
* [  Troubleshooting ](/docs/cloud/native-builds/troubleshooting/)
* [  Automations ](/docs/cloud/automations/)
* [  Assist ](/docs/cloud/assist/)
* Account
* Organizations
* [  Organization and User Management ](/docs/cloud/organizations/memberships/)
* [  Single Sign-On (SSO) ](/docs/cloud/organizations/sso/)
* [  Teams ](/docs/cloud/organizations/teams/)
* [  Two-Factor Authentication ](/docs/cloud/organizations/two-factor-authentication/)
* [  Integrations ](/docs/cloud/integrations/)
* [  License Keys ](/docs/cloud/license-keys/)
* [  Webhooks ](/docs/cloud/webhooks/)
* [  Pricing ](https://capawesome.io/pricing/)
* [  FAQ ](/docs/cloud/faq/)
* [  Support ](/docs/cloud/support/)
* [  Contributing ](/docs/contributing/)
* [  LLMs ](/docs/llms/)
* [  Insiders ](/docs/insiders/)
* [  License ](https://capawesome.io/legal/eula/)
* [  Support ](/docs/insiders/support/)
* [  FAQ ](/docs/insiders/faq/)
* [  Blog ](/blog/)
* Categories

* [  Configuration ](#configuration)
* [  Usage ](#usage)
* [  API ](#api)
* [  Enums ](#enums)
* [  Changelog ](#changelog)
* [  License ](#license)

# @capawesome/capacitor-superwall[¶](#capawesomecapacitor-superwall "Permanent link")

Unofficial Capacitor plugin for [Superwall SDK](https://superwall.com/).[1](#fn:1)

[ ![Deliver Live Updates to your Capacitor app with Capawesome Cloud](../../assets/external/cloud.capawesome.io/assets/banners/cloud-build-and-deploy-capacitor-apps.69628c3f.png) ](https://cloud.capawesome.io/) 

## Features[¶](#features "Permanent link")

We are proud to offer a comprehensive Capacitor plugin for Superwall SDK integration. Here are some of the key features:

* 🖥️ **Cross-platform**: Supports Android and iOS.
* 💰 **Paywall Presentation**: Show beautiful, remotely-configured paywalls to drive subscriptions.
* 🎯 **Feature Gating**: Control feature access based on subscription status.
* 📊 **Analytics Events**: Forward Superwall events to your analytics platform.
* 👤 **User Management**: Identify users, set custom attributes, and manage subscription status.
* 🧪 **A/B Testing**: Built-in support for paywall experiments and holdout groups.
* 🔗 **Deep Linking**: Handle deep links for paywall campaigns.
* 🎨 **Customization**: Configure paywall behavior, logging, and appearance.
* 🔁 **Up-to-date**: Always supports the latest Capacitor version.

Missing a feature? Just [open an issue](https://github.com/capawesome-team/capacitor-plugins/issues) and we'll take a look!

## Newsletter[¶](#newsletter "Permanent link")

Stay up to date with the latest news and updates about the Capawesome, Capacitor, and Ionic ecosystem by subscribing to our [Capawesome Newsletter](https://cloud.capawesome.io/newsletter/).

## Compatibility[¶](#compatibility "Permanent link")

| Plugin Version | Capacitor Version | Status         |
| -------------- | ----------------- | -------------- |
| 0.1.x          | \>=8.x.x          | Active support |

## Installation[¶](#installation "Permanent link")

You can use our **AI-Assisted Setup** to install the plugin. Add the [Capawesome Skills](https://github.com/capawesome-team/skills) to your AI tool using the following command:

`[](#%5F%5Fcodelineno-0-1)npx skills add capawesome-team/skills --skill capacitor-plugins
`

Then use the following prompt:

`` [](#%5F%5Fcodelineno-1-1) Use the `capacitor-plugins` skill from `capawesome-team/skills` to install the `@capawesome/capacitor-superwall` plugin in my project.
 ``

If you prefer **Manual Setup**, install the plugin by running the following commands and follow the platform-specific instructions below:

`[](#%5F%5Fcodelineno-2-1)npm install @capawesome/capacitor-superwall
[](#%5F%5Fcodelineno-2-2)npx cap sync
`

### Android[¶](#android "Permanent link")

#### Variables[¶](#variables "Permanent link")

This plugin will use the following project variables (defined in your app's `variables.gradle` file):

* `$superwallAndroidVersion` version of `com.superwall.sdk:superwall-android` (default: `2.6.6`)

#### Manifest[¶](#manifest "Permanent link")

Add the required activities to your `AndroidManifest.xml` file:

`[](#%5F%5Fcodelineno-3-1)<activity
[](#%5F%5Fcodelineno-3-2)  android:name="com.superwall.sdk.paywall.view.SuperwallPaywallActivity"
[](#%5F%5Fcodelineno-3-3)  android:theme="@style/Theme.MaterialComponents.DayNight.NoActionBar"
[](#%5F%5Fcodelineno-3-4)  android:configChanges="orientation|screenSize|keyboardHidden">
[](#%5F%5Fcodelineno-3-5)</activity>
[](#%5F%5Fcodelineno-3-6)<activity android:name="com.superwall.sdk.debug.DebugViewActivity" />
[](#%5F%5Fcodelineno-3-7)<activity android:name="com.superwall.sdk.debug.localizations.SWLocalizationActivity" />
[](#%5F%5Fcodelineno-3-8)<activity android:name="com.superwall.sdk.debug.SWConsoleActivity" />
`

Set your app's theme in the `android:theme` section of the `SuperwallPaywallActivity`.

## Configuration[¶](#configuration "Permanent link")

No configuration required for this plugin.

## Usage[¶](#usage "Permanent link")

`[](#%5F%5Fcodelineno-4-1)import { Superwall } from '@capawesome/capacitor-superwall';
[](#%5F%5Fcodelineno-4-2)
[](#%5F%5Fcodelineno-4-3)const configureSuperwall = async () => {
[](#%5F%5Fcodelineno-4-4)  await Superwall.configure({
[](#%5F%5Fcodelineno-4-5)    apiKey: 'pk_your_api_key_here',
[](#%5F%5Fcodelineno-4-6)    options: {
[](#%5F%5Fcodelineno-4-7)      paywalls: {
[](#%5F%5Fcodelineno-4-8)        shouldPreload: true,
[](#%5F%5Fcodelineno-4-9)        automaticallyDismiss: true,
[](#%5F%5Fcodelineno-4-10)      },
[](#%5F%5Fcodelineno-4-11)      logging: {
[](#%5F%5Fcodelineno-4-12)        level: 'WARN',
[](#%5F%5Fcodelineno-4-13)        scopes: ['ALL'],
[](#%5F%5Fcodelineno-4-14)      },
[](#%5F%5Fcodelineno-4-15)    },
[](#%5F%5Fcodelineno-4-16)  });
[](#%5F%5Fcodelineno-4-17)};
[](#%5F%5Fcodelineno-4-18)
[](#%5F%5Fcodelineno-4-19)const showPaywall = async () => {
[](#%5F%5Fcodelineno-4-20)  const result = await Superwall.register({
[](#%5F%5Fcodelineno-4-21)    placement: 'premium_feature',
[](#%5F%5Fcodelineno-4-22)    params: {
[](#%5F%5Fcodelineno-4-23)      user_level: 5,
[](#%5F%5Fcodelineno-4-24)      source: 'settings',
[](#%5F%5Fcodelineno-4-25)    },
[](#%5F%5Fcodelineno-4-26)  });
[](#%5F%5Fcodelineno-4-27)
[](#%5F%5Fcodelineno-4-28)  console.log('Paywall result:', result.result); // 'PURCHASED', 'CANCELLED', or 'RESTORED'
[](#%5F%5Fcodelineno-4-29)};
[](#%5F%5Fcodelineno-4-30)
[](#%5F%5Fcodelineno-4-31)const checkPaywall = async () => {
[](#%5F%5Fcodelineno-4-32)  const result = await Superwall.getPresentationResult({
[](#%5F%5Fcodelineno-4-33)    placement: 'premium_feature',
[](#%5F%5Fcodelineno-4-34)  });
[](#%5F%5Fcodelineno-4-35)
[](#%5F%5Fcodelineno-4-36)  if (result.type === 'PAYWALL') {
[](#%5F%5Fcodelineno-4-37)    console.log('Paywall would be shown');
[](#%5F%5Fcodelineno-4-38)  } else if (result.type === 'NO_AUDIENCE_MATCH') {
[](#%5F%5Fcodelineno-4-39)    console.log('User does not match audience, no paywall');
[](#%5F%5Fcodelineno-4-40)  }
[](#%5F%5Fcodelineno-4-41)};
[](#%5F%5Fcodelineno-4-42)
[](#%5F%5Fcodelineno-4-43)const identifyUser = async (userId: string) => {
[](#%5F%5Fcodelineno-4-44)  await Superwall.identify({
[](#%5F%5Fcodelineno-4-45)    userId: userId,
[](#%5F%5Fcodelineno-4-46)    options: {
[](#%5F%5Fcodelineno-4-47)      restorePaywallAssignments: true,
[](#%5F%5Fcodelineno-4-48)    },
[](#%5F%5Fcodelineno-4-49)  });
[](#%5F%5Fcodelineno-4-50)};
[](#%5F%5Fcodelineno-4-51)
[](#%5F%5Fcodelineno-4-52)const setAttributes = async () => {
[](#%5F%5Fcodelineno-4-53)  await Superwall.setUserAttributes({
[](#%5F%5Fcodelineno-4-54)    attributes: {
[](#%5F%5Fcodelineno-4-55)      username: 'john_doe',
[](#%5F%5Fcodelineno-4-56)      subscription_tier: 'free',
[](#%5F%5Fcodelineno-4-57)      total_purchases: 5,
[](#%5F%5Fcodelineno-4-58)    },
[](#%5F%5Fcodelineno-4-59)  });
[](#%5F%5Fcodelineno-4-60)};
[](#%5F%5Fcodelineno-4-61)
[](#%5F%5Fcodelineno-4-62)const checkSubscription = async () => {
[](#%5F%5Fcodelineno-4-63)  const result = await Superwall.getSubscriptionStatus();
[](#%5F%5Fcodelineno-4-64)  console.log('Subscription status:', result.status); // 'ACTIVE', 'INACTIVE', or 'UNKNOWN'
[](#%5F%5Fcodelineno-4-65)};
[](#%5F%5Fcodelineno-4-66)
[](#%5F%5Fcodelineno-4-67)const addListeners = async () => {
[](#%5F%5Fcodelineno-4-68)  // Forward analytics events to your platform
[](#%5F%5Fcodelineno-4-69)  await Superwall.addListener('superwallEvent', (event) => {
[](#%5F%5Fcodelineno-4-70)    console.log('Superwall event:', event.type, event.data);
[](#%5F%5Fcodelineno-4-71)    // Forward to your analytics: Analytics.track(event.type, event.data);
[](#%5F%5Fcodelineno-4-72)  });
[](#%5F%5Fcodelineno-4-73)
[](#%5F%5Fcodelineno-4-74)  // Track subscription status changes
[](#%5F%5Fcodelineno-4-75)  await Superwall.addListener('subscriptionStatusDidChange', (event) => {
[](#%5F%5Fcodelineno-4-76)    console.log('Subscription status changed to:', event.status);
[](#%5F%5Fcodelineno-4-77)  });
[](#%5F%5Fcodelineno-4-78)
[](#%5F%5Fcodelineno-4-79)  // Handle paywall lifecycle events
[](#%5F%5Fcodelineno-4-80)  await Superwall.addListener('paywallPresented', (event) => {
[](#%5F%5Fcodelineno-4-81)    console.log('Paywall presented:', event.paywallInfo.placement);
[](#%5F%5Fcodelineno-4-82)  });
[](#%5F%5Fcodelineno-4-83)
[](#%5F%5Fcodelineno-4-84)  await Superwall.addListener('paywallDismissed', (event) => {
[](#%5F%5Fcodelineno-4-85)    console.log('Paywall dismissed:', event.paywallInfo.placement);
[](#%5F%5Fcodelineno-4-86)  });
[](#%5F%5Fcodelineno-4-87)
[](#%5F%5Fcodelineno-4-88)  // Handle custom paywall actions
[](#%5F%5Fcodelineno-4-89)  await Superwall.addListener('customPaywallAction', (event) => {
[](#%5F%5Fcodelineno-4-90)    console.log('Custom action:', event.name);
[](#%5F%5Fcodelineno-4-91)    // Handle custom actions like 'help', 'contact', etc.
[](#%5F%5Fcodelineno-4-92)  });
[](#%5F%5Fcodelineno-4-93)};
[](#%5F%5Fcodelineno-4-94)
[](#%5F%5Fcodelineno-4-95)const handleCampaignDeepLink = async (url: string) => {
[](#%5F%5Fcodelineno-4-96)  await Superwall.handleDeepLink({ url });
[](#%5F%5Fcodelineno-4-97)};
[](#%5F%5Fcodelineno-4-98)
[](#%5F%5Fcodelineno-4-99)const logout = async () => {
[](#%5F%5Fcodelineno-4-100)  await Superwall.reset();
[](#%5F%5Fcodelineno-4-101)};
`

## API[¶](#api "Permanent link")

* [configure(...)](#configure)
* [register(...)](#register)
* [getPresentationResult(...)](#getpresentationresult)
* [identify(...)](#identify)
* [reset()](#reset)
* [getUserId()](#getuserid)
* [getIsLoggedIn()](#getisloggedin)
* [setUserAttributes(...)](#setuserattributes)
* [handleDeepLink(...)](#handledeeplink)
* [getSubscriptionStatus()](#getsubscriptionstatus)
* [addListener('superwallEvent', ...)](#addlistenersuperwallevent-)
* [addListener('subscriptionStatusDidChange', ...)](#addlistenersubscriptionstatusdidchange-)
* [addListener('paywallPresented', ...)](#addlistenerpaywallpresented-)
* [addListener('paywallWillDismiss', ...)](#addlistenerpaywallwilldismiss-)
* [addListener('paywallDismissed', ...)](#addlistenerpaywalldismissed-)
* [addListener('customPaywallAction', ...)](#addlistenercustompaywallaction-)
* [removeAllListeners()](#removealllisteners)
* [Interfaces](#interfaces)
* [Enums](#enums)

### configure(...)[¶](#configure "Permanent link")

`[](#%5F%5Fcodelineno-5-1)configure(options: ConfigureOptions) => Promise<void>
`

Configure the Superwall SDK.

This method must be called once before all other methods.

Only available on Android and iOS.

| Param       | Type                                  |
| ----------- | ------------------------------------- |
| **options** | [ConfigureOptions](#configureoptions) |

**Since:** 0.0.1

---

### register(...)[¶](#register "Permanent link")

`[](#%5F%5Fcodelineno-6-1)register(options: RegisterOptions) => Promise<RegisterResult>
`

Register a placement and present a paywall if the user doesn't have an active subscription.

This is the primary method for feature gating and paywall presentation. The feature closure will execute based on the gating mode: - Non-gated: Executes immediately - Gated: Executes after subscription or if already subscribed

Only available on Android and iOS.

| Param       | Type                                |
| ----------- | ----------------------------------- |
| **options** | [RegisterOptions](#registeroptions) |

**Returns:** `Promise<[RegisterResult](#registerresult)>`

**Since:** 0.0.1

---

### getPresentationResult(...)[¶](#getpresentationresult "Permanent link")

`[](#%5F%5Fcodelineno-7-1)getPresentationResult(options: GetPresentationResultOptions) => Promise<GetPresentationResultResult>
`

Check if a paywall would be presented for a placement without actually presenting it.

Useful for determining whether to show a feature or paywall before the user interacts.

Only available on Android and iOS.

| Param       | Type                                                          |
| ----------- | ------------------------------------------------------------- |
| **options** | [GetPresentationResultOptions](#getpresentationresultoptions) |

**Returns:** `Promise<[GetPresentationResultResult](#getpresentationresultresult)>`

**Since:** 0.0.1

---

### identify(...)[¶](#identify "Permanent link")

`[](#%5F%5Fcodelineno-8-1)identify(options: IdentifyOptions) => Promise<void>
`

Identify the current user with a unique ID.

This links the user ID to their anonymous alias for analytics and paywall assignments.

Only available on Android and iOS.

| Param       | Type                                |
| ----------- | ----------------------------------- |
| **options** | [IdentifyOptions](#identifyoptions) |

**Since:** 0.0.1

---

### reset()[¶](#reset "Permanent link")

`[](#%5F%5Fcodelineno-9-1)reset() => Promise<void>
`

Reset the user identity.

This rotates the anonymous user ID, clears local paywall assignments, and requires the SDK to re-download configuration. Should only be called on explicit logout.

Only available on Android and iOS.

**Since:** 0.0.1

---

### getUserId()[¶](#getuserid "Permanent link")

`[](#%5F%5Fcodelineno-10-1)getUserId() => Promise<GetUserIdResult>
`

Get the current user ID.

Returns the identified user ID if set, otherwise returns the anonymous ID.

Only available on Android and iOS.

**Returns:** `Promise<[GetUserIdResult](#getuseridresult)>`

**Since:** 0.0.1

---

### getIsLoggedIn()[¶](#getisloggedin "Permanent link")

`[](#%5F%5Fcodelineno-11-1)getIsLoggedIn() => Promise<GetIsLoggedInResult>
`

Check if the user is logged in (identified).

Only available on Android and iOS.

**Returns:** `Promise<[GetIsLoggedInResult](#getisloggedinresult)>`

**Since:** 0.0.1

---

### setUserAttributes(...)[¶](#setuserattributes "Permanent link")

`[](#%5F%5Fcodelineno-12-1)setUserAttributes(options: SetUserAttributesOptions) => Promise<void>
`

Set custom user attributes for personalization and audience filtering.

Attributes can be used in audience filters on the Superwall dashboard. Keys starting with `$` are reserved for Superwall use. Arrays and nested structures are not supported. Set values to null to remove attributes.

Only available on Android and iOS.

| Param       | Type                                                  |
| ----------- | ----------------------------------------------------- |
| **options** | [SetUserAttributesOptions](#setuserattributesoptions) |

**Since:** 0.0.1

---

### handleDeepLink(...)[¶](#handledeeplink "Permanent link")

`[](#%5F%5Fcodelineno-13-1)handleDeepLink(options: HandleDeepLinkOptions) => Promise<void>
`

Handle a deep link URL for paywall campaigns.

This processes deep links associated with Superwall campaigns configured on the dashboard.

Only available on Android and iOS.

| Param       | Type                                            |
| ----------- | ----------------------------------------------- |
| **options** | [HandleDeepLinkOptions](#handledeeplinkoptions) |

**Since:** 0.0.1

---

### getSubscriptionStatus()[¶](#getsubscriptionstatus "Permanent link")

`[](#%5F%5Fcodelineno-14-1)getSubscriptionStatus() => Promise<GetSubscriptionStatusResult>
`

Get the current subscription status.

Only available on Android and iOS.

**Returns:** `Promise<[GetSubscriptionStatusResult](#getsubscriptionstatusresult)>`

**Since:** 0.0.1

---

### addListener('superwallEvent', ...)[¶](#addlistenersuperwallevent "Permanent link")

`[](#%5F%5Fcodelineno-15-1)addListener(eventName: 'superwallEvent', listenerFunc: (event: SuperwallEventInfo) => void) => Promise<PluginListenerHandle>
`

Add a listener for Superwall analytics events.

These events can be forwarded to your analytics platform.

Only available on Android and iOS.

| Param            | Type                                                       |
| ---------------- | ---------------------------------------------------------- |
| **eventName**    | 'superwallEvent'                                           |
| **listenerFunc** | (event: [SuperwallEventInfo](#superwalleventinfo)) => void |

**Returns:** `Promise<[PluginListenerHandle](#pluginlistenerhandle)>`

**Since:** 0.0.1

---

### addListener('subscriptionStatusDidChange', ...)[¶](#addlistenersubscriptionstatusdidchange "Permanent link")

`[](#%5F%5Fcodelineno-16-1)addListener(eventName: 'subscriptionStatusDidChange', listenerFunc: (event: SubscriptionStatusDidChangeEvent) => void) => Promise<PluginListenerHandle>
`

Add a listener for subscription status changes.

Only available on Android and iOS.

| Param            | Type                                                                                   |
| ---------------- | -------------------------------------------------------------------------------------- |
| **eventName**    | 'subscriptionStatusDidChange'                                                          |
| **listenerFunc** | (event: [SubscriptionStatusDidChangeEvent](#subscriptionstatusdidchangeevent)) => void |

**Returns:** `Promise<[PluginListenerHandle](#pluginlistenerhandle)>`

**Since:** 0.0.1

---

### addListener('paywallPresented', ...)[¶](#addlistenerpaywallpresented "Permanent link")

`[](#%5F%5Fcodelineno-17-1)addListener(eventName: 'paywallPresented', listenerFunc: (event: PaywallPresentedEvent) => void) => Promise<PluginListenerHandle>
`

Add a listener for when a paywall is presented.

Only available on Android and iOS.

| Param            | Type                                                             |
| ---------------- | ---------------------------------------------------------------- |
| **eventName**    | 'paywallPresented'                                               |
| **listenerFunc** | (event: [PaywallPresentedEvent](#paywallpresentedevent)) => void |

**Returns:** `Promise<[PluginListenerHandle](#pluginlistenerhandle)>`

**Since:** 0.0.1

---

### addListener('paywallWillDismiss', ...)[¶](#addlistenerpaywallwilldismiss "Permanent link")

`[](#%5F%5Fcodelineno-18-1)addListener(eventName: 'paywallWillDismiss', listenerFunc: (event: PaywallWillDismissEvent) => void) => Promise<PluginListenerHandle>
`

Add a listener for when a paywall will dismiss.

Only available on Android and iOS.

| Param            | Type                                                                 |
| ---------------- | -------------------------------------------------------------------- |
| **eventName**    | 'paywallWillDismiss'                                                 |
| **listenerFunc** | (event: [PaywallWillDismissEvent](#paywallwilldismissevent)) => void |

**Returns:** `Promise<[PluginListenerHandle](#pluginlistenerhandle)>`

**Since:** 0.0.1

---

### addListener('paywallDismissed', ...)[¶](#addlistenerpaywalldismissed "Permanent link")

`[](#%5F%5Fcodelineno-19-1)addListener(eventName: 'paywallDismissed', listenerFunc: (event: PaywallDismissedEvent) => void) => Promise<PluginListenerHandle>
`

Add a listener for when a paywall is dismissed.

Only available on Android and iOS.

| Param            | Type                                                             |
| ---------------- | ---------------------------------------------------------------- |
| **eventName**    | 'paywallDismissed'                                               |
| **listenerFunc** | (event: [PaywallDismissedEvent](#paywalldismissedevent)) => void |

**Returns:** `Promise<[PluginListenerHandle](#pluginlistenerhandle)>`

**Since:** 0.0.1

---

### addListener('customPaywallAction', ...)[¶](#addlistenercustompaywallaction "Permanent link")

`[](#%5F%5Fcodelineno-20-1)addListener(eventName: 'customPaywallAction', listenerFunc: (event: CustomPaywallActionEvent) => void) => Promise<PluginListenerHandle>
`

Add a listener for custom paywall actions.

Triggered when a user taps an element with the `data-pw-custom` attribute.

Only available on Android and iOS.

| Param            | Type                                                                   |
| ---------------- | ---------------------------------------------------------------------- |
| **eventName**    | 'customPaywallAction'                                                  |
| **listenerFunc** | (event: [CustomPaywallActionEvent](#custompaywallactionevent)) => void |

**Returns:** `Promise<[PluginListenerHandle](#pluginlistenerhandle)>`

**Since:** 0.0.1

---

### removeAllListeners()[¶](#removealllisteners "Permanent link")

`[](#%5F%5Fcodelineno-21-1)removeAllListeners() => Promise<void>
`

Remove all listeners for this plugin.

**Since:** 0.0.1

---

### Interfaces[¶](#interfaces "Permanent link")

#### ConfigureOptions[¶](#configureoptions "Permanent link")

| Prop        | Type                                  | Description                                 | Since |
| ----------- | ------------------------------------- | ------------------------------------------- | ----- |
| **apiKey**  | string                                | The Superwall API key from your dashboard.  | 0.0.1 |
| **options** | [SuperwallOptions](#superwalloptions) | Optional configuration options for the SDK. | 0.0.1 |

#### SuperwallOptions[¶](#superwalloptions "Permanent link")

| Prop                                | Type                                      | Description                                                                          | Default                    | Since |
| ----------------------------------- | ----------------------------------------- | ------------------------------------------------------------------------------------ | -------------------------- | ----- |
| **paywalls**                        | [PaywallOptions](#paywalloptions)         | Paywall presentation and behavior options.                                           | 0.0.1                      |       |
| **logging**                         | [LoggingOptions](#loggingoptions)         | Logging configuration.                                                               | 0.0.1                      |       |
| **networkEnvironment**              | [NetworkEnvironment](#networkenvironment) | Network environment for API requests.                                                | NetworkEnvironment.Release | 0.0.1 |
| **localeIdentifier**                | string                                    | Override the locale identifier for localization.                                     | 0.0.1                      |       |
| **shouldObservePurchases**          | boolean                                   | Observe external Google Play purchases. Only available on Android.                   | true                       | 0.0.1 |
| **isExternalDataCollectionEnabled** | boolean                                   | Enable or disable external data collection for analytics. Only available on Android. | true                       | 0.0.1 |

#### PaywallOptions[¶](#paywalloptions "Permanent link")

| Prop                               | Type    | Description                                           | Default | Since |
| ---------------------------------- | ------- | ----------------------------------------------------- | ------- | ----- |
| **isHapticFeedbackEnabled**        | boolean | Enable haptic feedback on paywall interactions.       | true    | 0.0.1 |
| **shouldShowPurchaseFailureAlert** | boolean | Show an alert when purchase restoration fails.        | true    | 0.0.1 |
| **shouldPreload**                  | boolean | Preload paywalls during SDK initialization.           | true    | 0.0.1 |
| **automaticallyDismiss**           | boolean | Automatically dismiss paywall on purchase or restore. | true    | 0.0.1 |

#### LoggingOptions[¶](#loggingoptions "Permanent link")

| Prop       | Type                  | Description                 | Default          | Since |
| ---------- | --------------------- | --------------------------- | ---------------- | ----- |
| **level**  | [LogLevel](#loglevel) | The log level for SDK logs. | LogLevel.Warn    | 0.0.1 |
| **scopes** | LogScope\[\]          | The log scopes to enable.   | \[LogScope.All\] | 0.0.1 |

#### RegisterResult[¶](#registerresult "Permanent link")

| Prop       | Type                            | Description                             | Since |
| ---------- | ------------------------------- | --------------------------------------- | ----- |
| **result** | [PaywallResult](#paywallresult) | The result of the paywall presentation. | 0.0.1 |

#### RegisterOptions[¶](#registeroptions "Permanent link")

| Prop          | Type                | Description                                                                                      | Since |
| ------------- | ------------------- | ------------------------------------------------------------------------------------------------ | ----- |
| **placement** | string              | The placement identifier configured in the Superwall dashboard.                                  | 0.0.1 |
| **params**    | Record<string, any> | Optional parameters for audience filtering. Keys starting with $ are reserved for Superwall use. | 0.0.1 |

#### GetPresentationResultResult[¶](#getpresentationresultresult "Permanent link")

| Prop           | Type                                              | Description                                                                  | Since |
| -------------- | ------------------------------------------------- | ---------------------------------------------------------------------------- | ----- |
| **type**       | [PresentationResultType](#presentationresulttype) | The type of presentation result.                                             | 0.0.1 |
| **experiment** | [Experiment](#experiment)                         | [Experiment](#experiment) information if the result is a paywall or holdout. | 0.0.1 |

#### Experiment[¶](#experiment "Permanent link")

| Prop        | Type   | Description                               | Since |
| ----------- | ------ | ----------------------------------------- | ----- |
| **id**      | string | The unique identifier for the experiment. | 0.0.1 |
| **variant** | string | The variant assigned to the user.         | 0.0.1 |

#### GetPresentationResultOptions[¶](#getpresentationresultoptions "Permanent link")

| Prop          | Type                | Description                                 | Since |
| ------------- | ------------------- | ------------------------------------------- | ----- |
| **placement** | string              | The placement identifier to check.          | 0.0.1 |
| **params**    | Record<string, any> | Optional parameters for audience filtering. | 0.0.1 |

#### IdentifyOptions[¶](#identifyoptions "Permanent link")

| Prop        | Type                                            | Description                              | Since |
| ----------- | ----------------------------------------------- | ---------------------------------------- | ----- |
| **userId**  | string                                          | The unique user ID to identify the user. | 0.0.1 |
| **options** | [IdentifyOptionsConfig](#identifyoptionsconfig) | Additional options for identification.   | 0.0.1 |

#### IdentifyOptionsConfig[¶](#identifyoptionsconfig "Permanent link")

| Prop                          | Type    | Description                                                                                              | Default | Since |
| ----------------------------- | ------- | -------------------------------------------------------------------------------------------------------- | ------- | ----- |
| **restorePaywallAssignments** | boolean | Restore paywall assignments from the server. Set to true when switching accounts to restore assignments. | false   | 0.0.1 |

#### GetUserIdResult[¶](#getuseridresult "Permanent link")

| Prop       | Type   | Description                                    | Since |
| ---------- | ------ | ---------------------------------------------- | ----- |
| **userId** | string | The current user ID (identified or anonymous). | 0.0.1 |

#### GetIsLoggedInResult[¶](#getisloggedinresult "Permanent link")

| Prop           | Type    | Description                                 | Since |
| -------------- | ------- | ------------------------------------------- | ----- |
| **isLoggedIn** | boolean | Whether the user is logged in (identified). | 0.0.1 |

#### SetUserAttributesOptions[¶](#setuserattributesoptions "Permanent link")

| Prop           | Type                | Description                                                                                                     | Since |
| -------------- | ------------------- | --------------------------------------------------------------------------------------------------------------- | ----- |
| **attributes** | Record<string, any> | User attributes as key-value pairs. Keys starting with $ are reserved. Set values to null to remove attributes. | 0.0.1 |

#### HandleDeepLinkOptions[¶](#handledeeplinkoptions "Permanent link")

| Prop    | Type   | Description                  | Since |
| ------- | ------ | ---------------------------- | ----- |
| **url** | string | The deep link URL to handle. | 0.0.1 |

#### GetSubscriptionStatusResult[¶](#getsubscriptionstatusresult "Permanent link")

| Prop       | Type                                      | Description                      | Since |
| ---------- | ----------------------------------------- | -------------------------------- | ----- |
| **status** | [SubscriptionStatus](#subscriptionstatus) | The current subscription status. | 0.0.1 |

#### PluginListenerHandle[¶](#pluginlistenerhandle "Permanent link")

| Prop       | Type                |
| ---------- | ------------------- |
| **remove** | () => Promise<void> |

#### SuperwallEventInfo[¶](#superwalleventinfo "Permanent link")

| Prop     | Type                                      | Description                               | Since |
| -------- | ----------------------------------------- | ----------------------------------------- | ----- |
| **type** | [SuperwallEventType](#superwalleventtype) | The type of Superwall event.              | 0.0.1 |
| **data** | Record<string, any>                       | Additional event data as key-value pairs. | 0.0.1 |

#### SubscriptionStatusDidChangeEvent[¶](#subscriptionstatusdidchangeevent "Permanent link")

| Prop       | Type                                      | Description                  | Since |
| ---------- | ----------------------------------------- | ---------------------------- | ----- |
| **status** | [SubscriptionStatus](#subscriptionstatus) | The new subscription status. | 0.0.1 |

#### PaywallPresentedEvent[¶](#paywallpresentedevent "Permanent link")

| Prop            | Type                        | Description                              | Since |
| --------------- | --------------------------- | ---------------------------------------- | ----- |
| **paywallInfo** | [PaywallInfo](#paywallinfo) | Information about the presented paywall. | 0.0.1 |

#### PaywallInfo[¶](#paywallinfo "Permanent link")

| Prop           | Type                      | Description                                                                  | Since |
| -------------- | ------------------------- | ---------------------------------------------------------------------------- | ----- |
| **id**         | string                    | The unique identifier for the paywall.                                       | 0.0.1 |
| **placement**  | string                    | The placement identifier.                                                    | 0.0.1 |
| **experiment** | [Experiment](#experiment) | [Experiment](#experiment) information if the paywall is part of an A/B test. | 0.0.1 |
| **data**       | Record<string, any>       | Additional paywall metadata.                                                 | 0.0.1 |

#### PaywallWillDismissEvent[¶](#paywallwilldismissevent "Permanent link")

| Prop            | Type                        | Description                                    | Since |
| --------------- | --------------------------- | ---------------------------------------------- | ----- |
| **paywallInfo** | [PaywallInfo](#paywallinfo) | Information about the paywall being dismissed. | 0.0.1 |

#### PaywallDismissedEvent[¶](#paywalldismissedevent "Permanent link")

| Prop            | Type                        | Description                              | Since |
| --------------- | --------------------------- | ---------------------------------------- | ----- |
| **paywallInfo** | [PaywallInfo](#paywallinfo) | Information about the dismissed paywall. | 0.0.1 |

#### CustomPaywallActionEvent[¶](#custompaywallactionevent "Permanent link")

| Prop     | Type   | Description                    | Since |
| -------- | ------ | ------------------------------ | ----- |
| **name** | string | The name of the custom action. | 0.0.1 |

### Enums[¶](#enums "Permanent link")

#### LogLevel[¶](#loglevel "Permanent link")

| Members   | Value   | Description            | Since |
| --------- | ------- | ---------------------- | ----- |
| **Debug** | 'DEBUG' | Debug level logging.   | 0.0.1 |
| **Info**  | 'INFO'  | Info level logging.    | 0.0.1 |
| **Warn**  | 'WARN'  | Warning level logging. | 0.0.1 |
| **Error** | 'ERROR' | Error level logging.   | 0.0.1 |

#### LogScope[¶](#logscope "Permanent link")

| Members       | Value       | Description                 | Since |
| ------------- | ----------- | --------------------------- | ----- |
| **All**       | 'ALL'       | All log scopes.             | 0.0.1 |
| **Analytics** | 'ANALYTICS' | Analytics related logs.     | 0.0.1 |
| **Config**    | 'CONFIG'    | Configuration related logs. | 0.0.1 |
| **Events**    | 'EVENTS'    | Event tracking logs.        | 0.0.1 |
| **Paywalls**  | 'PAYWALLS'  | Paywall related logs.       | 0.0.1 |
| **Purchases** | 'PURCHASES' | Purchase related logs.      | 0.0.1 |

#### NetworkEnvironment[¶](#networkenvironment "Permanent link")

| Members       | Value       | Description                          | Since |
| ------------- | ----------- | ------------------------------------ | ----- |
| **Release**   | 'RELEASE'   | Production environment.              | 0.0.1 |
| **Developer** | 'DEVELOPER' | Development environment for testing. | 0.0.1 |

#### PaywallResult[¶](#paywallresult "Permanent link")

| Members       | Value       | Description                 | Since |
| ------------- | ----------- | --------------------------- | ----- |
| **Purchased** | 'PURCHASED' | User completed a purchase.  | 0.0.1 |
| **Cancelled** | 'CANCELLED' | User cancelled the paywall. | 0.0.1 |
| **Restored**  | 'RESTORED'  | User restored purchases.    | 0.0.1 |

#### PresentationResultType[¶](#presentationresulttype "Permanent link")

| Members                 | Value                     | Description                             | Since |
| ----------------------- | ------------------------- | --------------------------------------- | ----- |
| **PlacementNotFound**   | 'PLACEMENT\_NOT\_FOUND'   | The placement was not found.            | 0.0.1 |
| **NoAudienceMatch**     | 'NO\_AUDIENCE\_MATCH'     | No audience matched for this placement. | 0.0.1 |
| **Paywall**             | 'PAYWALL'                 | A paywall would be presented.           | 0.0.1 |
| **Holdout**             | 'HOLDOUT'                 | User is in a holdout group.             | 0.0.1 |
| **PaywallNotAvailable** | 'PAYWALL\_NOT\_AVAILABLE' | Paywall is not available.               | 0.0.1 |

#### SubscriptionStatus[¶](#subscriptionstatus "Permanent link")

| Members      | Value      | Description                                | Since |
| ------------ | ---------- | ------------------------------------------ | ----- |
| **Unknown**  | 'UNKNOWN'  | Subscription status is unknown.            | 0.0.1 |
| **Active**   | 'ACTIVE'   | User has an active subscription.           | 0.0.1 |
| **Inactive** | 'INACTIVE' | User does not have an active subscription. | 0.0.1 |

#### SuperwallEventType[¶](#superwalleventtype "Permanent link")

| Members                         | Value                               | Description                  | Since |
| ------------------------------- | ----------------------------------- | ---------------------------- | ----- |
| **FirstSeen**                   | 'FIRST\_SEEN'                       | First time user is seen.     | 0.0.1 |
| **AppOpen**                     | 'APP\_OPEN'                         | App was opened.              | 0.0.1 |
| **AppLaunch**                   | 'APP\_LAUNCH'                       | App was launched.            | 0.0.1 |
| **AppClose**                    | 'APP\_CLOSE'                        | App was closed.              | 0.0.1 |
| **SessionStart**                | 'SESSION\_START'                    | Session started.             | 0.0.1 |
| **DeepLink**                    | 'DEEP\_LINK'                        | Deep link was opened.        | 0.0.1 |
| **TriggerFire**                 | 'TRIGGER\_FIRE'                     | Trigger was fired.           | 0.0.1 |
| **PaywallOpen**                 | 'PAYWALL\_OPEN'                     | Paywall was opened.          | 0.0.1 |
| **PaywallClose**                | 'PAYWALL\_CLOSE'                    | Paywall was closed.          | 0.0.1 |
| **PaywallDecline**              | 'PAYWALL\_DECLINE'                  | Paywall was declined.        | 0.0.1 |
| **TransactionStart**            | 'TRANSACTION\_START'                | Transaction started.         | 0.0.1 |
| **TransactionComplete**         | 'TRANSACTION\_COMPLETE'             | Transaction completed.       | 0.0.1 |
| **TransactionFail**             | 'TRANSACTION\_FAIL'                 | Transaction failed.          | 0.0.1 |
| **TransactionAbandon**          | 'TRANSACTION\_ABANDON'              | Transaction was abandoned.   | 0.0.1 |
| **TransactionRestore**          | 'TRANSACTION\_RESTORE'              | Transaction restore.         | 0.0.1 |
| **TransactionTimeout**          | 'TRANSACTION\_TIMEOUT'              | Transaction timeout.         | 0.0.1 |
| **SubscriptionStart**           | 'SUBSCRIPTION\_START'               | Subscription started.        | 0.0.1 |
| **FreeTrialStart**              | 'FREE\_TRIAL\_START'                | Free trial started.          | 0.0.1 |
| **SubscriptionStatusDidChange** | 'SUBSCRIPTION\_STATUS\_DID\_CHANGE' | Subscription status changed. | 0.0.1 |

## Changelog[¶](#changelog "Permanent link")

See [CHANGELOG.md](https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/superwall/CHANGELOG.md).

## License[¶](#license "Permanent link")

See [LICENSE](https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/superwall/LICENSE).

---

1. This project is not affiliated with, endorsed by, sponsored by, or approved by Nest 22, Inc. or any of their affiliates or subsidiaries. [↩](#fnref:1 "Jump back to footnote 1 in the text")

May 17, 2026 

 Back to top 