-
Notifications
You must be signed in to change notification settings - Fork 0
Affiliate
An affiliate is a partner who promotes a company's products in exchange for commission on referred sales. Whop tracks affiliates, lets you archive them, and supports per-affiliate commission overrides that adjust the default rate for specific products or plans.
$client->affiliates // Matchable\Whop\Resource\AffiliateResource| HTTP | POST affiliates |
| Does | Creates a new affiliate. |
| Parameters |
$data — affiliate attributes. |
| Returns | array |
| HTTP | GET affiliates |
| Does | Lists affiliates. |
| Parameters |
$query — optional filters / pagination. |
| Returns | array |
| HTTP | GET affiliates/{id} |
| Does | Retrieves a single affiliate by ID. |
| Parameters |
$id — the affiliate ID. |
| Returns | array |
| HTTP | POST affiliates/{id}/archive |
| Does | Archives an affiliate. |
| Parameters |
$id — the affiliate ID. |
| Returns | array |
| HTTP | POST affiliates/{id}/unarchive |
| Does | Restores an archived affiliate. |
| Parameters |
$id — the affiliate ID. |
| Returns | array |
| HTTP | POST affiliates/{id}/overrides |
| Does | Creates a commission override for the affiliate. |
| Parameters |
$id — the affiliate ID; $data — override attributes. |
| Returns | array |
| HTTP | GET affiliates/{id}/overrides |
| Does | Lists the affiliate's commission overrides. |
| Parameters |
$id — the affiliate ID; $query — optional filters / pagination. |
| Returns | array |
| HTTP | GET affiliates/{id}/overrides/{overrideId} |
| Does | Retrieves a single commission override. |
| Parameters |
$id — the affiliate ID; $overrideId — the override ID. |
| Returns | array |
| HTTP | PATCH affiliates/{id}/overrides/{overrideId} |
| Does | Updates a commission override. |
| Parameters |
$id — the affiliate ID; $overrideId — the override ID; $data — fields to change. |
| Returns | array |
| HTTP | DELETE affiliates/{id}/overrides/{overrideId} |
| Does | Deletes a commission override. |
| Parameters |
$id — the affiliate ID; $overrideId — the override ID. |
| Returns | array |
$affiliate = $client->affiliates->create([
'user_id' => 'user_...',
]);
$client->affiliates->createOverride($affiliate['id'], [
'plan_id' => 'plan_...',
'percentage' => 25,
]);Official Whop documentation: https://docs.whop.com
Core Company · AccountLink · File · AccessToken · AuthorizedUser · User · Member · Webhook
Payments & Billing Payment · Checkout · Plan · Product · Membership · Refund · Invoice · PromoCode · PaymentMethod · SetupIntent
Platform & Finance Transfer · FeeMarkup · Topup · Withdrawal · LedgerAccount · PayoutAccount · PayoutMethod
Disputes Dispute · DisputeAlert · ResolutionCenter
Commerce Shipment · Lead · Entry · Review · Affiliate · Stats
Experiences & Courses Experience · Course · CourseChapter · CourseLesson · CourseLessonInteraction · CourseStudent
Communication ChatChannel · DmChannel · DmMember · Message · Reaction · Forum · ForumPost · SupportChannel · Notification
Advertising AdCampaign · AdGroup · Ad
Apps & AI App · AppBuild · AiChat · CompanyTokenTransaction
Verifications Verification