Overview
This setup lets your affiliates send traffic to a page on your own custom domain that hosts the Whop embedded checkout. When a customer arrives through an affiliate link, a URL parameter carrying the affiliate’s ID is passed to the checkout — and Whop automatically attributes the resulting sale to that affiliate in your dashboard. The sale attribution is fully automatic. The affiliate shares their unique external link, the customer lands on your checkout page, and Whop handles the rest in the background.How it works
- Affiliate copies their unique external link from the Whop Affiliates portal. The link points to your checkout page and includes their affiliate code as a URL parameter (e.g.
?a=affiliatename). - Customer clicks the affiliate link and lands on your checkout page hosted on your own domain.
- A JavaScript snippet on your checkout page reads the affiliate URL parameter from the URL.
- The script injects the affiliate code into the Whop embedded checkout as an attribution attribute.
- The customer completes checkout. Whop records the sale and credits the commission to the affiliate automatically.
- The affiliate sees the sale and commission in their Whop affiliate dashboard in real time.
What you need before starting
- An active Whop account with at least one product and pricing plan set up
- Affiliates enabled on your Whop account
- A page on your website (GoHighLevel, ClickFunnels, Webflow, or any builder) where the checkout will live
- The affiliate attribution script snippet (provided in this guide)
Part 1: Build and embed the checkout
Step 1 — Get your Plan ID
- In your Whop dashboard, go to Checkout Links.
- Find the checkout link for the product you want to embed.
- Click the three dots (…) on the right and select Details.
- Copy the Plan ID (format:
plan_XXXXXXXXX).
Step 2 — Design the checkout embed
- Go to design.whoponboarding.com and open the Builder.
- Click Add Pricing Option and paste your Plan ID.
- Customize the color theme and any display options as desired.
- Scroll to the bottom and click Generate Embed Code.
- Copy the full embed code.
Step 3 — Add the embed to your page
- Open your page builder (GoHighLevel, ClickFunnels, Webflow, or other).
- Add a Code or Custom HTML element to the page where you want the checkout to appear.
- Open the code editor for that element and paste your embed code.
- Do not save yet — add the affiliate attribution script directly below it next (Part 2).
Part 2: Add the affiliate attribution script
The affiliate attribution script reads the affiliate code from the URL parameter and injects it into the checkout embed. It must be placed directly below your checkout embed code inside the same code block.Step 4 — Paste the attribution script
After your checkout embed code, add a line break, then paste the following script:The script reads the
?a= URL parameter from the page URL, finds the Whop checkout embed element, and sets the affiliate attribution attribute on it. This runs before the checkout renders, so the attribution is captured in the background — customers never see it.What the script does — line by line
| Parameter | Example value | Description |
|---|---|---|
params.get('a') | ?a=affiliatename | Reads the affiliate code from the URL. The a parameter is set automatically by Whop’s external affiliate links. |
data-whop-affiliate | affiliatename | The attribute injected onto the checkout embed that tells Whop which affiliate to credit for the sale. |
.whop-checkout-embed | (class name) | The CSS class on the checkout embed element that the script targets. Do not remove this class from your embed code. |
Embed code customization reference
If you need to modify the embed code directly (rather than regenerating it from the builder), here are the key values you can change:| Parameter | Example value | Description |
|---|---|---|
data-whop-checkout-plan-id | plan_XXXXXXXXX | Your Whop Plan ID. Replace this if you switch to a different product or pricing plan. |
data-whop-color-scheme | light / dark / system | Controls the checkout background. light = white, dark = black, system = follows the user’s device setting. |
data-whop-color | (hex or color name) | The accent color for the checkout. See Whop documentation for supported color values. |
Step 5 — Save your page
Once the embed code and the attribution script are both in place, save the code element and publish or save the page. The checkout is now live and ready to track affiliate referrals.Part 3: Create the affiliate external link in Whop
Affiliates need an external link — a Whop-generated URL that points to your checkout page on your custom domain while tracking the affiliate in the background.Step 6 — Set up the external link
- In your Whop dashboard, go to the Affiliates section.
- Go to Assets inside the Affiliates tab.
- Create a new external link asset that points to your checkout page URL (e.g.
https://yoursite.com/checkout). - Save the external link.
Step 7 — How affiliates access their link
- When an affiliate logs into the Whop affiliate portal, they see the external link listed under Assets.
- The link type displays as External in their assets list.
- When they copy the link, Whop automatically appends their unique affiliate code as a URL parameter (e.g.
?a=affiliatename). - The affiliate shares this link in their content, ads, emails, or social media.
- When a customer clicks the link and completes a purchase, the sale is automatically attributed to that affiliate.
The affiliate link points to your custom domain — not a Whop URL. Whop masks the redirect so the URL your customer sees is your own branded domain. The affiliate tracking happens in the background via the URL parameter.
Part 4: Verifying attribution is working
How to test the full flow
- Copy an affiliate’s external link from Whop Affiliates → Assets.
- Open the link in a browser. You should land on your checkout page and see
?a=affiliatenamein the URL. - Complete a test checkout on the page.
- In your Whop affiliate dashboard, check the commission/sales log.
- You should see the payment recorded with the correct affiliate credited, the commission amount, and the date.
What shows in the affiliate dashboard
Once a sale is made through an affiliate’s link, the following appears in the Whop affiliate portal:- Payment amount (the amount the customer paid)
- Commission earned (based on your affiliate commission rate)
- Affiliate username / name
- Customer reference
- Date and time of the sale
Frequently asked questions
Does the customer need to do anything for the attribution to work?- No. As long as the customer arrives on the checkout page via the affiliate link (with the
?a=parameter in the URL), the attribution is captured automatically by the script. - The customer just completes checkout as normal.
- If there is no
?a=parameter in the URL, the script does nothing — no affiliate is attributed, and the sale is recorded as a direct purchase. - Only customers who arrive via a properly formatted affiliate link will trigger attribution.
- Yes. The approach is the same on any platform that supports custom HTML or code elements.
- Add the embed code and the attribution script to the same code block in your builder. The script works the same regardless of platform.
- The full script is in Part 2 of this guide. You can copy it from there.
- The most current version is also available in your Whop integration documentation.
- Each external link asset in Whop points to a specific URL — your checkout page.
- If you have different products on different pages, create a separate external link asset pointing to each page.
- The affiliate code (
?a=) parameter is the same across all links for a given affiliate.
- Commission rates are set in your Whop affiliate program settings.
- The rate applies automatically to any sale attributed through an affiliate link.
- You can update commission rates in the Affiliates section of your Whop dashboard.
- Yes. Your Whop affiliate dashboard shows all sales attributed to affiliates, including individual commission amounts, affiliate names, and dates.
- Affiliates can also see their own earnings and sales data when logged into the Whop affiliate portal.

