<!--
App*Sprint* docs markdown
Canonical HTML: https://appsprint.app/attribution/docs/superwall
Markdown URL: https://appsprint.app/attribution/docs/superwall.md
Docs index: https://appsprint.app/attribution/docs.md
Sitemap: https://appsprint.app/attribution/sitemap.xml
LLM guide: https://appsprint.app/attribution/llms.txt
-->

# Superwall

Forward Superwall webhook events to App*Sprint* so paywalls, trials, and subscription changes are attributed to the original install.

## Webhook endpoint

```
Host: api.appsprint.app
Path: /v1/integrations/superwall/webhooks/{appId}
```

Paste the HTTPS URL for this host and path into Superwall → Settings → Integrations → Webhooks.

Replace `{appId}` with your App*Sprint* app ID. The dashboard integration page shows the full URL for the selected app.

## Authentication

Superwall signs webhooks using Svix. After creating the webhook in Superwall, open that webhook, copy its Signing Secret, and paste it into App*Sprint* under Integrations → Superwall.

App*Sprint* marks the integration verified after the first valid, signed webhook. Sandbox webhooks can verify the connection, but App*Sprint* does not create attributed events or outbound ad conversions from `environment=SANDBOX` deliveries.

## Event mapping

| Superwall event | App*Sprint* event |
|----------------|-----------------|
| initial_purchase | purchase |
| initial_purchase + periodType=TRIAL | start_trial |
| renewal, including isTrialConversion=true | subscribe |
| uncancellation | purchase |
| non_renewing_purchase | purchase |
| cancellation / expiration / billing_issue / product_change / subscription_paused | custom |

Custom lifecycle events keep the raw Superwall type in the event name, for example `superwall:cancellation`. Other Superwall event types are stored as webhook receipts but ignored for App*Sprint* event attribution.

## Required: appsprintId user attribute

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

## SDK snippets

Set the user attribute after the App*Sprint* SDK is configured. In React Native and Flutter, `getAppSprintId()` is asynchronous, so await it before calling Superwall. See the Superwall 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/attribution/docs) ([Markdown](https://appsprint.app/attribution/docs.md)) — Introduction to App*Sprint*
- [Quickstart](https://appsprint.app/attribution/docs/quickstart) ([Markdown](https://appsprint.app/attribution/docs/quickstart.md)) — Get up and running in 5 minutes
- [React Native](https://appsprint.app/attribution/docs/react-native) ([Markdown](https://appsprint.app/attribution/docs/react-native.md)) — React Native / Expo SDK reference
- [iOS (Swift)](https://appsprint.app/attribution/docs/ios-swift) ([Markdown](https://appsprint.app/attribution/docs/ios-swift.md)) — Native Swift SDK reference
- [Android (Kotlin)](https://appsprint.app/attribution/docs/android) ([Markdown](https://appsprint.app/attribution/docs/android.md)) — Native Android SDK reference
- [Flutter](https://appsprint.app/attribution/docs/flutter) ([Markdown](https://appsprint.app/attribution/docs/flutter.md)) — Flutter plugin reference
- [RevenueCat](https://appsprint.app/attribution/docs/revenuecat) ([Markdown](https://appsprint.app/attribution/docs/revenuecat.md)) — Webhook integration for subscription attribution
- [Superwall](https://appsprint.app/attribution/docs/superwall) ([Markdown](https://appsprint.app/attribution/docs/superwall.md)) — Webhook integration for paywall attribution
- [Apple Search Ads](https://appsprint.app/attribution/docs/apple-search-ads) ([Markdown](https://appsprint.app/attribution/docs/apple-search-ads.md)) — Keyword and ad attribution
- [Google Ads](https://appsprint.app/attribution/docs/google-ads) ([Markdown](https://appsprint.app/attribution/docs/google-ads.md)) — Coming soon
- [TikTok Ads](https://appsprint.app/attribution/docs/tiktok-ads) ([Markdown](https://appsprint.app/attribution/docs/tiktok-ads.md)) — Events API server-side event forwarding
- [Meta Ads](https://appsprint.app/attribution/docs/meta-ads) ([Markdown](https://appsprint.app/attribution/docs/meta-ads.md)) — In review
