@bates-solutions/clover API Reference - v1.3.0
    Preparing search index...

    Module server

    @bates-solutions/clover/server — webhook helpers for the Clover wrapper.

    Server utilities for handling Clover webhooks: signature verification plus a typed handler-map dispatch, with adapters for Express, AWS Lambda, and a framework-neutral Web/edge handler. Verification uses WebCrypto, so it runs on Node, Deno, Bun, and Cloudflare Workers.

    import { createWebhookHandler } from '@bates-solutions/clover/server';

    const handler = createWebhookHandler({
    signingSecret: process.env.CLOVER_WEBHOOK_SECRET!,
    handlers: { CHARGE: async (event) => { console.log(event); } },
    });
    CloverWebhookRequest
    ExpressWebhookOptions
    LambdaProxyEvent
    LambdaProxyResult
    LambdaWebhookConfig
    ParsedWebhookRequest
    VerifyOptions
    WebhookConfig
    WebhookEvent
    WebhookLogger
    WebhookVerificationResult
    WebhookHandler
    WebhookHandlers
    SIGNATURE_HEADER
    createExpressWebhookHandler
    createLambdaWebhookHandler
    createWebhookHandler
    createWebhookProcessor
    getVerificationCode
    parseAndVerifyWebhook
    parseWebhookEvent
    processWebhookEvent
    verifySignature