Revenue Attribution

Whop

Connect Whop to Faurya with a Company API Key, webhook automation, and checkout metadata for revenue attribution.

Attribute revenue with Whop

Use this guide to connect Whop payment webhooks to Faurya. Faurya creates the Whop webhook for you and imports your payment history after you provide a Whop Company API Key.

The setup has two parts:

  1. Create a Whop Company API Key with the permissions listed below.
  2. Connect Whop in Faurya and pass Faurya attribution IDs in your checkout metadata.

After Whop sends verified payment webhooks to Faurya, successful payments can be attributed back to the visitor and session that started checkout.

Use credentials from the same Whop environment where you test payments. Use sandbox keys for sandbox checkout and production keys for production checkout.

What Faurya needs from Whop

Faurya needs one value: a Whop Company API Key.

Faurya reads the Whop company that owns the key from Whop itself, so there is no Company ID to enter. It uses the key to create and manage the Whop webhook automatically and to import your existing payments, members and plans.

Required Whop API key access

The same list, beside every other provider's, is on Connect your payment provider.

Create a Company API Key in Whop for the company you want to connect.

If Whop lets you choose a role, choose Admin — it covers everything below. If you pick individual permissions, the key needs all of these:

PermissionWhy Faurya needs it
developer:manage_webhookCreates the webhook Whop delivers payments to, and removes it when you disconnect
payment:basic:readPayments and refunds
member:basic:readMembers and memberships — who paid, and their subscriptions
member:email:readCustomer emails; without it Whop returns members with no email
plan:basic:readPlans, their price and billing cadence
company:balance:readThe financial activity ledger — fees and settlement

A key with only developer:manage_webhook can connect, but the historical import will fail or come back without customer emails. If Faurya says it cannot create the webhook, the key is missing webhook permission or belongs to a different Whop company.

Step 1: Open the Whop tab in Faurya

In Faurya, open your site settings and go to Revenue. Select Whop.

Whop API key permissions

Step 2: Enter your Whop API key

Paste your Whop Company API Key, then click Connect Whop.

Faurya will create a Whop webhook for your site and store the API key encrypted.

Step 3: Confirm Whop is connected

After Whop is connected, Faurya shows a masked API key and a remove button.

Whop connected state in Faurya

If you disconnect Whop, Faurya first deletes the webhook in Whop, then clears the local connection.

Pass Faurya attribution IDs to Whop checkout

To attribute revenue correctly, pass Faurya’s attribution IDs into Whop checkout metadata when creating a checkout configuration or plan.

Read these values from cookies:

  • faurya_visitor_id
  • faurya_session_id

Example with a Next.js route that creates a Whop checkout configuration:

import { cookies } from "next/headers";

export async function POST() {
  const cookieStore = await cookies();
  const fauryaVisitorId = cookieStore.get("faurya_visitor_id")?.value;
  const fauryaSessionId = cookieStore.get("faurya_session_id")?.value;

  const metadata = {
    faurya_visitor_id: fauryaVisitorId,
    faurya_session_id: fauryaSessionId,
  };

  const response = await fetch(
    "https://api.whop.com/api/v1/checkout_configurations",
    {
      method: "POST",
      headers: {
        Authorization: `Bearer ${process.env.WHOP_API_KEY}`,
        "Api-Version-Date": "2026-07-01",
        "Content-Type": "application/json",
      },
      body: JSON.stringify({
        company_id: process.env.WHOP_COMPANY_ID,
        mode: "payment",
        currency: "usd",
        redirect_url: "https://your-site.com/checkout/success",
        metadata,
        plan: {
          product_id: process.env.WHOP_PRODUCT_ID,
          initial_price: 10,
          currency: "usd",
          plan_type: "one_time",
          metadata,
        },
      }),
    },
  );

  return Response.json(await response.json());
}

If you use Whop checkout links or plans instead of checkout configurations, attach the same faurya_visitor_id and faurya_session_id values to the plan or payment metadata supported by your Whop flow.

Sandbox notes

For sandbox testing, use Whop’s sandbox API host and sandbox dashboard data:

https://sandbox-api.whop.com/api/v1

Make sure the following all belong to the same sandbox company:

  • Company API Key
  • Product ID / access pass ID
  • Webhook configuration

If Whop returns You are not authorized, the API key may belong to the company but still lack checkout configuration or plan creation permissions. Use a sandbox Admin key or create a key with the needed checkout and webhook permissions.

How Whop attribution works

When Whop sends a webhook to Faurya:

  1. Faurya verifies the Whop webhook signature.
  2. Faurya stores the verified raw webhook payload for debugging.
  3. Faurya deduplicates repeated Whop webhook deliveries.
  4. Faurya reads the payment metadata.
  5. Faurya connects the payment to the original faurya_visitor_id and faurya_session_id when those values are present.

Troubleshooting

Faurya cannot connect Whop

  • Confirm the API key belongs to the Whop company you want to connect, and to the same environment (sandbox or production).
  • Confirm the key has every permission in Required Whop API key access.
  • If custom permissions still fail, use an Admin Company API Key.

Checkout creation returns “You are not authorized”

  • Confirm the key has checkout configuration or plan creation access.
  • Confirm your Product ID belongs to the same company.
  • In sandbox, use https://sandbox-api.whop.com/api/v1 and sandbox dashboard IDs.

Revenue appears but is unattributed

  • Confirm you pass faurya_visitor_id and faurya_session_id into Whop checkout metadata.
  • Confirm those values are present in the Whop payment webhook payload.

Duplicate revenue appears

Faurya deduplicates Whop webhooks by webhook ID and payment identifiers. Avoid also recording the same Whop payment through a separate manual API call.