Webhooks and Integrations
Receive real-time notifications when QR codes are scanned or modified.
What are Webhooks?
Webhooks send HTTP POST requests to your server when events occur.
Available Events
qr_code.scanned: Fired every time a QR code is scanned.
qr_code.created: When a new QR code is created.
qr_code.updated: When QR code content or settings change.
qr_code.deleted: When a QR code is removed.
scan_limit.reached: When scan limit threshold is hit.
schedule.activated: When scheduled QR code becomes active.
schedule.deactivated: When scheduled QR code becomes inactive.
Setting Up Webhooks
- Go to Settings > Webhooks
- Click Add Webhook
- Enter your endpoint URL
- Select events to receive
- Optional: Add secret key
- Test webhook
- Save and activate
Webhook Payload
Each webhook POST includes:
Headers:
- Content-Type: application/json
- X-Webhook-Signature: HMAC signature
- X-Event-Type: Event name
Body: Event-specific JSON payload with timestamp, event type, and data.
Scan Event Payload
Contains:
- QR code ID and name
- Scan timestamp
- Location data (country, city, lat/lng)
- Device info (OS, browser, type)
- Referrer
- User agent
Security
Secret Key: Sign webhooks with HMAC-SHA256 for verification.
Verification: Always verify signature before processing.
HTTPS Only: Webhooks only sent to HTTPS endpoints.
IP Whitelist: Optional IP restriction for extra security.
Retry Logic
Failed Delivery:
- Retry after 1 minute
- Retry after 5 minutes
- Retry after 15 minutes
- Give up after 3 attempts
Success: HTTP 200-299 response code.
Testing Webhooks
Test Event: Send test webhook to verify endpoint.
Webhook Logs: View delivery history and responses.
Request Inspector: See exact payload and headers sent.
Common Integrations
Zapier: Connect to 5000+ apps without code.
Slack: Get scan notifications in channels.
Google Sheets: Log scans to spreadsheet automatically.
Email: Send alerts to team.
CRM Systems: Update customer records on scan.
Analytics: Send to custom analytics platforms.
Use Cases
Lead Tracking: Send scan data to CRM when prospects scan.
Inventory: Update stock when product QR scanned.
Access Control: Trigger door locks on authorized scans.
Notifications: Alert staff when important QR codes scanned.
Data Sync: Keep external systems updated.
Response Handling
Synchronous: Respond with 200 immediately, process async.
Timeout: Respond within 5 seconds.
Errors: Return 4xx/5xx for validation/server errors.
Best Practices
Idempotency: Handle duplicate webhooks gracefully.
Async Processing: Queue webhooks, process in background.
Monitoring: Set up alerts for failed webhooks.
Logging: Keep webhook delivery logs.
Documentation: Document your endpoint requirements.
Testing: Test with high volume before going live.