@sumup/sdk
    Preparing search index...

    Function verifyEventSignature

    • Verify the signature and signing timestamp without parsing the event or running callbacks. Use before storing a delivery in a trusted queue; workers can later use client.parseEventNotificationWithoutVerification() on the stored payload.

      Parameters

      • secret: string

        Your event signing secret, not an API key.

      • body: EventBody

        Unchanged request body, read before JSON parsing.

      • signature: string

        Complete value of the SIGNATURE_HEADER header.

      Returns Promise<void>

      EventSignatureError If the secret is missing, the signature is invalid, or the timestamp is more than five minutes before or after the receiver's clock.

      Requires Web Crypto (globalThis.crypto.subtle). Successful verification does not validate JSON.