PayFanout API reference
    Preparing search index...

    Interface UnifiedWebhookEvent

    interface UnifiedWebhookEvent {
        amount?: number;
        currency?: string;
        id: string;
        occurredAt: string;
        pspName: string;
        pspPaymentId?: string;
        raw: unknown;
        refundId?: string;
        type:
            | "unknown"
            | "payment.succeeded"
            | "payment.failed"
            | "payment.requires_action"
            | "payment.processing"
            | "payment.refunded"
            | "payment.refund_failed"
            | "payment.canceled"
            | "payment.chargeback"
            | "payment.chargeback_won"
            | "payment.chargeback_lost";
    }
    Index
    amount?: number

    Money facts, normalized where the PSP payload carries them — a stateless host should not need a retrievePayment round-trip to know how much a payment.refunded event refunded. Integer minor units.

    currency?: string

    ISO 4217, when the payload reports it alongside amount.

    id: string

    Stable dedupe key. The consuming application owns the "have I already processed this event id" store — PayFanout persists nothing.

    occurredAt: string

    ISO 8601. Webhook delivery is unordered on every PSP — treat events as unordered facts.

    pspName: string
    pspPaymentId?: string
    raw: unknown
    refundId?: string

    The PSP refund id, on refund-shaped events.

    type:
        | "unknown"
        | "payment.succeeded"
        | "payment.failed"
        | "payment.requires_action"
        | "payment.processing"
        | "payment.refunded"
        | "payment.refund_failed"
        | "payment.canceled"
        | "payment.chargeback"
        | "payment.chargeback_won"
        | "payment.chargeback_lost"