-
Notifications
You must be signed in to change notification settings - Fork 0
Membership
A membership is the access grant linking a user to a Plan / Product — it represents an active, paused, or cancelled subscription or one-time access. The SDK supports listing, reading, updating, and a full set of lifecycle actions.
$client->memberships // Matchable\Whop\Resource\MembershipResource| HTTP | GET memberships |
| Does | Lists memberships. |
| Parameters |
$query — optional filters / pagination. |
| Returns | array |
| HTTP | GET memberships/{id} |
| Does | Retrieves a single membership by ID. |
| Parameters |
$id — the membership ID. |
| Returns | array |
| HTTP | PATCH memberships/{id} |
| Does | Updates a membership's attributes. |
| Parameters |
$id — the membership ID; $data — fields to change. |
| Returns | array |
| HTTP | POST memberships/{id}/add-free-days |
| Does | Extends the membership by adding free days. |
| Parameters |
$id — the membership ID; $data — e.g. number of days to add. |
| Returns | array |
| HTTP | POST memberships/{id}/cancel |
| Does | Cancels the membership. |
| Parameters |
$id — the membership ID; $data — optional cancellation options (e.g. immediate vs. end of period). |
| Returns | array |
| HTTP | POST memberships/{id}/pause |
| Does | Pauses the membership. |
| Parameters |
$id — the membership ID; $data — optional pause options. |
| Returns | array |
| HTTP | POST memberships/{id}/resume |
| Does | Resumes a paused membership. |
| Parameters |
$id — the membership ID; $data — optional resume options. |
| Returns | array |
| HTTP | POST memberships/{id}/uncancel |
| Does | Reverses a pending cancellation, keeping the membership active. |
| Parameters |
$id — the membership ID. |
| Returns | array |
$membership = $client->memberships->get('mem_...');
// Give the member a week on the house, then schedule cancellation.
$client->memberships->addFreeDays('mem_...', ['days' => 7]);
$client->memberships->cancel('mem_...');
// Changed their mind.
$client->memberships->uncancel('mem_...');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