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:

  1. Open your project and go to Project settings → Sales platforms.
  2. Find Superwall and click Connect.
  3. Give the connection a name you will recognise later, like My app, then click Create connection.
  4. Copy the Webhook URL that appears. Keep this window open.

In Superwall:

  1. Open your app, go to Integrations and choose Webhooks under Webhooks and tools.
  2. Click Create webhook. Name it something like Clakta and paste the URL you copied into Webhook URL.
  3. Leave Events to listen for as it is. Every event comes selected, and these are the ones Clakta uses:
EventWhy Clakta needs it
INITIAL_PURCHASERecords the first charge of a subscription.
RENEWALRecords each renewal, including the first charge after a trial.
NON_RENEWING_PURCHASERecords a one-time purchase.
REFUNDMarks the sale refunded.

Clakta ignores the other events, so leaving them selected does no harm.

  1. Create the webhook. Superwall then shows its signing secret only once. Copy it: it starts with whsec_.

Back in Clakta:

  1. 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.

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:

AttributeWhat goes in it
clakta_session_idThe visitor's Clakta session, when the user arrived through your website.
clkt, utm_source, utm_medium, utm_campaign, utm_contentThe ad's parameters, when your app receives them (for example, from the link that opened it).
emailThe 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 Superwall | Clakta