Affiliates
Affiliates earn commissions for referred sales. The API flow has two parts: create an affiliate record, then add overrides that define the commission.
How attribution works
- You create an affiliate record for a user, then add overrides. Each override returns
product_direct_linkandcheckout_direct_linkfields. These are referral URLs the affiliate shares (they include?a=<username>). - A buyer clicks the link; Whop stores the affiliate cookie (30-day attribution window by default).
- Buyer checks out within the window. Commission is calculated per the matching override:
standard(per-plan, percentage or flat fee) orrev_share(percentage of revenue, product-specific or company-wide). - Commission is attributed to the affiliate and reflected in the override’s
total_referral_earnings_usdfield.
Refunds reverse commissions. If a buyer refunds within the window, the affiliate’s earning on that sale is clawed back automatically.
Affiliates need a Whop company to receive payouts. Earnings accrue on the record; payouts go to their company balance via transfers. If they do not have a company yet, onboard them with connected account enrollment.
Create an affiliate
user_identifier resolves flexibly. Pass a username, email, user ID, or Discord ID. If an affiliate record already exists for the company + user pair, the existing record is returned (idempotent).
Add commission overrides
An affiliate record does not set a commission by itself. Add overrides to decide what the affiliate gets paid.
Standard (per-plan)
commission_value rules:
"percentage": whole number 1–100 (40= 40%)."flat_fee": dollar amount (10= $10).
applies_to_payments:
"first_payment": affiliate earns only on the initial purchase."all_payments": affiliate earns on every recurring payment too.
Rev-share (revenue percentage)
Rev-share overrides are always percentage-based. Don’t pass commission_type: "flat_fee".
Manage overrides
Manage affiliates
Company-level affiliate settings
Three company fields control how the affiliate program is presented to users. Update them via the Company resource.
Tracking earnings
Each override includes a total_referral_earnings_usd field that reflects cumulative earnings (in USD) for that specific override. Re-fetch the override (or list overrides on an affiliate) to get the current total.
There is no dedicated affiliate.* webhook in v1, and the public payment schema does not expose affiliate linkage. Poll listOverrides on your payout schedule and compare the latest total_referral_earnings_usd values with the last values you stored.

