• useLinkController hook.

    Provides initLinkController and presentLinkController methods with a shared loading state. Call initLinkController once when your checkout screen loads, then presentLinkController when the customer taps your Link button.

    Returns {
        loading: boolean;
        initLinkController: (
            params: LinkController.Configuration,
        ) => Promise<InitResult>;
        presentLinkController: () => Promise<PresentResult>;
    }

    • loading: boolean

      Whether an operation is currently in progress.

    • initLinkController: (params: LinkController.Configuration) => Promise<InitResult>

      Initializes the LinkController with the provided configuration. Must be called before presentLinkController.

    • presentLinkController: () => Promise<PresentResult>

      Presents the Link flow. Must be called after initLinkController.

    This API is in private preview and may change without notice.