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_xxxxxxxx
svix-timestamp: 1234567890
svix-signature: v1,xxxxxxxx

Event mapping

Superwall webhook event types are mapped to AppSprint event names:

Superwall eventAppSprint event
transaction_completepurchase
subscription_startsubscribe
free_trial_startstart_trial
subscription_renewrenewal
subscription_cancelcancellation
subscription_expireexpiration

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 AppSprintSDK
import SuperwallKit
if 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.AppSprint
import com.superwall.sdk.Superwall
val 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});
}