Connect Superwall
Point Superwall 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.
Superwall sends your app's purchases, renewals and refunds to Clakta through a webhook: Clakta gives you an address, and you paste it into Superwall.
Connect
In Clakta:
- Open your project and go to Project settings → Sales platforms.
- Find Superwall and click Connect.
- Give the connection a name you will recognise later, like
My app, then click Create connection. - Copy the Webhook URL that appears. Keep this window open.
In Superwall:
- Open your app, go to Integrations and choose Webhooks under Webhooks and tools.
- Click Create webhook. Name it something like
Claktaand paste the URL you copied into Webhook URL. - Leave Events to listen for as it is. Every event comes selected, and 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. |
REFUND | Marks the sale refunded. |
Clakta ignores the other events, so leaving them selected does no harm.
- Create the webhook. Superwall then shows its signing secret only once.
Copy it: it starts with
whsec_.
Back in Clakta:
- Paste the secret into Signing secret and click Finish.
The card now says Added. New sales appear a few seconds after they are paid. Sales from before you connected are not imported.
Superwall only lets you create webhooks after revenue tracking is set up. If the Webhooks integration says Needs revenue tracking, set that up in Superwall first.
Credit each sale to the ad that brought the user in
Superwall only knows what your app tells it. For Clakta to know where a buyer came from, your app has to save that information in Superwall as user attributes before it shows the paywall. 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. |
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 Superwall's setUserAttributes. On iOS:
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.
What is recorded
Each paid charge becomes an order: the first purchase, every renewal and every one-time purchase. The order is in the currency the buyer paid in, or in US dollars when Clakta doesn't support that currency.
Starting a free trial is not a sale. The first charge after the trial is. A full refund marks the order refunded; after a partial refund, the order stays paid.
Sandbox purchases (TestFlight, Google Play test accounts, Stripe test mode) are not recorded.
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.