> ## Documentation Index
> Fetch the complete documentation index at: https://moengage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Superwall

> Stream subscription lifecycle events from Superwall to MoEngage via webhooks to power personalized engagement based on purchase, renewal, and churn data.

[Superwall](https://superwall.com/) is a paywall and subscription infrastructure platform that helps mobile apps build, test, and optimize paywalls without requiring app updates. It offers A/B testing, targeting, and revenue analytics, and supports subscription events across the App Store, Play Store, and Stripe.

# MoEngage × Superwall

By connecting Superwall and MoEngage, you can use live customer insights to build comprehensive user profiles and run personalized engagement strategies. This integration transfers subscription lifecycle data from Superwall to MoEngage, improving audience segmentation and maintaining data consistency across your marketing stack.

## Use Cases

Integrating Superwall with MoEngage helps you address the following use cases:

* **Recover lost sales**: When a payment fails or a billing issue occurs (`billing_issue`), automatically trigger a reminder or a payment-update link to help users restore their access.
* **Drive trial conversions**: Identify users on a trial or introductory period and send timely content that highlights your app's value to nudge them toward a full subscription.
* **Win back churned users**: When a user cancels or expires (`cancellation`, `expiration`), trigger a personalized win-back offer.
* **Personalized onboarding and upselling**: Send a thank-you message after an `initial_purchase`, or target users who switch tiers (`product_change`) with tips for their new plan.
* **Proactive retention**: Identify users who pause a subscription (`subscription_paused`) and reach out with incentives before they leave.

## Key Features

The Superwall integration delivers the following capabilities within MoEngage:

* **Complete subscription journey tracking**: Track every milestone in the customer lifecycle, from initial purchases and renewals to cancellations, expirations, and trial periods.
* **Unified cross-platform data**: Whether your customers are on the App Store, Play Store, or Stripe, MoEngage normalizes the transaction data into one consistent format for your campaigns.
* **Deep insight into user behavior**: Understand how customers engage with your pricing by tracking events such as introductory offers, subscription pauses, and plan changes (upgrades or downgrades).

# Integration

<Info>
  **Prerequisites**

  Ensure you have admin access to your Superwall dashboard.
</Info>

## Step 1: Get Your MoEngage API Credentials

To get your MoEngage API credentials, perform the following steps:

1. On the left navigation menu in the MoEngage dashboard, click **Settings** > **Account** > **APIs**.
2. On the **APIs** page, copy the following credentials:
   * **Workspace ID** (earlier App ID).
   * **Data API Key**: Found under the **Data** tile.
3. Build your webhook URL by inserting your Workspace ID and Data API Key into the MoEngage endpoint, and replace `0X` with your data center number (for example, `api-01` for DC-01). Use the following format:
   ```text wrap theme={null}
   https://<YOUR_WORKSPACE_ID>:<YOUR_DATA_API_KEY>@api-0X.moengage.com/v1/partner/superwall/events/?configName=<config_name>
   ```

<img src="https://mintcdn.com/moengage/39Ybrz8W7WsGHdp0/images/moengage-api-credentials.png?fit=max&auto=format&n=39Ybrz8W7WsGHdp0&q=85&s=8b8a309a92132186980923af3df905f9" alt="MoEngage APIs settings page showing the Workspace ID and Data API Key fields" width="1636" height="932" data-path="images/moengage-api-credentials.png" />

<Info>
  Before you contact MoEngage Support for your unique ingestion endpoint, decide which customer identifier (for example, `originalAppUserId`) you will map. Make sure it aligns with your current MoEngage identity configuration to avoid creating duplicate profiles during the subscription data sync.
</Info>

For more information, refer to the [Superwall Webhooks documentation](https://superwall.com/docs/).

## Step 2: Configure the Webhook in Superwall

To configure the webhook in Superwall, perform the following steps:

1. Log in to your Superwall dashboard.
2. Select your application, and then click **Integrations** in the left menu.
3. Locate **Webhooks**, and click to add a new webhook.
4. Enter the following settings:
   | Field            | Value or Action                                                                                                 |
   | ---------------- | --------------------------------------------------------------------------------------------------------------- |
   | **Webhook Name** | Enter a webhook name.                                                                                           |
   | **Webhook URL**  | Paste the authenticated URL you generated in Step 1.                                                            |
   | **Events**       | Select the events you want to sync, such as `initial_purchase`, `renewal`, `cancellation`, and `billing_issue`. |
5. Click **Update Webhook**.

<img src="https://mintcdn.com/moengage/nLb_PbuGBCZhQ6GI/images/superwall-webhook-overview.png?fit=max&auto=format&n=nLb_PbuGBCZhQ6GI&q=85&s=d5eb7c0540bc14f50ad4c9635a16aafa" alt="Superwall Edit Webhook page showing the webhook name, URL, and the events to listen for" width="1788" height="1026" data-path="images/superwall-webhook-overview.png" />

## Step 3: Verify Data in MoEngage

Superwall webhooks fire only on real transactions (sandbox or production). iOS local StoreKit transactions do not fire webhooks; use the sandbox through TestFlight for testing.

To verify the data in MoEngage, perform the following steps:

1. Generate a transaction in your app's sandbox environment.
2. In MoEngage, go to **Segment** > **Search Users**.
3. Search for your test user by **Customer ID**.

Confirm that the `initial_purchase` or relevant event appears under the user's event attributes.

<img src="https://mintcdn.com/moengage/nLb_PbuGBCZhQ6GI/images/superwall-verify-event.png?fit=max&auto=format&n=nLb_PbuGBCZhQ6GI&q=85&s=0e980d20eb4bd431809c866b0ab0632c" alt="MoEngage Event activity tab showing the initial_purchase event with its attributes from the connected source" width="1834" height="1026" data-path="images/superwall-verify-event.png" />
