> ## Documentation Index
> Fetch the complete documentation index at: https://docs.frankieone.com/llms.txt
> Use this file to discover all available pages before exploring further.

# IDV Only

<Callout icon="star" color="#3DD892" iconType="regular">
  Instead of building your own flow, it's *highly recommended* to fork an existing flow from the public sample codes [found here <Icon icon="arrow-up-right-from-square" size={12} />](https://github.com/FrankieOne/frontend-onesdk-public-sample-codes/)
</Callout>

## Overview of this Example

<CardGroup cols={2}>
  <Card title="Features" icon="list-check">
    * OneSDK eKYC-only flow
    * Country-specific form fields
    * Multi-step verification process
    * Retry handling mechanism
  </Card>

  <Card title="Supported Countries" icon="globe">
    * Philippines (PHL)
    * Australia (AUS)
    * Singapore (SGP)
    * China (CHN)
  </Card>
</CardGroup>

## Implementation Guide

<Steps>
  <Step title="Initialize OneSDK">
    ```javascript theme={null}
    const oneSDKInstance = await OneSdk({
      // Pass session object received from backend for authentication
      session: sessionObjectFromBackend,
      // Set environment mode to production
      mode: "production",
    });
    ```
  </Step>

  <Step title="Set Up Individual Profile">
    ```javascript theme={null}
    const oneSdkIndividual = oneSDKInstance.individual();
    oneSdkIndividual.setProfileType("auto");
    ```
  </Step>

  <Step title="Configure Form Components">
    <AccordionGroup>
      <Accordion title="Creating OneSDK IDV Component">
        ```typescript theme={null}
         // Initialize IDV (Identity Verification) flow
        const idv = oneSdkInstance.flow('idv');
        ```
      </Accordion>

      <Accordion title="Mounting the component and event handling">
        ```typescript theme={null}
        // Listen for loading state changes and update UI accordingly
        idv.on('loading', (l: boolean) => {
          setLoading(l);
        });

        // Handle IDV completion process
        const handleIDVFinished = async () => {
         try {
           // Submit individual verification request
           let res = await oneSdkInstance.individual().submit({ verify: true });
         } catch (e) {
            // handle handle case with your custom logic here
            console.error(e);
         }
        }

        // Listen for IDV results and process completion
        idv.on('results', async () => {
          await handleIDVFinished();
        });

        // Handle any IDV errors by showing failure form
        idv.on('error', (e: any) => {
          // handle handle case with your custom logic here
          console.error(e);
        });

        // Mount IDV form to DOM element with id "form"
        idv.mount("#form");
        ```
      </Accordion>
    </AccordionGroup>
  </Step>
</Steps>
