import Whop from '@whop/sdk';
const client = new Whop({
apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});
const override = await client.affiliates.overrides.retrieve('override_id', {
id: 'aff_xxxxxxxxxxxxxx',
});
console.log(override.id);{
"id": "affov_xxxxxxxxxxxx",
"override_type": "standard",
"commission_type": "percentage",
"commission_value": 6.9,
"applies_to_payments": "first_payment",
"plan_id": "plan_xxxxxxxxxxxxx",
"product_id": "<string>",
"applies_to_products": "single_product",
"revenue_basis": "pre_fees",
"product_direct_link": "<string>",
"checkout_direct_link": "<string>",
"total_referral_earnings_usd": 6.9
}Retrieves the details of a specific affiliate override.
Required permissions:
affiliate:basic:readimport Whop from '@whop/sdk';
const client = new Whop({
apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});
const override = await client.affiliates.overrides.retrieve('override_id', {
id: 'aff_xxxxxxxxxxxxxx',
});
console.log(override.id);{
"id": "affov_xxxxxxxxxxxx",
"override_type": "standard",
"commission_type": "percentage",
"commission_value": 6.9,
"applies_to_payments": "first_payment",
"plan_id": "plan_xxxxxxxxxxxxx",
"product_id": "<string>",
"applies_to_products": "single_product",
"revenue_basis": "pre_fees",
"product_direct_link": "<string>",
"checkout_direct_link": "<string>",
"total_referral_earnings_usd": 6.9
}A company API key, company scoped JWT, app API key, or user OAuth token. You must prepend your key/token with the word 'Bearer', which will look like Bearer ***************************
The affiliate ID.
"aff_xxxxxxxxxxxxxx"
The override ID.
A successful response
An object storing information about the affiliate
The unique identifier for the affiliate override.
"affov_xxxxxxxxxxxx"
The type of override (standard or rev_share).
standard, rev_share The type of commission (percentage or flat_fee).
percentage, flat_fee The commission value (percentage 1-100 or flat fee in dollars).
6.9
Whether the commission applies to the first payment only or all payments (standard overrides only).
first_payment, all_payments The plan ID (for standard overrides).
"plan_xxxxxxxxxxxxx"
The product ID (for rev-share overrides).
Whether this rev-share override applies to a single product or all products (rev-share only).
single_product, all_products The revenue calculation basis (pre_fees or post_fees).
pre_fees, post_fees The product page direct link for referrals (standard overrides only).
The checkout direct link for referrals (standard overrides only).
The total earnings paid to this affiliate for referrals to this specific plan, in USD.
6.9
Was this page helpful?