Whop Webhooks
Connect Whop webhooks to automatically track payments and memberships as conversion events. DATALYR matches customers to their original ad click using email-based identity resolution.What You’ll Learn
- How to configure Whop webhooks
- Supported Whop events
- Email attribution matching
- Testing and verification
Before You Start
- DATALYR tracking script installed on your website
- Email capture with
datalyr.identify({ email })before checkout - Admin access to Whop Dashboard
- Active workspace in DATALYR
Supported Events
DATALYR processes these Whop webhook events:| Whop Event | DATALYR Event | Description |
|---|---|---|
payment.succeeded | purchase | One-time payment completed |
membership.went_valid | subscribe | Membership activated |
membership.renewed | purchase | Recurring membership payment |
How Attribution Works
When a customer makes a Whop purchase:- Whop sends webhook with customer email to DATALYR
- DATALYR queries events table: “Find visitor_id where email matches”
- DATALYR retrieves original attribution (fbclid, gclid, UTMs)
- Event is created with
source: 'whop'and attribution data - Conversion rules fire postbacks to Meta, Google, TikTok
Attribution only works if you call
datalyr.identify({ email }) before the customer reaches Whop checkout. The email must be captured in a DATALYR event first.Step 1: Get Webhook URL
- Log in to DATALYR dashboard
- Navigate to Sources tab
- Click Webhooks tab
- Click Whop card
- Copy your webhook URL
Step 2: Configure Whop Webhook
Add Webhook Endpoint
- Log in to Whop Dashboard
- Navigate to Settings → Developer → Webhooks
- Click Create Webhook
- Paste your DATALYR webhook URL
- Enter a description: “DATALYR Attribution”
Select Events
Choose these events to listen to:payment.succeededmembership.went_validmembership.renewed(optional, for recurring payments)
Get Signing Secret
After creating the webhook:- Click on the webhook endpoint
- Copy the Signing Secret
- Return to DATALYR webhook setup modal
- Paste the signing secret
- Click Save
Step 3: Verify Setup
Test with Live Purchase
- Visit your site with ad parameters:
yoursite.com?fbclid=test123 - Call
datalyr.identify({ email: '[email protected]' }) - Complete Whop checkout with the same email
- Check DATALYR Event Stream
- A
purchaseorsubscribeevent withsource: 'whop' - Attribution data (fbclid, visitor_id) from original session
- Event value matching Whop amount
Check Webhook Delivery
In Whop Dashboard:- Navigate to Settings → Developer → Webhooks
- Click on your DATALYR webhook
- View Recent Deliveries
- Verify status is 200 OK
Step 4: Create Conversion Rules
After verifying webhook events are created, set up conversion rules to fire events to ad platforms.Example: Meta Subscribe Event
- Navigate to Integrations → Conversion Rules
- Click Create Rule
- Configure rule:
- Event Name:
subscribe - Event Source:
whop
- Platform: Meta Ads
- Event Type:
Subscribe
- Use event value from webhook
Event Data Structure
Whop webhooks create events with this structure:Attribution Match Rate
DATALYR’s email-based attribution achieves:- 95%+ match rate when email is captured before checkout
- 90%+ match rate for cross-device (mobile ad → desktop purchase)
- 85%+ match rate for 30+ day attribution windows
Maximize Match Rate
Capture email early in the customer journey:Value Calculation
DATALYR automatically converts Whop amounts:- Payments:
amount / 100(Whop uses cents) - Memberships: Monthly value calculated from billing period
- Annual:
price / 100 / 12 - Monthly:
price / 100 - Lifetime:
price / 100(treated as one-time)
- Annual:
Deduplication
Whop may send the same webhook multiple times (retries). DATALYR uses Cloudflare KV to deduplicate:- Extract
event.idfrom webhook - Check if
workspace_id:event_idexists in KV - If exists, return 200 OK but skip processing
- If new, process and store in KV
Security
DATALYR verifies all Whop webhooks using signature validation:- Extract
X-Whop-Signatureheader - Verify signature matches webhook secret
- Reject invalid signatures with 401 Unauthorized
Troubleshooting
Events have no attribution data
Symptoms: Whop events appear in Event Stream but fbclid/gclid are null Cause: Email was not captured withdatalyr.identify() before checkout
Solution:
- Add
datalyr.identify({ email })on email capture forms - Ensure identify call happens before Whop checkout
- Test by checking Event Stream for identify events with the same visitor_id
Webhooks not appearing in Event Stream
Symptoms: Whop purchase completes but no event in DATALYR Cause: Webhook URL not configured or signing secret incorrect Solution:- Check Whop Dashboard → Developer → Webhooks → verify endpoint is active
- Check Recent Deliveries for errors
- Verify signing secret in DATALYR matches Whop
- Test with a new purchase
Signature verification failed
Symptoms: Whop Dashboard shows webhook delivery failures with 401 errors Cause: Signing secret mismatch or not saved in DATALYR Solution:- Get signing secret from Whop webhook settings
- Return to DATALYR webhook setup modal
- Paste and save the signing secret
- Trigger new test event
Wrong event value
Symptoms: Event value in DATALYR doesn’t match Whop amount Cause: Currency conversion or billing period calculation Solution:- Check
event_data.amountin Event Stream - Verify billing period for memberships
- For annual memberships, value is divided by 12 for monthly attribution
- Contact support if amounts are incorrect
What Happens Next
After webhook events are created:- Postback Worker checks for matching conversion rules
- Rules filtered by
trigger_event_source: 'whop' - Conversions fire to Meta, Google, TikTok with original attribution
- Ad platforms receive events with fbclid/gclid for optimization
Whop Revenue Analytics (Coming Soon)
Webhook attribution is separate from Whop Revenue Analytics: Webhooks (This Feature):- Real-time conversion tracking
- Fires events to ad platforms
- No OAuth required
- Dashboard metrics (MRR, ARR, churn)
- Requires OAuth connection
- Periodic data sync via GraphQL API