Webhooks
Webhooks#
Webhooks send notifications to external URLs when events happen in your system. Use them to integrate with other services, trigger automations, or sync data.
How webhooks work#
- You register a webhook URL for specific triggers
- When the trigger occurs, the plugin sends a POST request to your URL
- Your server processes the data and takes action
Setting up webhooks#
Add a webhook#
- Go to Events > Settings > Webhooks
- Click Add Webhook
- Enter a name for reference
- Enter the delivery URL
- Select triggers to listen for
- Save
Webhook fields#
| Field | Description |
|---|---|
| Name | Reference name for your use |
| Delivery URL | Where to send the webhook |
| Status | Active or Paused |
| Triggers | Which events fire this webhook |
| Secret | For signature verification |
Available triggers#
Event triggers#
| Trigger | Fires When |
|---|---|
event.created | New event is published |
event.updated | Event details change |
event.deleted | Event is deleted |
event.status_changed | Status changes (cancelled, etc.) |
Registration triggers#
| Trigger | Fires When |
|---|---|
registration.completed | Ticket purchase completes |
registration.cancelled | Order is cancelled/refunded |
Attendee triggers#
| Trigger | Fires When |
|---|---|
attendee.checked_in | Attendee checks in |
attendee.checked_out | Attendee checks out |
Capacity triggers#
| Trigger | Fires When |
|---|---|
event.sold_out | Event reaches capacity |
event.capacity_available | Spots open up |
Webhook payload#
Payload structure#
{
"id": "webhook_123456",
"trigger": "registration.completed",
"timestamp": "2025-01-15T10:30:00Z",
"site_url": "https://yoursite.com",
"data": {
// Trigger-specific data
}
}
Event created payload#
{
"trigger": "event.created",
"data": {
"event_id": 123,
"title": "Tech Conference",
"start_date": "2025-03-15",
"start_time": "09:00",
"end_date": "2025-03-15",
"end_time": "17:00",
"status": "scheduled",
"type": "in-person",
"venue": "Convention Center",
"capacity": 500,
"link": "https://yoursite.com/events/tech-conference/"
}
}
Registration completed payload#
{
"trigger": "registration.completed",
"data": {
"attendee_id": 456,
"event_id": 123,
"event_name": "Tech Conference",
"order_id": 789,
"ticket_code": "EMWC-ABC123DEF",
"first_name": "John",
"last_name": "Doe",
"email": "john@example.com",
"custom_fields": {
"company": "Acme Inc"
}
}
}
Attendee checked in payload#
{
"trigger": "attendee.checked_in",
"data": {
"attendee_id": 456,
"event_id": 123,
"event_name": "Tech Conference",
"ticket_code": "EMWC-ABC123DEF",
"name": "John Doe",
"email": "john@example.com",
"checked_in_at": "2025-03-15T09:15:00Z",
"checked_in_by": "admin"
}
}
Security#
Signature verification#
Each webhook includes a signature header for verification:
X-EMWC-Signature: sha256=abc123...
Verify in your code:
$payload = file_get_contents( 'php://input' );
$signature = $_SERVER['HTTP_X_EMWC_SIGNATURE'];
$expected = 'sha256=' . hash_hmac( 'sha256', $payload, $your_secret );
if ( hash_equals( $expected, $signature ) ) {
// Valid webhook
}
Secret key#
Set a secret key when creating the webhook. Keep it secure and use it to verify incoming requests.
HTTPS#
Always use HTTPS URLs for webhook delivery to encrypt data in transit.
Delivery#
Retry logic#
If delivery fails:
- First retry: 1 minute after failure
- Second retry: 5 minutes after
- Third retry: 30 minutes after
- Final retry: 2 hours after
After 4 failures, the webhook is marked as failed.
Timeout#
Requests timeout after 15 seconds. If your server needs more time, return a 200 status immediately and process asynchronously.
Response handling#
| Response | Result |
|---|---|
| 2xx | Success, delivery logged |
| 3xx | Failure, will retry |
| 4xx | Failure, will retry |
| 5xx | Failure, will retry |
| Timeout | Failure, will retry |
Managing webhooks#
Viewing webhooks#
Go to Events > Settings > Webhooks to see:
- Webhook name and URL
- Triggers
- Status
- Delivery history
Webhook history#
Click a webhook to see recent deliveries:
- Timestamp
- Trigger type
- Response code
- Payload sent
- Response received
Testing webhooks#
- Edit a webhook
- Click Send Test
- A test payload is sent
- Check your endpoint received it
Pausing webhooks#
To temporarily stop deliveries:
- Edit the webhook
- Change status to Paused
- Save
Triggers queue but do not deliver until reactivated.
Deleting webhooks#
- Go to webhook list
- Hover over the webhook
- Click Delete
- Confirm deletion
Use cases#
Slack notifications#
Send event notifications to Slack:
- Create a Slack Incoming Webhook
- Add webhook with Slack URL
- Select
registration.completedtrigger - New registrations post to Slack
Zapier integration#
Connect to thousands of apps:
- Create a Zapier webhook trigger
- Add the Zapier URL as a webhook
- Build Zaps with event data
Custom CRM sync#
Sync attendees to your CRM:
- Create endpoint in your CRM or middleware
- Add webhook for
registration.completed - Process payload to create CRM contacts
Analytics tracking#
Send event data to analytics:
- Create endpoint for your analytics
- Add webhooks for desired triggers
- Log events for reporting
Email marketing#
Add attendees to email lists:
- Set up endpoint connected to email service
- Use
registration.completedtrigger - Add attendees to appropriate lists
Troubleshooting#
Webhook not firing#
- Check webhook is Active status
- Verify trigger is selected
- Confirm action should trigger (published event, completed order)
Delivery failures#
- Check URL is accessible
- Verify HTTPS certificate is valid
- Check server is responding within 15 seconds
- Review error messages in delivery history
Wrong data received#
- Verify trigger selection
- Check payload format
- Confirm endpoint is parsing JSON correctly
Signature validation failing#
- Verify secret key matches
- Check payload is not modified
- Confirm hash algorithm (SHA-256)