Verify Payload Signatures
Every webhook payload includes anSC-Signature header containing an HMAC-SHA256 signature. Always verify this signature before processing the payload.
How It Works
- Smartcar creates an HMAC-SHA256 hash of the payload using your Application Management Token as the secret key
- The hash is sent in the
SC-Signatureheader - You recreate the hash using the same secret and compare it to the received signature
- If they match, the payload is authentic
Implementation
Why Signature Verification Matters
Prevents Spoofed Requests
Prevents Spoofed Requests
Without verification, anyone could send fake webhook payloads to your endpoint. Signature verification proves the payload came from Smartcar.
Protects Against Replay Attacks
Protects Against Replay Attacks
While signatures don’t prevent replays alone, combining them with
eventId deduplication creates a complete defense.Ensures Data Integrity
Ensures Data Integrity
If the payload is tampered with in transit, the signature won’t match, alerting you to the modification.
Compliance Requirements
Compliance Requirements
Many security standards and regulations require verification of external data sources.
Additional Security Measures
Use HTTPS Only
Smartcar only delivers webhooks to HTTPS endpoints with valid SSL certificates.Required: Your callback URL must use HTTPS with a valid, trusted SSL certificate. Self-signed certificates are not supported.
Restrict Access by IP (Optional)
While Smartcar doesn’t publish a fixed IP range (addresses may change), you can add an extra layer of security by:- Logging all webhook source IPs
- Alerting on unusual source addresses
- Rate limiting by IP to prevent abuse
Don’t rely on IP filtering alone. Signature verification is the primary security mechanism. IP-based restrictions should be supplementary.
Rotate Management Tokens Periodically
Your Application Management Token is used to verify webhook signatures. Rotate it periodically for security:Monitor Failed Verifications
Track and alert on signature verification failures:Using SDK Helpers
Smartcar’s SDKs provide built-in methods for signature verification:Next Steps
Payload Verification Guide
Complete implementation details
Reliability
Implement idempotency
Monitoring
Track verification failures
Architecture
Design secure webhook handlers

