How Webhooks Work
When an event occurs in your funnel, FunnelFox sends an HTTP POST request to your configured endpoint with a JSON payload containing event details.Quick Start
1
Configure Endpoint
Add your webhook URL in Project Settings:
- Production URL: For live events
- Sandbox URL: For test events (optional)
2
Verify Requests
Validate the
Fox-Secret-Key header matches your project’s secret key3
Handle Events
Process the JSON payload and respond with 2xx status within 10 seconds
4
Implement Retries
Handle potential duplicate events and implement idempotency
Event Types
FunnelFox sends webhooks for these events:Funnel Events
onboarding.started- User begins funnelonboarding.completed- User reaches finish screenprofile.updated- Email captured or updated
Payment Events
purchase.completed- User has completed a purchase or when recurrent/upsell purchase happen
Subscription Events
subscription.created- New subscriptionsubscription.trialing- Trial period startedsubscription.active- Subscription activatedsubscription.cycle- Renewal processedsubscription.paused- Billing pausedsubscription.resumed- Billing resumedsubscription.cancelled- Subscription cancelledsubscription.auto_renew_off- Auto-renewal turned offsubscription.unpaid- Payment failed
Security & Verification
Every webhook request includes aFox-Secret-Key header containing your project’s
secret key. Always verify this header to ensure requests are from FunnelFox.
Payload Structure
All webhook events follow this base structure:Key Fields
Matching User Profiles
Webhook events carry the same profile and session identifiers that your funnel exposes as funnel variables. Match them to tie an event back to a specific visitor or visit you saw in the funnel.
To match reliably, normalize one side before you compare. Strip the prefix from
the webhook value, or add it to the value you stored from the funnel:
When you look a profile or session up with the FunnelFox API, you can pass the ID with or
without the prefix (the API accepts both forms).
Handling Webhooks
Response Requirements
Your endpoint must:- Return a 2xx status code (200-299)
- Respond within 10 seconds
- Accept
application/jsoncontent type
Idempotency
Events may be delivered multiple times. Use the eventid to ensure
idempotent processing:
Retry Logic
FunnelFox implements exponential backoff with up to 30 retry attempts for failed webhook deliveries.Retry Schedule
The delay between retries follows this formula:- Attempt 1: ~15-45 seconds
- Attempt 2: ~30-90 seconds
- Attempt 3: ~1-3 minutes
- Attempt 10: ~3-5 hours
- Attempt 30: ~10-12 days
Failed webhooks are retried for up to 2 weeks. Ensure your endpoint can
handle events that arrive significantly after they occurred.
Testing Webhooks
Local Development
Use tools like ngrok to expose your local server:Webhook Testing Tools
Popular webhook testing services:- Webhookah - Test your webhooks in real-time
- Webhook.site - Instant test endpoints
- RequestBin - Inspect webhook payloads
- Hookdeck - Development webhook infrastructure
Subscription Access via Webhooks
You can grant new customers subscription access usingsubscription. webhooks such as subscription.trialing or subscription.active.
These webhooks are optimized for reliability and have the lowest delivery delay, making them ideal for managing subscription access in real time.
Troubleshooting
Webhooks not being received
Webhooks not being received
- Verify your endpoint URL is publicly accessible (not localhost)
- Check the Fox-Secret-Key header is being validated correctly
- Ensure your server responds within 10 seconds
- Confirm webhooks are configured in Project Settings
Receiving duplicate events
Receiving duplicate events
This is expected behavior due to retry logic. Implement idempotency using
the event
id field to handle duplicates gracefully.Events arriving out of order
Events arriving out of order
Network delays and retries can cause events to arrive out of sequence.
Use the
created_at timestamp to determine actual event order.Missing data in payload
Missing data in payload
Some fields are only present for specific event types. Check the
Events Reference for complete schemas. The
data field varies per event.Sandbox vs Production events
Sandbox vs Production events
Check the
is_sandbox field to differentiate test events. Configure
separate webhook URLs for sandbox and production in Project Settings.Rate Limits
FunnelFox doesn’t impose rate limits on webhook deliveries. However:- Events are sent as they occur (no batching)
- High-volume funnels may generate many simultaneous requests
- Ensure your endpoint can handle your expected traffic
Next Steps
- Webhook Reference - Detailed event schemas
- Project Settings - Configure webhook endpoints
