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

# Subscription status with Adapty

> Map an Adapty customer to a Backapp user and read their subscription status.

Backapp receives subscription updates from Adapty and stores the latest state for each user and app. Your app can read that state through the v2 API.

## Connect your app

1. Register the device using the [v2 authentication flow](https://docs.backapp.dev/quickstart.md#register-the-device).
2. Use the returned `user_id` as the Adapty customer user ID. Use the same ID when identifying that user before a purchase or restore. [Adapty user identification](https://adapty.io/docs/identifying-users)
3. Ask the Backapp team for the webhook URL and authorization value for your app and environment. The webhook runs on the assigned webhook host at `/api/webhooks/adapty?app=<app-slug>`. Use the app slug from your configuration.
4. Configure both values in Adapty. Keep the webhook authorization value on the server and in Adapty's integration settings. Test with a sandbox purchase before enabling production events. [Adapty webhook setup](https://adapty.io/docs/set-up-webhook-integration) · [Sandbox testing](https://adapty.io/docs/test-webhook)

## Read subscription status

Use the variables from the [quickstart](https://docs.backapp.dev/quickstart.md).

```bash theme={null}
curl --fail-with-body --silent --show-error "$BACKAPP_BASE_URL/v2/me" \
  -H "X-App-Key: $BACKAPP_APP_KEY" \
  -H "X-App-Version: $BACKAPP_APP_VERSION" \
  -H "Authorization: Bearer $BACKAPP_ACCESS_TOKEN" |
  jq '.subscription'
```

| Field | Meaning |
| - | - |
| `is_active` | Whether Backapp has recorded active access for the user in this app. |
| `is_trial` | Whether the recorded state is a trial. |
| `product_id` | Recorded product identifier. It can be empty. |
| `expires_at` | Recorded expiration timestamp, or null. |
| `will_renew` | Recorded renewal status, or null when unknown. |

A user with no subscription record receives false for both boolean access flags, an empty product ID, and null for expiration and renewal. The device registration and token refresh responses include the same subscription summary.

Webhook delivery is asynchronous. If access still appears inactive after a sandbox purchase, check the Adapty delivery log, the app slug, and whether the event's `customer_user_id` matches the v2 UUID. Read `/v2/me` again after delivery. When testing the full integration, confirm the expected state in `/v2/me` as well as the webhook HTTP status.

The current image-effects endpoint runs independently of the reported subscription status. Treat subscription status and AI request authorization as separate checks in your integration.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.