Onboarding (KYC/KYB)
3 min read
Getting started
This guide explains how to integrate the Footprint onboarding flow for KYC (Know Your Customer) and KYB (Know Your Business) into your android applications. You can find the installation instructions in the previous section.
Note: Make sure you have version
1.2.3 or higher installed for the onboarding integration to work properly.Start the onboarding:
- Start the onboarding and get an onboarding token, e.g.,
obtok_UxM6Vbvk2Rcy1gzcSuXgk3sj3L9I0pAnNH, from POST /onboardings.
- Start the onboarding and get an onboarding token, e.g.,
Initialize the Footprint Flow:
- Trigger Footprint, for example, when a button is clicked. Then, pass the
onboardingSessionTokenandonCompletecallback to theinitializemethod.
- Trigger Footprint, for example, when a button is clicked. Then, pass the
kotlin
- Handle Completion:
- Once the user completes the flow, you'll receive the validationToken through the
onCompletecallback. Post this token to your backend for further processing.
- Once the user completes the flow, you'll receive the validationToken through the
Listening to events
Footprint provides several events based on actions performed by the user. To listen to events, pass them from the initialize method.
kotlin1Button( 2 onClick = { 3 Onboarding.initialize( 4 context = context, 5 onboardingSessionToken = "YOUR AUTH TOKEN", 6 onComplete = { validationToken -> 7 println("Onboarding completed successfully. Validation token: $validationToken") 8 }, 9 onCancel = { 10 println("Onboarding was canceled by the user") 11 }, 12 onError = { error -> 13 println("Onboarding error: $error") 14 } 15 ) 16 } 17) { 18 Text("Launch Footprint onboarding flow") 19}
Setting a custom appearance
You can customize the appearance of the onboarding flow by passing an appearance object to the initialize method.
kotlin1Button( 2 onClick = { 3 Onboarding.initialize( 4 context = context, 5 onboardingSessionToken = "YOUR AUTH TOKEN", 6 onComplete = { validationToken -> 7 println("Onboarding completed successfully. Validation token: $validationToken") 8 }, 9 onCancel = { 10 println("Onboarding was canceled by the user") 11 }, 12 onError = { error -> 13 println("Onboarding error: $error") 14 }, 15 appearance = FootprintAppearance( 16 variables = FootprintAppearanceVariables( 17 borderRadius = "8px", 18 buttonPrimaryBg = "#315E4C", 19 colorSuccess = "#315E4C", 20 colorError = "#E33D19" 21 ) 22 ) 23 ) 24 } 25) { 26 Text("Launch Footprint onboarding flow") 27}
For more information, including a list of available variables, check out the customization guide.
Available Props
| Variable | Description |
|---|---|
onboardingSessionToken | The onboarding session token you created. |
context | Your activity context. |
onComplete | Optional. Triggered after the user completes the onboarding flow. You'll receive a validationToken that your backend can exchange with Footprint to see the fp_id, the login method used, and the KYC status. |
onError | Optional. A function that is called when there was an unrecoverable error during the onboarding flow. |
onCancel | Optional. Triggered when the user abandons the flow. |
appearance | Optional. A FootprintAppearance object that customizes the look of your integration. |
l10n | Optional. Specifies the desired localization using a FootprintL10n object. More information here. |