Webhooks
Webhooks allow you to receive real-time notifications when events occur in PriveTag, such as bookings being confirmed or vouchers being used.Why Use Webhooks?
Real-time Updates
Get notified instantly when events happen, no polling required
Ground Truth Events
Know when users actually visit venues (QR verification)
Booking Lifecycle
Track booking from creation to completion
Analytics
Build custom analytics on user behavior
Setting Up Webhooks
Via Dashboard
- Go to privetag.com/developers/webhooks
- Click Add Endpoint
- Enter your webhook URL
- Select events to receive
- Copy and save your Webhook Secret
Via API Key Configuration
When creating or updating an API key, specify a webhook URL:Webhook Events
Webhook Payload
All webhooks follow this structure:booking_confirmed
voucher_delivered
qr_verified (Ground Truth)
This is the Ground Truth event - it tells you when a user actually visited the venue, not just when they booked.
booking_cancelled
Verifying Webhooks
All webhook requests include a signature header for verification:Verification Example
Responding to Webhooks
Success Response
Return a 2xx status code to acknowledge receipt:Retry Logic
If your endpoint returns a non-2xx status or times out, we’ll retry:
After 5 failed attempts, the webhook is marked as failed.
Best Practices
Respond quickly
Respond quickly
Return 200 immediately and process asynchronously:
Handle duplicates
Handle duplicates
Use
id field for idempotency:Use HTTPS
Use HTTPS
Webhook URLs must use HTTPS in production. We verify SSL certificates.
Log everything
Log everything
Log all webhook events for debugging:
Testing Webhooks
Test Endpoint
Send test webhooks from the dashboard or via API:Local Development
Use tools like ngrok or localtunnel to test webhooks locally:Webhook Logs
View webhook delivery logs in the dashboard:- Delivery status: Success, failed, retrying
- Response code: HTTP status returned
- Response time: Latency of your endpoint
- Payload: Full request sent
Event Filtering
Configure which events to receive:- Only receiving Ground Truth events
- Separating booking events from verification events
- Reducing webhook volume
Next Steps
API Keys
Configure webhook URL in your API key
Execute Booking
Book activities and receive webhook events