PayFanout API reference
    Preparing search index...

    Interface UsePaymentStatusResult

    interface UsePaymentStatusResult {
        error: UnifiedError | undefined;
        polling: boolean;
        refresh: () => Promise<void>;
        status:
            | "requires_payment_method"
            | "requires_confirmation"
            | "requires_action"
            | "requires_capture"
            | "processing"
            | "succeeded"
            | "canceled"
            | "failed"
            | undefined;
    }
    Index
    error: UnifiedError | undefined

    Last fetch failure — polling continues (transient by default) and the next success clears it.

    polling: boolean

    True while the polling loop is running.

    refresh: () => Promise<void>

    Fetches now, never throws. While polling it also resets the backoff cadence; while paused (enabled: false) it is a one-shot read. A no-op once the status is terminal.

    status:
        | "requires_payment_method"
        | "requires_confirmation"
        | "requires_action"
        | "requires_capture"
        | "processing"
        | "succeeded"
        | "canceled"
        | "failed"
        | undefined

    Latest fetched status; undefined until the first fetch lands.