Skip to content

WebhookVerificationErrorCode

WebhookVerificationErrorCode = "MISSING_SIGNATURE" | "MISSING_TIMESTAMP" | "INVALID_SIGNATURE" | "INVALID_TIMESTAMP" | "STALE_TIMESTAMP"

Defined in: packages/webhook/src/security/verify-webhook-request.ts:56

Why verifyWebhookRequest rejected a request:

  • MISSING_SIGNATURE: the signature header is missing or empty.
  • MISSING_TIMESTAMP: the X-Webhook-Timestamp header is missing or empty.
  • INVALID_SIGNATURE: the signature does not match the body, timestamp, and secret, or a byte body is not valid UTF-8.
  • INVALID_TIMESTAMP: the signed timestamp is not a whole number of seconds.
  • STALE_TIMESTAMP: the signed time is further from now than toleranceMs allows, counting the second the signed time was rounded down from.