<!--
AppSprint docs markdown
Canonical HTML: https://appsprint.app/docs/revenuecat
Markdown URL: https://appsprint.app/docs/revenuecat.md
Docs index: https://appsprint.app/docs.md
Sitemap: https://appsprint.app/sitemap.xml
LLM guide: https://appsprint.app/llms.txt
-->

# RevenueCat

Forward RevenueCat webhook events to AppSprint so every subscription and purchase is automatically attributed to the install that triggered it.

## Webhook endpoint

```
https://api.appsprint.app/v1/webhooks/revenuecat
```

Paste this URL into RevenueCat → Project Settings → Integrations → Webhooks.

## Authentication

Set the Authorization header in RevenueCat's webhook config to a Bearer token matching your app's `revenuecatWebhookToken` stored in the AppSprint dashboard under Integrations → RevenueCat.

```
Authorization: Bearer rc_whsec_xxxxxxxx
```

## Event mapping

| RevenueCat event | AppSprint event |
|-----------------|-----------------|
| INITIAL_PURCHASE | purchase |
| RENEWAL | renewal |
| CANCELLATION | cancellation |
| UNCANCELLATION | uncancellation |
| NON_RENEWING_PURCHASE | purchase |
| SUBSCRIPTION_PAUSED | subscription_paused |
| EXPIRATION | expiration |
| BILLING_ISSUE | billing_issue |
| PRODUCT_CHANGE | product_change |

## Required: appsprintId subscriber attribute

For webhooks to be matched to an attribution, you must set the `appsprintId` subscriber attribute in RevenueCat from the SDK.

## SDK snippets

Set the subscriber attribute after the AppSprint SDK is configured. In React Native and Flutter, `getAppSprintId()` is asynchronous, so await it before calling RevenueCat. See the RevenueCat docs page for platform-specific code snippets.

---

## Docs navigation

Use the Markdown URLs when reading the docs programmatically. Use the HTML URLs when you need the interactive docs UI.

- [Overview](https://appsprint.app/docs) ([Markdown](https://appsprint.app/docs.md)) — Introduction to AppSprint
- [Quickstart](https://appsprint.app/docs/quickstart) ([Markdown](https://appsprint.app/docs/quickstart.md)) — Get up and running in 5 minutes
- [React Native](https://appsprint.app/docs/react-native) ([Markdown](https://appsprint.app/docs/react-native.md)) — React Native / Expo SDK reference
- [iOS (Swift)](https://appsprint.app/docs/ios-swift) ([Markdown](https://appsprint.app/docs/ios-swift.md)) — Native Swift SDK reference
- [Android (Kotlin)](https://appsprint.app/docs/android) ([Markdown](https://appsprint.app/docs/android.md)) — Native Android SDK reference
- [Flutter](https://appsprint.app/docs/flutter) ([Markdown](https://appsprint.app/docs/flutter.md)) — Flutter plugin reference
- [RevenueCat](https://appsprint.app/docs/revenuecat) ([Markdown](https://appsprint.app/docs/revenuecat.md)) — Webhook integration for subscription attribution
- [Superwall](https://appsprint.app/docs/superwall) ([Markdown](https://appsprint.app/docs/superwall.md)) — Webhook integration for paywall attribution
- [Apple Search Ads](https://appsprint.app/docs/apple-search-ads) ([Markdown](https://appsprint.app/docs/apple-search-ads.md)) — Campaign and keyword attribution
- [Google Ads](https://appsprint.app/docs/google-ads) ([Markdown](https://appsprint.app/docs/google-ads.md)) — Offline click conversion upload
- [TikTok Ads](https://appsprint.app/docs/tiktok-ads) ([Markdown](https://appsprint.app/docs/tiktok-ads.md)) — Events API server-side event forwarding
