Connect RevenueCat
Point RevenueCat at Clakta with a webhook so your app's purchases, renewals and refunds arrive automatically, and each sale is credited to the ad that brought the user in.
RevenueCat sends your app's purchases, renewals and refunds to Clakta through a webhook. Clakta gives you an address and a security code, and you paste both into RevenueCat.
Webhooks are part of RevenueCat's Pro plan. If you don't see the Webhooks integration in RevenueCat, check your plan there first.
Connect
In Clakta:
- Open your project and go to Project settings → Sales platforms.
- Find RevenueCat and click Connect.
- Give the connection a name you will recognise later, like
My app, then click Create connection. - Clakta shows two values: the Webhook URL and the Authorization header value. Keep this window open: you will copy both in a moment.
In RevenueCat:
- Open your project, choose Integrations in the left menu and then Webhooks.
- Click Add new configuration and name it something like
Clakta. - Paste the Webhook URL from Clakta into Webhook URL, and the Authorization header value from Clakta into Authorization header value.
- Send events for production purchases and for all the apps in the project. Clakta doesn't record sandbox purchases, so sending those changes nothing.
- Leave the event filter empty so every event is sent. These are the ones Clakta uses:
| Event | Why Clakta needs it |
|---|---|
INITIAL_PURCHASE | Records the first charge of a subscription. |
RENEWAL | Records each renewal, including the first charge after a trial. |
NON_RENEWING_PURCHASE | Records a one-time purchase. |
CANCELLATION | Marks the sale refunded when the cancellation is a refund. |
REFUND_REVERSED | Marks the sale paid again when a refund is reversed. |
Clakta ignores the other events, so leaving them on does no harm.
- Save the configuration in RevenueCat.
Back in Clakta:
- Click Finish.
The card now says Added. New sales usually appear within a minute of being paid. Sales from before you connected are not imported.
Credit each sale to the ad that brought the user in
RevenueCat only knows what your app tells it. For Clakta to know where a buyer came from, your app has to save that information in RevenueCat as customer attributes before the purchase. Clakta reads these:
| Attribute | What goes in it |
|---|---|
clakta_session_id | The visitor's Clakta session, when the user arrived through your website. |
clkt, utm_source, utm_medium, utm_campaign, utm_content | The ad's parameters, when your app receives them (for example, from the link that opened it). |
$email | The buyer's email, so their purchases here are joined with the ones on other platforms. |
$displayName | The buyer's name. |
Renewals are credited to the same ad as the first charge. Without these attributes, sales are still recorded, just without a source.
If you build the app yourself
Set the attributes with the RevenueCat SDK. On iOS:
RevenueCat sends the attributes to its servers when the purchase is made, so you can set them at any point before it.
If the user starts on your website, read their session there with
clakta.getSessionId() and hand it to the app, for example in the link that
opens it. If you sell on the web with RevenueCat Billing, you can also put
clakta_session_id in the purchase's metadata.
Common questions
Related articles
Connect Shopify
Install the Clakta app on your Shopify store. It sets up checkout tracking, imports your recent orders and matches each sale to the ad that produced it.
Connect Lemon Squeezy
Send your Lemon Squeezy orders, renewals and refunds to Clakta over a webhook, and credit each sale to the visitor who made it.
Connect Dodo Payments
Point Dodo Payments at Clakta with a webhook so your payments, refunds and chargebacks arrive automatically, and each sale is matched to the visitor who made it.