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 Flutter applications. Please follow footprint_flutter installation instructions here.
Note: Make sure you have
footprint_flutter: ^2.2.2 version 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
dart
- 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.
dart1onboarding.initialize( 2 onboardingSessionToken: "YOUR SESSION TOKEN", 3 redirectUrl: "YOUR REDIRECT URL (example: com.footprint.fluttersdk://example)", 4 context: context, 5 onComplete: (token) { 6 print("onComplete: $token"); 7 }, 8 onCancel: () { 9 print("onCancel: user canceled the flow"); 10 }, 11 onError: (error) { 12 print("onError: $error"); 13 }, 14);
Setting a custom appearance
You can customize the appearance of the onboarding flow by passing an appearance object to the initialize method.
dart1onboarding.initialize( 2 onboardingSessionToken: "YOUR SESSION TOKEN", 3 redirectUrl: "YOUR REDIRECT URL (example: com.footprint.fluttersdk://example)", 4 context: context, 5 onComplete: (token) { 6 print("onComplete: $token"); 7 }, 8 appearance: FootprintAppearance( 9 variables: FootprintAppearanceVariables( 10 borderRadius: "8px", 11 colorSuccess: "#10b981", 12 colorError: "#F87171", 13 buttonPrimaryBg: "#5550e9", 14 ), 15 ), 16);
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. |
redirectUrl | A deep link that will be used to navigate back to your app if the in-app browser was opened during the onboarding process. |
context | Your widget's BuildContext. |
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. |