Affiliates

Creates a commission override for an affiliate.

Required permissions:

  • affiliate:create
post/affiliates/{id}/overrides

Request

  • Base URL
    https://api.whop.com/api/v1
  • Auth
    HTTP bearer

Path parameters

id, string required
Example:aff_xxxxxxxxxxxxxx

The affiliate ID.

Request body

union required

Parameters for CreateAffiliateOverride

object required

Autogenerated input type of CreateAffiliateOverride

OR
object required

Autogenerated input type of CreateAffiliateOverride

Example request

{
  "commission_value": 6.9,
  "plan_id": "plan_xxxxxxxxxxxxx"
}

Response

A successful response

object required

A commission configuration for an affiliate, defining payout terms for a specific plan or revenue share

applies_to_payments, 'first_payment' | 'all_payments' nullable required

Whether the affiliate commission applies to the first payment or all payments

applies_to_products, 'single_product' | 'all_products' nullable required

Whether a rev-share override applies to a single product or all products

checkout_direct_link, string nullable required

The checkout direct link for referrals (standard overrides only).

commission_type, 'percentage' | 'flat_fee' required

The type of commission (percentage or flat_fee).

commission_value, number required

The commission amount. A percentage (1-100) when commission_type is percentage, or a dollar amount when flat_fee.

id, string required

The unique identifier for the affiliate override.

override_type, 'standard' | 'rev_share' required

The type of override (standard or rev_share).

plan_id, string nullable required

The plan ID (for standard overrides). Null for a product-wide override, which sets the terms for plans added to the product later.

product_direct_link, string nullable required

The product page direct link for referrals (standard overrides only).

product_id, string nullable required

The product ID (for rev-share overrides, and for product-wide overrides that set the terms for plans added to the product later).

revenue_basis, 'pre_fees' | 'post_fees' nullable required

The calculation method for affiliate rev-share percentages

total_referral_earnings_usd, number required

The total earnings paid to this affiliate for referrals to this specific plan, in USD.

Example response

{
  "commission_value": 6.9,
  "id": "affov_xxxxxxxxxxxx",
  "plan_id": "plan_xxxxxxxxxxxxx",
  "total_referral_earnings_usd": 6.9
}

Changes