Documentation
Superwall
Forward Superwall webhook events to AppSprint so paywalls, trials, and subscription changes are attributed to the original install.
Webhook endpoint
https://api.appsprint.app/v1/webhooks/superwall
Paste this URL into Superwall → Settings → Integrations → Webhooks.
Authentication
Superwall signs webhooks using Svix. AppSprint verifies the signature using the webhook signing secret stored in your app's dashboard under Integrations → Superwall.
svix-id: msg_xxxxxxxxsvix-timestamp: 1234567890svix-signature: v1,xxxxxxxx
Event mapping
Superwall webhook event types are mapped to AppSprint event names:
| Superwall event | AppSprint event |
|---|---|
| transaction_complete | purchase |
| subscription_start | subscribe |
| free_trial_start | start_trial |
| subscription_renew | renewal |
| subscription_cancel | cancellation |
| subscription_expire | expiration |
Required: appsprintId user attribute
For webhooks to be matched to an attribution, you must set the appsprintId user attribute in Superwall from the SDK. This links the Superwall user to the AppSprint install.
SDK snippets
Set the user attribute after the AppSprint SDK is configured:
iOS
import AppSprintSDKimport SuperwallKitif let appsprintId = AppSprint.shared.getAppSprintId() {Superwall.shared.setUserAttributes(["appsprintId": appsprintId,])}
React Native
import { AppSprint } from 'appsprint-react-native';import Superwall from '@superwall/react-native-superwall';const appsprintId = AppSprint.getAppSprintId();if (appsprintId) {Superwall.shared.setUserAttributes({ appsprintId });}
Android
import com.appsprint.sdk.AppSprintimport com.superwall.sdk.Superwallval appsprintId = AppSprint.shared(applicationContext).getAppSprintId()if (appsprintId != null) {Superwall.instance.setUserAttributes(mapOf("appsprintId" to appsprintId))}
Flutter
import 'package:appsprint_flutter/appsprint_flutter.dart';import 'package:superwallkit_flutter/superwallkit_flutter.dart';final appsprintId = AppSprint.instance.getAppSprintId();if (appsprintId != null) {await Superwall.shared.setUserAttributes({'appsprintId': appsprintId});}