Alloy

Description

Current implementation with Alloy SDK allow to upload documents if the alloy journey is in pending documents state.

Current functionality only works with kyc and kyb journeys and it doesn't perfom the kyc/kyb process, this process stills working with the enrollment and kyc-documents endpoints. It only allows to upload documents.

Features

  • Launch Alloy sdk to upload documents related to specific journey application.

The following env vars are required:

#KYC ALLOY
KYC_ALLOY_API_KEY=your-alloy-api-key
KYC_ALLOY_ENVIRONMENT_IS_PROD=false

Configuration

In order to download the android package needed to run the alloy SDK you will need to create a GitHub personal access token.

Check the steps to create a personal access token here. For the scope select only read:packages

Replace the placeholder values with your credentials in the following file android/gradle.properties

#Github credentials to read packages --> Modify with real values
GITHUB_USERNAME=my-github-username
GITHUB_ACCESS=my-github-access-token

How to use

Import the following where you need to launch the alloy sdk

import {AlloyButton} from 'LinkerStudio/modules/kyc/alloy/components/molecules';
import {useCloseAlloy} from 'LinkerStudio/modules/kyc/alloy/hooks';

To start alloy you need to send the journey information.

<AlloyButton
    journeyToken={requiredDocuments.uploadFromSDK.journeyToken}
    journeyApplicationToken={
      requiredDocuments.uploadFromSDK.journeyApplicationToken
    }
    title={''} //Optional: The button title
    onIntervalEvent={() => fetch()} //Optional: This event is only triggered in Android
 />

The onIntervalEvent is optional and it only works for Android platform. It is triggered directly from the Android module bridge with a especific interval and can be used to fetch the customer current kycStatus from the API.

In the case of iOS you can have your own interval and it continues function even if the alloy sdk is open.

The following hook requires you to send the customer's kyc status. It is checking if the kyc status is not longer asking documents, then it closes the Alloy SDK

useCloseAlloy(kycStatus);

Check the following screen to see an example: LinkerStudio/modules/kyc/alloy/components/templates/examples/InsertAlloySdkValues.tsx

Alloy SDK integration along with a Baas Provider

This will require to also add the common module

Follow the How to Use steps in the kyc/common module

Last updated

Was this helpful?