EarnedStats Docs

Revenue

RevenueCat

Send RevenueCat sales to EarnedStats.

1. Add the webhook

RevenueCat, your project, Integrations, Webhooks. Paste the address below.

Endpoint
https://earnedstats.com/api/webhooks/revenuecat/YOUR_SITE_ID

Events: INITIAL_PURCHASE, RENEWAL, NON_RENEWING_PURCHASE, CANCELLATION.

2. The secret

Set an Authorization header value there (a long random string) and paste the same value here. Save it in Settings, Revenue, RevenueCat.

3. The visitor id

Set the visitor id as a subscriber attribute in your app, for example when someone arrives from your site.

Code
Purchases.setAttributes({ es_visitor_id: visitorIdFromYourSite })