@suluk/stripe - v0.2.0
    Preparing search index...

    Function verifyStripeSignature

    • Verify a Stripe stripe-signature header against the raw request body + the endpoint signing secret. Returns true iff a v1 signature matches the HMAC of ${t}.${rawBody} AND the timestamp is within tolerance. Pass the RAW (unparsed) body — re-serializing JSON changes the bytes and breaks the HMAC.

      Parameters

      • rawBody: string
      • sigHeader: string
      • secret: string
      • opts: VerifyOptions = {}

      Returns Promise<boolean>