> ## 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.

# Adapty

> Integrate Adapty with MoEngage to sync mobile subscription lifecycle events and trigger churn-prevention, payment-recovery, and upsell journeys.

[Adapty](https://adapty.io/) is a comprehensive mobile subscription management platform that simplifies in-app purchase infrastructure, A/B testing, and analytics. This centralized hub enables businesses to manage subscription lifecycles by providing the necessary tools to attract, engage, and retain subscribers through data-driven insights.

## Key Features

The MoEngage and Adapty integration provides the following capabilities to help you manage and track your mobile subscription data:

* **Comprehensive subscription lifecycle tracking** : Synchronize more than [15 real-time events](https://adapty.io/docs/events), including subscription\_started, renewal\_cancelled, billing\_issue\_detected, and grace\_period.
* **Revenue and tax validation** : Access a detailed breakdown of net\_revenue, tax\_amount, and proceeds in both USD and local currencies.
* **User and attribution synchronization** : Automatically forward custom user attributes, attribution data (such as AppsFlyer), and third-party integration IDs.
* **Access level management** : Perform granular tracking of trial conversions, subscription pauses (for Android), and updates to lifetime access.

## Use cases

Integrating Adapty with MoEngage helps you with the following use cases:

* **Churn prevention and win-back** : Trigger automated email or push sequences in MoEngage when a *Subscription Canceled* event is detected to recover users before their access expires.
* **Payment recovery** : Automatically prompt users to update their payment methods via SMS or push notifications in MoEngage when a *Billing Issue* event is received.
* **Trial conversion optimization** : Initiate onboarding journeys in MoEngage for users who trigger a *Trial Started* event to highlight premium value before the trial ends.
* **Upsell to premium** : Identify loyal subscribers through *Subscription Renewed* events and trigger exclusive offers for higher-tier annual plans.

# Integration

<Info>
  Before you begin, ensure you have the following:

  * Admin permissions in Adapty to configure webhooks.
  * Admin access in MoEngage to retrieve API credentials.
  * A dedicated MoEngage ingestion endpoint obtained from MoEngage Support.\
    **Note** : When requesting the endpoint, specify the Customer Identifier (for example, profile\_id or UUID) used to link user profiles between Adapty and MoEngage.
</Info>

## Step 1: Generate Authentication Credentials

Adapty requires a Basic Authentication token to securely send data to MoEngage.

To generate authentication credentials, perform the following steps:

1. On the MoEngage UI, navigate to **Settings** > **Account** > **APIs**.
2. Copy the following credentials to be used for your token:
   1. **Username** : Copy the ID under **Workspace ID** **(earlier app id)**.
   2. **Password** : In the **API keys** section, copy the API key from the **Data** tile.<img src="https://mintcdn.com/moengage/0EdW-QMnfbsLxXT2/images/partner_45241748673940.png?fit=max&auto=format&n=0EdW-QMnfbsLxXT2&q=85&s=3fe3a4dd5d58bf2a80fc2e7f0b77b76b" width="1216" height="608" data-path="images/partner_45241748673940.png" />
3. Use an online [Basic Auth Header Generator](https://www.debugbear.com/basic-auth-header-generator) (or a tool like Postman) to generate your token:
   * **Username** : `{Your_Workspace_ID}`
   * **Password** : `{Your_Data_API_Key}`

**Note** : Your Basic Authentication token is a combination of your **Workspace ID** and **Data API Key**.

## Step 2: Configure the Webhook in Adapty

To configure the Webhook in Adapty, perform the following steps:

1. Log in to the **Adapty** UI.
2. On the left navigation menu, click **Integrations**.
3. Scroll to the **Server** section and click **webhooks**.<img src="https://mintcdn.com/moengage/0EdW-QMnfbsLxXT2/images/partner_45241247781140.png?fit=max&auto=format&n=0EdW-QMnfbsLxXT2&q=85&s=1d04d9371bde5d0d1cc2e468e59a3ab9" width="2532" height="1346" data-path="images/partner_45241247781140.png" />
4. Turn the **Webhook** toggle on.
5. Configure the following settings:

| Field                   | Value / Action                                                                                                                                                                                                                      |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Production Endpoint URL | Enter the URL provided by MoEngage Support. Format: [`https://api-0X.moengage.com/v1/partner/adapty/{events}/?configName={config_name}`](https://api-0X.moengage.com/v1/partner/adapty/%7Bevents%7D/?configName=%7Bconfig_name%7D). |
| Authorization Value     | Paste the Basic Auth token generated in step 1 (for example: Basic Qk5CR1NNNUR4eHh4…).                                                                                                                                              |

<img src="https://mintcdn.com/moengage/0EdW-QMnfbsLxXT2/images/partner_45240276198804.png?fit=max&auto=format&n=0EdW-QMnfbsLxXT2&q=85&s=6dfb7dccef940bf44f547aa5712a1a4c" alt="" width="2396" height="1364" data-path="images/partner_45240276198804.png" />

## Step 3: Select Data and Events

After entering the connection details, to configure the data payload, perform the following steps:

1. In the **Data Options** section, select the following check boxes:
   * **Send attribution:** Forwards ad network data (for example, AppsFlyer or Adjust).
   * **Send user attributes** : Forwards custom user profile data.
   * **Send Play Store purchase token:** Required for validation on Android devices.
2. In the **Event Names** section, select the specific events you want to track in MoEngage (such as subscription\_started or trial\_converted).
3. Click **Save** at the top of the pane to activate the integration. <img src="https://mintcdn.com/moengage/0EdW-QMnfbsLxXT2/images/partner_45240223306516.png?fit=max&auto=format&n=0EdW-QMnfbsLxXT2&q=85&s=2aa94967327185f27cf9dc23f4745c3f" width="2392" height="1362" data-path="images/partner_45240223306516.png" />

## Step 4: Verify Data in MoEngage

After you configure the webhooks, generate a test event in your Adapty application and validate the data within the MoEngage UI.

To verify data in MoEngage, perform the following steps:

1. Log in to the [MoEngage UI](https://app.moengage.com/).
2. On the left navigation menu, navigate to **Segments** > **Search Users**.
3. In the **Search Users** search box, locate a test user by using one of the following identifiers:
   * Customer ID
   * Email address
   * Phone number <img src="https://mintcdn.com/moengage/0EdW-QMnfbsLxXT2/images/partner_45241650283540.png?fit=max&auto=format&n=0EdW-QMnfbsLxXT2&q=85&s=af3c22a80bda73957f63c26bcec59340" width="2854" height="1598" data-path="images/partner_45241650283540.png" />
4. Verify that the profile contains the following information:
   * **Event attributes** : Confirm that the subscription event details (for example, *subscription\_started*) are listed under the events section.
   * **User attributes** : If you selected user attribute synchronization in [ Step 3 ](/partner-guide/data-and-analytics/payments-and-subscriptions/adapty#step-3-select-data-and-events),ensure these are reflected under the attributes section.
   * **Latest interaction timestamp** : Check the latest interaction timestamp to ensure it matches the time of your test event. <img src="https://mintcdn.com/moengage/0EdW-QMnfbsLxXT2/images/partner_45241719936532.png?fit=max&auto=format&n=0EdW-QMnfbsLxXT2&q=85&s=934972e0005f0db367dbfe58e4d182c7" width="2870" height="1378" data-path="images/partner_45241719936532.png" />

## Rate Limits

To maintain platform stability, MoEngage limits ingestion of Adapty data to a maximum of 500 requests per second (RPS) per workspace. If your workspace exceeds this limit, MoEngage returns an HTTP `429 (Too Many Requests)` status code.

Refer to Adapty's default retry policy to understand how rate limiting affects your data flow.

**Retry Exhaustion**: If Adapty exhausts all retry attempts for a batch of data, you must contact the Adapty Support Team to replay the failed requests.
