Guides 6 min read

QR Code Webhooks: Get Real-Time Scan Notifications in Slack, CRM, or Your App

Set up HMAC-signed webhooks to receive instant notifications when QR codes are scanned. Integrate with Slack, Salesforce, HubSpot, or Zapier.

Every QR code scan is a customer interaction. Webhooks let you act on those interactions in real time.

How Scan Webhooks Work

  1. Register a webhook URL and choose events to subscribe to
  2. When a QR code is scanned, ScanStack sends a POST to your URL
  3. Payload includes scan data: QR ID, resolved URL, IP, device, geo data, timestamp
  4. Request is signed with HMAC-SHA256 for verification

Setting Up a Webhook

curl -X POST https://api.scanstack.dev/v2/webhooks \
  -H "x-api-key: qr_your_key" \
  -d '{ "url": "https://your-server.com/scanstack-webhook", "events": ["scan.completed"] }'

Webhook Payload

{
  "event": "scan.completed",
  "qr_id": "abc-123",
  "short_code": "xyz789",
  "resolved_url": "https://example.com/landing",
  "ab_test_id": "test-456",
  "ab_variant_id": "variant-a",
  "visitor_scan_count": 3,
  "geo": { "country": "US", "region": "TX", "city": "Austin" },
  "ip": "203.0.113.42",
  "timestamp": "2026-03-17T14:30:00Z"
}

Verifying Signatures

const crypto = require('crypto');
function verifyWebhook(body, signature, secret) {
  const expected = crypto.createHmac('sha256', secret).update(body).digest('hex');
  return crypto.timingSafeEqual(Buffer.from(signature), Buffer.from(expected));
}

Popular Integrations

  • Slack — Post scan alerts to a channel
  • Zapier — Connect to 5,000+ apps without code
  • Salesforce / HubSpot — Create or update CRM contacts on scan
  • Google Sheets — Log every scan to a spreadsheet
  • Custom analytics — Pipe scan data into your data warehouse

Combine webhooks with scan automations for fully automated workflows, or use the data to power A/B test conversion tracking.