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

# RevenueCat webhook

> See live subscription status, renewals, billing issues, and refunds alongside every conversation.

Connect RevenueCat to Feddy with a webhook so your team and Milo AI can see a user's current subscription status and lifecycle history without leaving the inbox.

Feddy never asks for your RevenueCat API key. Instead, Feddy generates a unique webhook URL and Authorization header for your project that you paste into RevenueCat.

## Connect RevenueCat

**1. Enable the webhook in Feddy**

Open your project in the Feddy dashboard, go to **Settings → Integrations**, and click **Enable RevenueCat**.

Feddy generates two values:

* **Webhook URL**
* **Authorization header** (shown once)

**2. Add the webhook in RevenueCat**

In the RevenueCat dashboard, open your project and go to **Integrations → Webhooks → Add new configuration**.

1. Paste the **Webhook URL** from Feddy into **Webhook URL**.
2. Paste the **Authorization header** from Feddy into **Authorization header value**.
3. Choose **All events** and select the environments you want to receive (**Production**, or **Production and Sandbox** if you also want to test with sandbox purchases).
4. Save the configuration, then click **Send test event**.

Back in Feddy, the RevenueCat card switches to **Connected** as soon as the test event arrives.

**3. Pass the RevenueCat app user ID to Feddy**

Match subscribers to conversations by passing RevenueCat's `appUserID` as `userId` in `identify()`:

```swift theme={null}
Feddy.identify(userId: Purchases.shared.appUserID)
```

If your app uses custom app user IDs in RevenueCat (such as your own account ID), pass that same ID to `identify()`. Feddy also tracks `original_app_user_id`, aliases, and subscription transfers automatically.

## What appears in Feddy

When a matched user writes in, Feddy derives their current subscription state from their RevenueCat event history and surfaces it in:

* **Conversation sidebar**: a collapsible **Subscription** section showing current status (`Active`, `Trial`, `Cancelled`, `Billing issue`, `Paused`, `Lifetime`, `Refunded`, `Expired`, or `Transferred`), product, entitlements, store, price, renewal or expiration date, and the last 5 lifecycle events.
* **Contact page**: full subscription summary and recent event history table.
* **Milo AI and Copilot**: subscription state and recent events are included in conversation context, so Milo does not ask paying users whether they are subscribed or which store they purchased from.
* **MCP**: `get_conversation` and `get_contact` include the subscription summary and recent events.

> [!NOTE]
>
> If a user has both Sandbox and Production events, Feddy displays Production. Sandbox-only purchases are clearly badged as **Sandbox**.

## Rotating or disconnecting

Open **Settings → Integrations** and use the **⋯** menu on the RevenueCat card:

* **Rotate secret**: generates a new Authorization header immediately while keeping the same webhook URL and stored event history. Update the header value in RevenueCat right away.
* **Disconnect**: stops accepting webhook deliveries and deletes stored RevenueCat events for the project.


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