Skip to main content

Use Cursor, Claude Code, or another AI to help you implement the RevenueCat integration with Appstack.

Open in Cursor
With the RevenueCat integration, you can:
  1. Use RevenueCat in-app events to run enhanced app campaigns.
  2. Unlock attribution-based paywall optimization.
To successfully connect RevenueCat, you must:
  1. Have Owner/Admin access to an Appstack organization.
  2. Have access to the correct RevenueCat account.

Requirements

Use a RevenueCat SDK version that includes setAppstackAttributionParams():

Connect to RevenueCat

Follow the steps to ensure the RevenueCat integration works:
1

SDK configuration

After configuring the Purchases SDK and before the first offerings or paywall load, call setAppstackAttributionParams() with the attribution data from the Appstack SDK. This single call sets the $appstackId, campaign attribution attributes ($mediaSource, $campaign, $adGroup, $ad, $keyword), click IDs, and device identifiers — no need to call collectDeviceIdentifiers() separately.The call also syncs attributes to the RevenueCat backend and fetches fresh offerings before returning, so Appstack-based targeting is applied before your paywall loads.
On iOS, check appstack_match_status in the params before drawing conclusions from an empty-looking result. failed means the match has not resolved yet, so it is worth rebuilding params and calling again later. not_configured means the call ran before configure(...) finished — fix the ordering — or that the SDK is disabled, in which case retrying never helps.
Learn more about the RevenueCat x Appstack integration by reading this article.
RevenueCat SDK minimum versionssetAppstackAttributionParams() is available in purchases-ios 5.61.0+, purchases-android 9.23.0+, react-native-purchases 9.12.0+, and purchases-flutter 9.14.0+. Earlier versions do not include the Appstack integration method.
iOS App Tracking Transparency (iOS 14.5+)If you request App Tracking permission through ATT to access the IDFA, call setAppstackAttributionParams() again after the customer grants permission, rebuilding params from the latest getAttributionParams() and getAppstackId() values as in the code examples above. The AdSupport framework is required to collect the IDFA on iOS.
2

Copy the credentials

  1. In Appstack, from the side menu, select Integrations > RevenueCat.
  2. Copy the webhook URL.
  3. Copy the authorization header.
3

Paste the credentials

  1. In RevenueCat, from the dashboard, go to Integrations > Attribution > Appstack.
  2. Paste the webhook URL.
  3. Paste the authorization header.
After the integration is active on RevenueCat’s platform, it can take 30-60 minutes to appear as active on Appstack’s side.
The integration will show an error if less than 50% of events received over the last 24 hours include an Appstack ID. For RevenueCat, pass this under the appstack_id key when building params. When this threshold is not met, these events cannot be used in ad network integration pages.

Test with sandbox events

After the integration is connected, RevenueCat sends sandbox events to Appstack automatically. You do not need any extra configuration. Sandbox events show only on the SDK page in the Development environment, so they never mix with your production data.
1

Make a sandbox purchase

Install a build of your app that includes the integration. Then start a trial or make a purchase with a sandbox account, such as an App Store sandbox tester or a Google Play license tester.
2

Open the Development environment

  1. In Appstack, from the side menu, select SDK and ensure you are selecting the correct application.
  2. Select the Development environment.
3

Check the event

  1. Find the RevenueCat event in the list, for example rc_trial_started or rc_initial_purchase. This confirms that events reach Appstack.
  2. Open View parameters and confirm that the event contains the appstack_id.
If the event shows but has no appstack_id, check that params includes getAppstackId() under the appstack_id key and that setAppstackAttributionParams() runs before the purchase. If no event shows at all, check the webhook URL and authorization header in RevenueCat, and allow 30-60 minutes after you activate the integration.

List of events

Below is a list of events you can forward to ad networks to optimize your campaigns.

Troubleshooting

General tips

  1. Check SDK versions: confirm the RevenueCat SDK includes setAppstackAttributionParams() (purchases-ios 5.61.0+, purchases-android 9.23.0+, react-native-purchases 9.12.0+, purchases-flutter 9.14.0+). Earlier versions do not expose the method.
  2. Check the ordering: call setAppstackAttributionParams(...) after Purchases.configure and before the first offerings or paywall load. Use the returned offerings to present the paywall rather than fetching them again.
  3. Build the full params map: include both getAttributionParams() and getAppstackId() (stored under the appstack_id key). Passing only one of them, or a wrong key name, breaks attribution.
  4. Handle ATT on iOS: if you request App Tracking permission, call setAppstackAttributionParams(...) again after the customer grants it, rebuilding params from fresh SDK values. The AdSupport framework must be linked to collect the IDFA.
  5. Allow time for activation: after the integration is active in RevenueCat, it can take 30–60 minutes to appear active in Appstack.
  6. Contact support: if issues persist, reach out with specific error messages at support@appstack.tech.

Common issues

Use Cursor, Claude Code, or another AI to validate your existing RevenueCat + Appstack integration.

Open in Cursor
Last modified on September 23, 2026