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

# Adapty

> Connect Adapty to pull paywall analytics, subscription events, and A/B test results into FloKit.

## What FloKit reads from Adapty

Once connected, FloKit ingests the following Adapty data:

* Subscription lifecycle events: trial starts and conversions, subscription starts, renewals, cancellations, and refunds
* Paywall impression and conversion data (`paywall_viewed`, `paywall_converted`)
* A/B test (paywall experiment) variants and conversion outcomes
* Offer and promotional discount redemptions
* Product prices, plan metadata, and billing intervals

FloKit does not read raw receipt data or personally identifiable subscriber information from Adapty.

***

## Required access

**API key:** Adapty server-side (secret) API key, read-only. Found in **Adapty Dashboard → App Settings → API keys**.

Use the server-side key, not the public SDK key. The public key has insufficient permissions for server-to-server reads.

**Required identifier:** `customer_user_id` — your app's internal user ID, set in the Adapty SDK at the time of user identification. FloKit joins this field to your MMP's `customer_user_id` to link subscription outcomes back to acquisition campaigns. If your app uses Adapty's anonymous user IDs, see [Identity mapping](/send-data/identity-mapping) before connecting.

***

## Setup

<Steps>
  <Step title="Copy your Adapty server-side API key">
    In **Adapty Dashboard → App Settings → API keys**, copy the **server-side (secret) key**. Do not use the public SDK key — it does not have the permissions FloKit needs.
  </Step>

  <Step title="Add Adapty in FloKit">
    In **FloKit → Settings → Integrations → Subscriptions**, select **Adapty**. Enter your Adapty app ID and server-side API key.
  </Step>

  <Step title="Configure the Adapty webhook">
    In **Adapty → Event Flow**, add a new webhook destination. Paste the FloKit webhook URL shown in the FloKit integration settings panel. Select all subscription event types, including `subscription_started`, `trial_started`, `subscription_renewed`, `subscription_cancelled`, `refund_issued`, `paywall_viewed`, and `paywall_converted`.
  </Step>

  <Step title="Wait for historical backfill">
    FloKit begins a historical backfill immediately after the API key is saved. For most apps, 30–90 days of subscriber history loads within 2–4 hours. Backfill progress is visible in **FloKit → Data → Sources → Adapty**.
  </Step>
</Steps>

***

## What's unique about Adapty + FloKit

Adapty's paywall impression and A/B experiment data flows directly into FloKit's payback analysis. Because FloKit receives both the acquisition source (from your MMP) and the paywall variant (from Adapty), you can compare trial conversion rates and downstream LTV across paywall variants within the same acquisition cohort.

For example: installs from the same Meta campaign that saw Paywall Variant A vs. Variant B can be compared on trial start rate, trial-to-paid conversion, 30-day renewal rate, and payback period — without any custom instrumentation.

***

## Validation checklist

* [ ] Adapty app ID and server-side API key added to FloKit
* [ ] At least one subscription event visible in **FloKit → Data → Events**
* [ ] `customer_user_id` resolving in **FloKit → Data → Identity**
* [ ] Webhook delivering events (check **FloKit → Data → Sources → Adapty → Recent events**)
* [ ] Paywall impression events (`paywall_viewed`) visible alongside conversion events

***

## Common issues

**No events appearing after connecting**

Confirm you used the server-side (secret) key, not the public SDK key. Also verify the Adapty app ID matches the correct application — Adapty app IDs are per-app, not per-account.

**`customer_user_id` not joining to attribution data**

FloKit joins Adapty's `customer_user_id` to your MMP's `customer_user_id`. If your Adapty SDK is not calling `identify()` with your internal user ID, Adapty will generate anonymous IDs that cannot be joined. See [Identity mapping](/send-data/identity-mapping).

**Paywall experiment variants missing**

Adapty paywall variant data is only sent for paywalls managed through Adapty's paywall builder and A/B testing tools. Custom paywall implementations outside of Adapty will not produce variant data in FloKit.

**Missing sandbox events**

FloKit ingests production events only. Sandbox and development environment events from Adapty are excluded by default.

***

## What this unlocks in FloKit

* Paywall variant LTV comparison within the same acquisition cohort
* Offer and A/B test payback analysis by campaign source
* Trial conversion and renewal curve segmentation by paywall
* Cancellation and refund drag tied back to acquisition channel
