> ## Documentation Index
> Fetch the complete documentation index at: https://clickflare.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Whop Cost Integration

> Pull your Whop Ads spend into ClickFlare automatically with a Whop company API key.

Thanks to ClickFlare's **API integration with Whop**, you can automatically pull the **cost data** of your **Whop Ads** campaigns into ClickFlare. Spend lands next to the clicks and conversions ClickFlare already tracks, so profit, ROI and CPA are accurate without manual cost uploads.

In this article we go through the setup step by step.

***

## What you'll need for the integration

<Columns cols={3}>
  <Card title="ClickFlare account" icon="user-check">
    An active account
  </Card>

  <Card title="Whop Ads business" icon="store">
    A business running ads
  </Card>

  <Card title="Whop API key" icon="key" href="#where-to-find-your-whop-api-key">
    Created in Whop
  </Card>
</Columns>

<Callout icon="building" color="#155DFC">
  **One key per business.** Whop generates API keys per business, and the same key powers both the [Whop Conversion API](/docs/en/integrations/whop-conversion-api) and the [Whop cost integration](/docs/en/integrations/whop-cost-integration). If you run several Whop businesses, create a key in each and register each business in ClickFlare separately.
</Callout>

***

## How the Whop cost integration works

ClickFlare connects to Whop's API with your key and retrieves the spend of the Whop Ads campaigns in that business, at all three levels:

* **Campaign level**
* **Ad group level**
* **Ad level**

So you can break cost down by Whop campaign, ad group or ad in your ClickFlare reports, not only see a campaign total.

Only **spend** is fetched from Whop. CPC, CPM, CTR, ROI and the other performance metrics are calculated inside ClickFlare, from Whop's cost and the clicks and conversions ClickFlare tracks through your campaign URLs. This keeps every metric consistent in one report.

***

## Where to find your Whop API key

