@pwngh/economy-lab
    Preparing search index...

    Type Alias WebhookHandler

    WebhookHandler: (provider: string, request: Request) => Promise<Response>

    Host handler for inbound provider callbacks (webhooks), e.g. a payment processor reporting a settlement or dispute. Takes the URL's provider name and the request, returns the HTTP response.

    The server verifies signature and freshness before the handler runs, so the bytes are trusted. request is a fresh Request over the same raw body, re-readable without double-consuming.

    Type Declaration

      • (provider: string, request: Request): Promise<Response>
      • Parameters

        • provider: string
        • request: Request

        Returns Promise<Response>