Skip to main content
Superwall sends trial, subscription, and purchase events to DATALYR through a webhook.
If you also connect RevenueCat, one is your revenue source and the other is recorded at $0, so revenue is counted once. RevenueCat is the default. Change it in Settings → General → Mobile revenue authority, which appears once both are connected.

Connect

1

Open the source

Open Sources, find Superwall, and select connect.
2

Enter your Bundle ID

Paste the application bundle identifier, such as com.example.app.
3

Enter the webhook secret

Copy it from Superwall. It starts with whsec_.
Set this before you save. Deliveries return HTTP 503 until you store a whsec_ secret.
4

Copy the webhook URL

5

Add the webhook in Superwall

Paste the URL into Superwall’s webhook settings.
The Project ID field is optional. We store it and write it to event_data.projectId. Superwall signs with Standard Webhooks. We verify svix-id, svix-timestamp, and svix-signature over id.timestamp.body, with a 300-second tolerance. Each Superwall user must be linked to the SDK install that made the purchase. Without the link, the revenue has no campaign to credit, and App Store purchases can’t be sent to Meta or Snapchat as app events with the install’s device context. Set datalyr_id in every app. Binding is an extra link for campaign credit. Use iOS SDK 2.1.16 or React Native SDK 1.7.21, or later.

Set datalyr_id before the paywall

Set datalyr_id, and call identify() if the user has signed in, before you present a paywall. A purchase made before you set datalyr_id reaches DATALYR without it, and DATALYR cannot link it to the install. Register once with syncSuperwallAttributes (iOS 2.1.19, React Native 1.7.24, or later):
Change the Superwall user first, then DATALYR. In the other order, Superwall.shared.reset() wipes the new datalyr_id, or a login writes it to the previous user.

Set the attributes yourself (older SDKs)

To set only the ID:
Call it before you present a paywall, and again after reset() and after the App Tracking Transparency prompt. getSuperwallAttributes() returns a flat string map, and we drop every empty value.

Bind the Superwall user ID

We resolve the visitor in this order, stopping at the first match. No match sets visitor_id to superwall_<originalAppUserId>, or to superwall_unknown.

Event mapping

Fourteen Superwall types produce fourteen DATALYR events. Two types split on a payload field. Unknown types return 200 and record nothing.
Superwall has no refund-by-cancellation rule. RevenueCat maps a support-granted refund onto refund, while Superwall sends cancellation for the same event. That becomes subscription_cancelled worth 0, so read cancellation counts alongside revenue.

Revenue

Five events carry revenue: subscription_started, trial_converted, subscription_renewed, purchase, refund. All others record 0, including trial_started. A negative price on any event type also makes it carry revenue. The event value is gross, before tax and store commission. Net is stored as event_data.net_revenue, and we prefer the store’s own figure:
commission_rate is commissionPercentage when Superwall sends it, otherwise 0.15 for a small-business account and 0.30 for every other account. Refunds are always negative.
Top-level currency is always USD, because Superwall converts before it sends. The original values stay available as event_data.original_currency and event_data.original_price, but build your conversion rules on the USD value.

Fields for conversion rules

We keep every other Superwall field in event_data unchanged.

Delivery behavior

Verify

  1. Set datalyr_id or bind the Superwall user ID in your app.
  2. Complete one production purchase through a Superwall paywall.
  3. Open Events. Find the event.
  4. Confirm the event name, value, and event_data.product_id.
  5. Confirm visitor_id does not start with superwall_.
Sandbox purchases never appear. Test in the production environment.

When it does not work

Next, create a conversion rule so these purchases reach your ad platforms.