PayFanout API reference
    Preparing search index...

    Interface WebhookRequest

    Framework-agnostic webhook ingress. The host app supplies the RAW request body string (exactly as received — express.raw / fastify rawBody / await req.text() in Next.js App Router; see the README recipes) plus the headers, and translates the returned status to its framework's response.

    Ack-fast contract: the handler only verifies the signature, parses the event, and hands it to onEvent. onEvent must ENQUEUE and return — respond 2xx immediately and defer heavy processing. Redelivery is limited: Paysafe, for one, counts only a 200 or 202 as received and makes at most three attempts, with no alert when they fail.

    interface WebhookRequest {
        headers: Record<string, string>;
        rawBody: string;
    }
    Index
    headers: Record<string, string>
    rawBody: string