PayFanout API reference
    Preparing search index...

    Interface UsePaymentStatusOptions

    interface UsePaymentStatusOptions {
        enabled?: boolean;
        fetch: () => Promise<
            {
                status: | "requires_payment_method"
                | "requires_confirmation"
                | "requires_action"
                | "requires_capture"
                | "processing"
                | "succeeded"
                | "canceled"
                | "failed";
            },
        >;
        intervalMs?: number;
        maxIntervalMs?: number;
    }
    Index
    enabled?: boolean

    Pass false to pause the loop (default true).

    fetch: () => Promise<
        {
            status: | "requires_payment_method"
            | "requires_confirmation"
            | "requires_action"
            | "requires_capture"
            | "processing"
            | "succeeded"
            | "canceled"
            | "failed";
        },
    >

    Reads the payment's current unified status from YOUR backend, which calls PaymentService.retrievePayment with the pspPaymentId it stores.

    intervalMs?: number

    First polling gap in ms (default 3000).

    maxIntervalMs?: number

    Gap cap in ms (default 15000): gaps double after every poll until they hit it.