<Steps>
  <Step title="Open the right business">
    Log in to [Whop](https://whop.com/dashboard) and select the business you run ads from in the business switcher at the top left. The key belongs to the business that is open.

    <img src="https://mintcdn.com/clickflare/0NdLMeakPfqPMMkV/images/help-center/05-integrations/whop/whop-api-key-01.png?fit=max&auto=format&n=0NdLMeakPfqPMMkV&q=85&s=a3b975a7bf43e2c7ec4ac8753337be0f" alt="The Whop dashboard with the business switcher at the top left and Developer at the bottom of the sidebar" width="1913" height="928" data-path="images/help-center/05-integrations/whop/whop-api-key-01.png" />
  </Step>

  <Step title="Go to Developer">
    Click **Developer** at the bottom of the left sidebar. The **Company API keys** section lists the keys for this business.

    <img src="https://mintcdn.com/clickflare/0NdLMeakPfqPMMkV/images/help-center/05-integrations/whop/whop-api-key-02.png?fit=max&auto=format&n=0NdLMeakPfqPMMkV&q=85&s=6ba93e3aed3ed131d986f36cf19de6c8" alt="The Company API keys section of the Whop Developer page, with the Create API key button" width="1915" height="928" data-path="images/help-center/05-integrations/whop/whop-api-key-02.png" />
  </Step>

  <Step title="Create the key">
    Click **Create API key** and fill in the form:

    | Field                             | What to enter                                                                                             |
    | --------------------------------- | --------------------------------------------------------------------------------------------------------- |
    | **Name**                          | A name you will recognise later, for example `ClickFlare`.                                                |
    | **Expiration**                    | Leave it blank for a key that never expires. If you set a date, cost stops syncing on that date.          |
    | **API version**                   | Leave the default.                                                                                        |
    | **IP allow-list**                 | Leave it blank. ClickFlare's servers make the requests, so an allow-list of your own IPs blocks the sync. |
    | **Inherit permissions from role** | Choose **Custom**. See the next step.                                                                     |

    <img src="https://mintcdn.com/clickflare/0NdLMeakPfqPMMkV/images/help-center/05-integrations/whop/whop-api-key-03.png?fit=max&auto=format&n=0NdLMeakPfqPMMkV&q=85&s=b75ad85d9445e1d7f49ded1f1aabeb0e" alt="The Create API key form in Whop" width="615" height="904" data-path="images/help-center/05-integrations/whop/whop-api-key-03.png" />
  </Step>

  <Step title="Choose the permissions">
    Open **Inherit permissions from role** and choose **Custom**.

    <img src="https://mintcdn.com/clickflare/0NdLMeakPfqPMMkV/images/help-center/05-integrations/whop/whop-api-key-04.png?fit=max&auto=format&n=0NdLMeakPfqPMMkV&q=85&s=9ec9a7dea8a07faf975b17d428626a36" alt="The role dropdown with Owner, Admin, Moderator and Custom" width="608" height="899" data-path="images/help-center/05-integrations/whop/whop-api-key-04.png" />

    Use **Search permissions** to find and select these three:

    | Permission               | What it is for                                                                         |
    | ------------------------ | -------------------------------------------------------------------------------------- |
    | `company:basic:read`     | Lets ClickFlare read the basic details of your business. Needed for both integrations. |
    | `event:create`           | Lets ClickFlare send conversions to Whop. Needed for the Conversion API.               |
    | `ad_campaign:basic:read` | Lets ClickFlare read your Whop Ads campaigns. Needed for the cost integration.         |

    Select all three even if you only set up one integration today. The same key then works for both.
  </Step>

  <Step title="Copy the key">
    Save the key and copy it straight away. Afterwards the list shows only a masked version such as `apik_NiPR…1185`.
  </Step>
</Steps>

***

## Setting up the Whop cost integration

<Steps>
  <Step title="Open the Cost Tracking integrations">
    In ClickFlare, go to **Integrations** in the left-side menu and open the **Cost Tracking** tab. Click **Add integration**.

    <img src="https://mintcdn.com/clickflare/0NdLMeakPfqPMMkV/images/help-center/05-integrations/02-cost-tracking-integrations/19-whop-cost-integration-01.png?fit=max&auto=format&n=0NdLMeakPfqPMMkV&q=85&s=731802cd7c1315b934c2c57940f9238e" alt="The Cost Tracking tab of the Integrations page, with the Add integration button" width="1911" height="927" data-path="images/help-center/05-integrations/02-cost-tracking-integrations/19-whop-cost-integration-01.png" />
  </Step>

  <Step title="Select Whop">
    Select **Whop** from the list of available integrations.

    <img src="https://mintcdn.com/clickflare/0NdLMeakPfqPMMkV/images/help-center/05-integrations/02-cost-tracking-integrations/19-whop-cost-integration-02.png?fit=max&auto=format&n=0NdLMeakPfqPMMkV&q=85&s=7ee37a2374022a671b842b3a0ce5d8d2" alt="The New Integration picker with Whop among the cost integrations" width="814" height="787" data-path="images/help-center/05-integrations/02-cost-tracking-integrations/19-whop-cost-integration-02.png" />
  </Step>

  <Step title="Enter the details">
    Fill in the form:

    * **Name** — a recognisable name, for example the Whop business name.
    * **Workspace** — **Public** to use it across your account, or a specific workspace. See [Managing cost and CAPI integrations in workspaces](/docs/en/multi-user-access-workspaces/managing-cost-and-capi-integrations-in-clickflare-workspaces).
    * **API Key** — the Whop company API key.
    * **Integration Timezone** — set it to your **Whop timezone**.

    <Warning>
      If the integration timezone differs from Whop's, each day's spend is split across the wrong days, and cost in ClickFlare will not match Whop for any given day or hour.
    </Warning>

    Click **Save**.

    <img src="https://mintcdn.com/clickflare/0NdLMeakPfqPMMkV/images/help-center/05-integrations/02-cost-tracking-integrations/19-whop-cost-integration-03.png?fit=max&auto=format&n=0NdLMeakPfqPMMkV&q=85&s=42ae0da29c74b7d53a3dd37e00deab4d" alt="The Whop cost integration form with Name, Workspace, API Key and Integration Timezone" width="826" height="336" data-path="images/help-center/05-integrations/02-cost-tracking-integrations/19-whop-cost-integration-03.png" />
  </Step>

  <Step title="Optionally, assign traffic sources">
    ClickFlare asks which **Traffic Sources** should use this integration. Select your Whop traffic source configurations here, or skip the step and assign the integration later from the traffic source settings.

    <img src="https://mintcdn.com/clickflare/0NdLMeakPfqPMMkV/images/help-center/05-integrations/02-cost-tracking-integrations/19-whop-cost-integration-04.png?fit=max&auto=format&n=0NdLMeakPfqPMMkV&q=85&s=58f2ad929ead825f6942ca31c17e69f2" alt="The Traffic Sources dialog with an optional Select Traffic Sources field" width="828" height="248" data-path="images/help-center/05-integrations/02-cost-tracking-integrations/19-whop-cost-integration-04.png" />

    <Warning>
      Select only traffic sources created from the **Whop** template. Spend cannot be matched to campaigns running on a different traffic source.
    </Warning>

    Click **Save**.
  </Step>

  <Step title="Add the integration to your traffic source">
    If you skipped the previous step, open your Whop traffic source and select the new integration under **Cost Integration**.

    <Info>
      If the integration is not assigned to the traffic source, ClickFlare does not pull cost for its campaigns, even though the integration itself is saved and enabled.
    </Info>
  </Step>
</Steps>

***

## Verify cost data sync

After you save, ClickFlare starts syncing cost from Whop automatically.

1. Open an **active** Whop campaign in your ClickFlare reports.
2. Look at the **Cost** column.
3. Compare it with the spend in Whop's ads reporting for the same day, allowing for the sync delay.

<Info>
  **Sync frequency.** How often cost updates depends on your ClickFlare plan and whether you have a faster cost-update add-on. It ranges from every 60 minutes down to every 5 minutes. See [Cost updates](/docs/en/advanced-features/cost-updates).
</Info>

***

## How cost matching works

Whop adds its own IDs to the URL a visitor lands on after clicking a Whop ad: `wacid` for the campaign, `wasid` for the ad group and `waid` for the ad. ClickFlare captures them through the **Whop traffic source template** and uses them to line up the spend it pulls with the right campaigns, ad groups and ads.

When you create the traffic source from the template, these parameters are already in place:

| Name             | TS parameter | TS token | ClickFlare token  |
| ---------------- | ------------ | -------- | ----------------- |
| External ID      | `fbclid`     |          | \{external\_id}   |
| Whop Campaign ID | `wacid`      | \{wacid} | \{trackingField1} |
| Whop Adset ID    | `wasid`      | \{wasid} | \{trackingField2} |
| Whop Ad ID       | `waid`       | \{waid}  | \{trackingField3} |
| Utm Whop         | `utm_whop`   |          | \{trackingField4} |

<img src="https://mintcdn.com/clickflare/0NdLMeakPfqPMMkV/images/help-center/05-integrations/whop/whop-traffic-source-template.png?fit=max&auto=format&n=0NdLMeakPfqPMMkV&q=85&s=ffdc3539ee9e0ed9ef83f64b5683188f" alt="The New Traffic Source form created from the Whop template, with the Whop parameters pre-filled" width="1171" height="807" data-path="images/help-center/05-integrations/whop/whop-traffic-source-template.png" />

<Warning>
  Do not remove or rename the `wacid`, `wasid` and `waid` parameters. Without them ClickFlare cannot tell which Whop campaign, ad group or ad a click came from, and the pulled spend cannot be matched.
</Warning>

To create the traffic source, see [How to add a traffic source from a template](/docs/en/tracking/how-to-add-a-traffic-source-from-template).

***

## Frequently asked questions

<AccordionGroup>
  <Accordion title="Is it the same API key as the Conversion API?">
    Yes. One company API key per Whop business covers both, as long as it has all three permissions: `company:basic:read`, `event:create` and `ad_campaign:basic:read`.
  </Accordion>

  <Accordion title="Can I track several Whop businesses?">
    Yes. Create a key in each business and add one cost integration per key. Assign each integration to the traffic source configurations that run that business's ads.
  </Accordion>

  <Accordion title="Does the integration pull clicks, impressions or conversions?">
    It pulls **spend**. Clicks and conversions are tracked by ClickFlare itself, and combined with Whop's cost for full performance reporting.
  </Accordion>

  <Accordion title="Why doesn't my cost match Whop for a given day?">
    Almost always the **Integration Timezone**. It must be the same as your Whop timezone. Edit the integration and set it to match.
  </Accordion>
</AccordionGroup>

***

## Troubleshooting

| Issue                         | Possible cause                                                      | Solution                                                                            |
| ----------------------------- | ------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |
| The integration does not save | The key was copied incompletely, deleted or expired                 | Copy the key again from Whop, or create a new one.                                  |
| No cost at all                | The key is missing `ad_campaign:basic:read` or `company:basic:read` | Edit the key's permissions in Whop, or create a new key with all three permissions. |
| No cost at all                | The integration is not assigned to the traffic source               | Select it under **Cost Integration** on the Whop traffic source.                    |
| No cost at all                | The traffic source was not created from the Whop template           | Create it from the template so `wacid`, `wasid` and `waid` are captured.            |
| No cost at all                | The key belongs to a different business                             | Keys are per business. Use the key from the business that runs the ads.             |
| Cost stopped updating         | The key expired, or an IP allow-list was added                      | Create a new key without an expiry or allow-list and paste it into the integration. |
| Cost differs from Whop by day | The integration timezone differs from Whop's                        | Set **Integration Timezone** to your Whop timezone.                                 |

For the general checklist, see [Cost not pulling](/docs/en/troubleshooting/cost-not-pulling).

***

## Related guides

* [Whop Conversion API](/docs/en/integrations/whop-conversion-api)
* [What is a traffic source template](/docs/en/core-platform-concepts/what-is-a-traffic-source)
* [How to add an integration](/docs/en/integrations/adding-an-integration)
* [Cost not pulling](/docs/en/troubleshooting/cost-not-pulling)
