@contio/partner-sdk - v1.7.1
    Preparing search index...

    Function createWebhookMiddleware

    • Create Express middleware for webhook verification

      This middleware:

      1. Extracts the signature from the request header
      2. Verifies the signature using HMAC-SHA256
      3. Parses the JSON payload
      4. Attaches the parsed event to req.webhookEvent

      The middleware expects the raw body to be available. Use with:

      • express.raw({ type: 'application/json' }) for the webhook route
      • Or ensure req.body is the raw string/Buffer before this middleware

      Parameters

      Returns RequestHandler

      Express middleware function