PayFanout API reference
    Preparing search index...

    Interface UsePayResult

    interface UsePayResult {
        pay: () => Promise<PayResult>;
        paying: boolean;
    }
    Index
    pay: () => Promise<PayResult>

    Confirms the currently mounted and resolves both completion shapes (§4a) into one PayResult. Never throws — failures come back as { status: "failed", error }. While a confirmation is in flight, calling pay() again returns the SAME in-flight promise: the confirm runs once and every caller resolves to the identical result. Identity is stable across renders — safe to list as an effect dependency.

    paying: boolean

    True while a confirmation is in flight — drive spinners/disabled state.