PayFanout API reference
    Preparing search index...

    Interface WebhookHandlerOptions

    interface WebhookHandlerOptions {
        log?: (message: string) => void;
        onEvent: (event: UnifiedWebhookEvent) => void | Promise<void>;
    }
    Index
    log?: (message: string) => void

    Observability hook (which adapter matched, verification failures, ...). Exceptions it throws are swallowed — logging never changes the handler's result.

    onEvent: (event: UnifiedWebhookEvent) => void | Promise<void>

    Receives the normalized event. Must be fast (enqueue, don't process). Dedupe by event.id is the HOST's responsibility — PayFanout stores nothing. A thrown error yields a 500 so the PSP retries delivery.