Connect RevenueCat for revenue per user
Connect RevenueCat with a v2 secret key so purchases, renewals, cancellations and refunds are matched to your Supabase users in Cockpitify.
Connecting RevenueCat brings each user’s purchases, renewals, cancellations and refunds into Cockpitify, matched to your Supabase users. It powers revenue per user, margin, subscriptions and the premium notifications.
Before you start
Create a secret key in RevenueCat:
- In RevenueCat, open your project, then Project settings → API keys.
- Create a New secret key of the v2 type.
- Give it these permissions:
- Customer information: Read
- Project configuration: Read & write (so Cockpitify can register the webhook for you)
- Copy the key. It starts with
sk_.
Open RevenueCat in Cockpitify
- Phone: on the Money tab, scroll to More in Money, tap Services, then the RevenueCat card. You can also open the app menu at the top, tap Connections, then RevenueCat. While the margin is waiting for revenue, the Money tab shows Link RevenueCat or Connect RevenueCat too.
- Web: App → Connections, then Set up on the RevenueCat row. The RevenueCat panel opens beside the list.
Only people who can edit revenue can connect RevenueCat or change its settings. Everyone else sees its state.
Connect
- Paste the key into RevenueCat secret key (API v2).
- Check Webhook. Cockpitify registers it in RevenueCat when you connect.
- Check User mapping. By default it is
app_user_id = Supabase auth.uid: RevenueCat’s app user ID is your Supabase user ID. If your app uses another ID, pick Profile table column and the column that holds it. - History: the last 12 months are imported in the background, one batch a minute.
- Leave Include test purchases off unless you’re testing. When it’s on, sandbox purchases count toward revenue and notifications.
- Tap Connect and import.
The key is stored in your project’s Supabase Vault. On the web it passes through our server, which neither stores nor logs it.
Add the webhook by hand
If the key can’t change project configuration, the webhook shows Add manually with a Webhook URL and an Authorization value:
- In RevenueCat, open Integrations → Webhooks → Add.
- Paste the Webhook URL and the Authorization value from Cockpitify.
- Save, then use Send test event in RevenueCat. Cockpitify shows when the test event arrived.
Check that it works
Once connected, the RevenueCat screen (phone) or panel (web) shows:
- Last event, or a note that only a test event has arrived so far.
- The import: Importing history…, History imported or Import stopped, with how many customers and payments were scanned.
- Events that aren’t matched to a user yet. New events match once the mapping is right.
- Check the connection: tap Check key to try the saved key with RevenueCat. It says whether the key works, and for which RevenueCat project. This needs Cockpitify 0.74.0 in your project.
If events stop
If renewals were due and no events came, the RevenueCat row in Connections turns Stale and the screen says Renewals were due, but no events came. Then:
- In RevenueCat, open Integrations → Webhooks and check that the Cockpitify webhook is there and its URL matches the one Cockpitify shows.
- Press Send test event. It shows in Cockpitify within a minute.
- Still nothing? Tap Check key. If RevenueCat refuses the key, connect again with a new secret key.
A quiet webhook is not a fault on its own: when nothing sells or renews, no events arrive.
Store fees and tax
RevenueCat sends the store commission and tax with most sales, and Cockpitify uses them: net = gross × (1 − tax − commission). When a sale arrives without a commission, Cockpitify uses the rate you pick under When no commission is sent: 15% · Small Business or 30%. The screen also says how many of the last 90 days’ sales came without a commission or tax.
RevenueCat’s own fee
On the phone, the RevenueCat card on Services shows how much revenue RevenueCat has counted this month against its free allowance, with a month-end estimate and the expected fee. You get a notification at 80% of the free limit and when it’s passed, once a month. The alert is listed with the others in App → Alerts.
Disconnect
Tap Disconnect, then confirm. The key and the webhook are deleted. Revenue already saved stays, and if you connect again it picks up where it left off.