-
Notifications
You must be signed in to change notification settings - Fork 0
Webhook
A webhook registers an HTTPS endpoint that Whop calls when subscribed events occur — letting your application react to payments, memberships, and other changes in real time.
$client->webhooks // Matchable\Whop\Resource\WebhookResource| HTTP | POST webhooks |
| Does | Registers a new webhook endpoint. |
| Parameters |
$data — webhook attributes (e.g. url, the list of events to subscribe to). |
| Returns |
Matchable\Whop\Dto\Webhook\WebhookResponse — a typed DTO, not a plain array. |
Note: Unlike most resources in this SDK,
WebhookResource::createdoes not return a rawarray. It returns a typedWebhookResponseDTO with the propertiesid(string),url(?string), andevents(list<string>). If the API response is missing the requiredidfield, aMissingArgumentsExceptionis thrown.
$webhook = $client->webhooks->create([
'url' => 'https://example.com/whop/webhook',
'events' => ['payment.succeeded', 'membership.went_valid'],
]);
echo $webhook->id;
echo $webhook->url;
foreach ($webhook->events as $event) {
echo $event;
}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