PayFanout API reference
    Preparing search index...

    Interface UseSavedPaymentMethodsOptions

    interface UseSavedPaymentMethodsOptions {
        auto?: boolean;
        fetch: () => Promise<SavedPaymentMethod[]>;
        remove?: (token: string) => Promise<void>;
    }
    Index
    auto?: boolean

    Fetch on mount (default true). Pass false to fetch only via refresh().

    fetch: () => Promise<SavedPaymentMethod[]>

    Loads the customer's saved methods from YOUR backend, which calls PaymentService.listSavedPaymentMethods with the pspCustomerId it stores.

    remove?: (token: string) => Promise<void>

    Deletes one saved method (by SavedPaymentMethod.token) via YOUR backend, which calls PaymentService.deleteSavedPaymentMethod. Omit if the UI never removes cards; remove() then fails with invalid_request.