Custom Flow EKYC-Flutter
Use Custom Flow in Flutter when your app already has a WebView-based journey and only needs the Custom Flow-specific differences: customStartPageURL and customStatusListener.
What is Custom Flow?
Use Custom Flow in your Flutter app when you already have a WebView-based journey and need to launch EKYC without managing a second WebView.
Custom Flow lets you open our EKYC experience from your own web content inside the same Flutter app. This is useful when part of your app is native or Flutter-based, but part of the user journey already runs inside a WebView.
When to use Custom Flow
Use Custom Flow when:
- You already have your own website and want to bundle it with our EKYC flow in one app experience.
- Your Flutter app already uses a WebView for part of the user journey.
- You want to avoid handling one WebView for your flow and another WebView for our EKYC site.
Except for the custom flow entry point and status callback, the Flutter integration is the same as the standard EKYC Flutter integration. This page covers only the Custom Flow-specific parts.
Custom Flow Integration
Follow the standard EKYC Flutter integration first. After you complete the standard setup, add the Custom Flow-specific configuration described in this page: customStartPageURL and customStatusListener.
customStartPageURL
Set customStartPageURL to the web page that should be shown first when the SDK starts. Use this when your user is already inside your own WebView-based journey and you want EKYC to begin from that page instead of using the default entry point.
When you set customStartPageURL, the SDK loads that URL as the first page instead of opening our default EKYC page. After the user finishes the flow on your custom page, your application must redirect the user to our EKYC URL by itself.
final ekycConfig = EkycConfiguration(
clientName: "portal-v2",
ekycServiceURL: "https://portal-qa.mac-non-prod.appmanteam.com/api/v2/kyc",
tenantServiceURL:
"https://portal-qa.mac-non-prod.appmanteam.com/api/v1/tenant-config",
ekycSiteURL:
"https://portal-v2-qa.mac-non-prod.appmanteam.com/apps/identity-verification",
verificationId: "", // Send empty if using customStartPageURL
customStartPageURL: "https://{{your-domain}}/{{your-start-page}}",
);When you use Custom Flow in Flutter, you can pass an empty value for verificationId.
customStatusListener
customStatusListener lets your app receive status values from the Custom Flow and decide how to continue in the Flutter layer.
final customStatusListener = CustomStatusListener(
onCustomStatus: (status) {
debugLog("onCustomStatus $status");
},
);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
leading: IconButton(
icon: const Icon(Icons.arrow_back, color: Colors.white),
onPressed: () => Navigator.of(context).pop(),
),
title: const Text('Ekyc on Detail Page'),
),
body: EkycWidgetView(
ekycConfiguration: ekycConfig,
ekycListener: ekycListener,
customStatusListener: customStatusListener,
),
);
}Use this callback when you want to:
- detect which step or route the Custom Flow is returning
- navigate the user to another screen
- keep your app state in sync with the WebView-based journey
Updated 8 days ago
