react-native-okhi
    Preparing search index...

    Function createAddress

    • Creates an address without starting verification.

      Parameters

      • Optionalokcollect: OkCollect

        Optional configuration for styling and behavior

      Returns Promise<OkHiSuccessResponse>

      A promise that resolves with the user and location data

      Use this when you want to collect and store an address but defer verification to a later time. The address can be verified later using the returned locationId.

      Prerequisites:

      import * as OkHi from 'react-native-okhi';

      // Create address without verification
      const result = await OkHi.createAddress();
      console.log('Address created:', result.location.id);

      // Save the location ID to verify later
      const locationId = result.location.id;
      await saveToDatabase({ locationId: locationId });
      import * as OkHi from 'react-native-okhi';

      // Later, verify the saved address
      const savedLocationId = await fetchLocationIdFromMyDB();
      const result = await OkHi.startDigitalAddressVerification({
      locationId: savedLocationId,
      });