What is recorded
Every purchase is read back from RevenueCat’s API with your key before it counts as verified revenue. Amounts are in the purchase’s own currency. Each purchase is stored under its store transaction id, so a purchase seen by webhook, import and check is stored once.
Purchases through Web Billing and Stripe are counted through Stripe, and Paddle purchases through Paddle, if you connect them, so nothing counts twice. PayPal purchases made through RevenueCat are not counted.
Connect RevenueCat
1
Open the RevenueCat panel
In CrispStats, open the site’s Settings, then Integrations. Select Connect a payment provider and choose RevenueCat.
2
Create the secret API key
Under RevenueCat secret API key, select Open API keys in RevenueCat. Then:
- Open your project’s settings, then API keys, and choose New.
- Name it CrispStats and choose version 2.
- Under Customer information, set Customers, Subscriptions and Purchases to Read only.
- Under Project configuration, set Projects to Read only and Integrations to Read and write, so CrispStats can add its webhook.
- Leave everything else at No access, choose Generate, then copy the key and paste it here.
3
Paste the key
Paste the key. CrispStats checks it with RevenueCat and shows the project’s name under Project. A v2 key belongs to one project, so there is nothing to choose.
4
Connect
Select Connect RevenueCat. With Integrations: Read and write, CrispStats adds one webhook to the project and the row shows Connected to your project. Live. Without it, the row says “Updates every day. Set Integrations to Read and write to see purchases as they happen.”
5
Link purchases to visits
See link purchases to visits below.
appl_, goog_, amzn_ or rcb_) is refused: “That is a public SDK key. Create a secret API key (v2) instead.” A key that lacks a permission is refused with the permission and the level it needs.
The permission names above are the ones RevenueCat’s API documentation uses. The labels in RevenueCat’s key dialog may read slightly differently; choose read-only access to customers, subscriptions, purchases and projects, and read and write on integrations.
What the key can do
CrispStats does not ask for Charts: charts are totals, not purchases, so they could never be verified. It cannot grant entitlements, change products or refund anything, and it never moves money.
How fresh the numbers are
With the webhook, RevenueCat sends each purchase within seconds, and CrispStats reads every customer once a week as a safety net. If CrispStats cannot be reached, RevenueCat retries five times over about 80 minutes. RevenueCat has no list of recent purchases to check, so without the webhook CrispStats reads every customer in the project once a day. A pass reads about 30 customers a minute to stay within RevenueCat’s limits, so on a project with many thousands of customers a pass can take longer than a day. Add Integrations: Read and write to see purchases as they happen. Refunds of subscription renewals arrive only by webhook: RevenueCat’s API does not mark them, so a connection without the webhook misses them. Refunds of one-time purchases are found either way.Past payments
When you connect, CrispStats reads every customer of the project and imports their purchases. Progress shows as “Reading customers:” and the number of purchases found so far. See revenue history.Test mode
RevenueCat keys have no test mode. Each purchase says whether it was made in the sandbox: sandbox purchases show with a Test tag and never count as verified revenue.Link purchases to visits
An in-app purchase does not start on your website, so most purchases are linked through your own user id. Sign the customer in with the same id in the app and on your site:app_user_id with every purchase, and CrispStats uses it as the user id unless it is an anonymous RevenueCat id ($RCAnonymousID:). The purchase is then credited to the first visit of that user. See identify users.
When the app knows the visitor id, for example from a link on your site that opens the app, set it as the subscriber attribute crispstats_visitor_id, and every later event carries it:
Disconnect
Select Disconnect on the RevenueCat row. CrispStats removes its webhook from the project and destroys the saved key. Payments already recorded stay. If RevenueCat does not let CrispStats remove it, delete the webhook named CrispStats revenue attribution in RevenueCat, under Integrations, then Webhooks.Connections made earlier by pasting a webhook signing secret keep working. They cannot import history or verify purchases: connect again with a key to add both.
Next steps
Identify users
Use the same user id on your site and in your app.
Superwall
Paywalls from Superwall instead.
Revenue history
What the import reads and how it avoids counting twice.