@bates-solutions/squareup API Reference - v3.2.0
    Preparing search index...

    Interface SquareWebhookRequest

    Request object as seen by the webhook middleware, carrying the Square webhook data it attaches.

    This extends the minimal ExpressRequestLike rather than Express's full Request (see the note above), so it exposes only body, headers, on, plus the fields below. If you type your own downstream middleware against it and need Express's extras (params, query, get(...), …), intersect it with the real Express request: req: SquareWebhookRequest & express.Request.

    interface SquareWebhookRequest {
        body?: unknown;
        headers: Record<string, string | string[] | undefined>;
        rawBody?: string;
        squareEvent?: WebhookEvent<unknown>;
        on(event: string, listener: (...args: unknown[]) => void): unknown;
    }

    Hierarchy (View Summary)

    Index
    body?: unknown

    Parsed or raw request body (Buffer, string, or parsed JSON).

    headers: Record<string, string | string[] | undefined>

    Request headers, keyed lowercase as Node/Express provide them.

    rawBody?: string

    The raw request body as a string

    squareEvent?: WebhookEvent<unknown>

    The parsed Square webhook event