Skip to main content

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

  1. Go to privetag.com/developers/webhooks
  2. Click Add Endpoint
  3. Enter your webhook URL
  4. Select events to receive
  5. 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

Always verify signatures to ensure webhooks are from PriveTag. Never process unverified webhooks.

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

Return 200 immediately and process asynchronously:
Use id field for idempotency:
Webhook URLs must use HTTPS in production. We verify SSL certificates.
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:
This is useful for:
  • 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