This page covers verifying ongoing webhook payloads. For initial endpoint verification when creating a webhook, see Callback URI Verification.
SC-Signature header containing an HMAC-SHA256 signature of the payload.
Why Verification Matters
Without signature verification:- Anyone could send fake webhook payloads to your endpoint
- Malicious actors could inject false vehicle data
- You have no guarantee the payload came from Smartcar
- The payload was sent by Smartcar
- The payload wasn’t tampered with in transit
- You can safely process the data
How Signature Verification Works
- Smartcar creates an HMAC-SHA256 hash of the raw request body 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 and unmodified
Quick Implementation
Use our SDKs for automatic signature verification:Manual Implementation
If you’re not using an SDK, implement signature verification manually:Best Practices
Always verify signatures
Always verify signatures
Never skip signature verification, even in development. It’s your only guarantee that payloads are authentic.
Use the raw body
Use the raw body
Verify against the raw request body before JSON parsing. Parsed JSON may have different whitespace/ordering that breaks verification.
Reject invalid signatures
Reject invalid signatures
Return
401 Unauthorized for invalid signatures. Don’t process the payload or return 200.Keep tokens secure
Keep tokens secure
Store your Application Management Token securely (environment variables, secrets manager). Never commit it to source control.

