Plugin for Flutter

Official Jumio Mobile SDK plugin for Flutter

Compatibility

Compatibility has been tested with a Flutter version of 1.17 and Dart 2.8

Setup

Create Flutter project and add the Jumio Mobile SDK module to it.

flutter create MyProject

Add the Jumio Mobile SDK as a dependency to your pubspec.yaml file:

dependencies:
  flutter:
    sdk: flutter

  jumio_mobile_sdk_flutter: ^3.7.1

And install the dependency:

cd MyProject
flutter pub get

Integration

iOS

  1. Add the "NSCameraUsageDescription"-key to your Info.plist file.
  2. Your app's deployment target must be at least iOS 10.0

Android

  1. Open your AndroidManifest.xml file and change allowBackup to false.
<application
...
android:allowBackup="false">
...
</application>
  1. Make sure your compileSdkVersion, minSdkVersion and buildToolsVersion are high enough.
android {
  minSdkVersion 19
  compileSdkVersion 29
  buildToolsVersion "29.0.3"
  ...
}
  1. Enable MultiDex Follow the Android developers guide: https://developer.android.com/studio/build/multidex.html
android {
  ...
  defaultConfig {
    ...
    multiDexEnabled true
  }
}
  1. Upgrade Gradle build tools The plugin requires at least version 4.0.0 of the android build tools. This transitively requires and upgrade of the Gradle wrapper to version 6. Without this change the Gradle build will fail with a Jetifier error about bcprov.

Upgrade build tools version to 4.0.1 in android/build.gradle:

buildscript {
  ...
  dependencies {
    ...
    classpath 'com.android.tools.build:gradle:4.0.1'
  }
}

Modify the Gradle Wrapper version in android/gradle.properties.

Usage

  1. Import "jumiomobilesdk.dart"
import 'package:jumio_mobile_sdk_flutter/jumio_mobile_sdk_flutter.dart';
  1. The SDKs can be initialized with the following calls
JumioMobileSDK.initNetverify(<API_TOKEN>, <API_SECRET>, <DATACENTER>, {configuration});
JumioMobileSDK.initAuthentication(<API_TOKEN>, <API_SECRET>, <DATACENTER>, {configuration});
JumioMobileSDK.initDocumentVerification(<API_TOKEN>, <API_SECRET>, <DATACENTER>, {configuration});
JumioMobileSDK.initBAM(<API_TOKEN>, <API_SECRET>, <DATACENTER>, {configuration});

Datacenter can either be us, eu or sg.

Usage

Netverify / Fastfill

To initialize the SDK, perform the following call.

JumioMobileSDK.initNetverify(<API_TOKEN>, <API_SECRET>, <DATACENTER>, {configuration});

Datacenter can either be US or EU.

Configure the SDK with the configuration-Object.

ConfigurationDatatypeDescription
enableVerificationBooleanEnable ID verification
callbackUrlStringSpecify an URL for individual transactions
enableIdentityVerificationBooleanEnable face match during the ID verification for a specific transaction
preselectedCountryBooleanSpecify the issuing country (ISO 3166-1 alpha-3 country code)
customerInternalReferenceStringAllows you to identify the scan (max. 100 characters)
reportingCriteriaStringUse this option to identify the scan in your reports (max. 100 characters)
userReferenceStringSet a customer identifier (max. 100 characters)
sendDebugInfoToJumioBooleanSend debug information to Jumio.
dataExtractionOnMobileOnlyBooleanLimit data extraction to be done on device only
cameraPositionStringWhich camera is used by default. Can be FRONT or BACK.
preselectedDocumentVariantStringWhich types of document variants are available. Can be PAPER or PLASTIC
documentTypesString-ArrayAn array of accepted document types: Available document types: PASSPORT, DRIVER_LICENSE, IDENTITY_CARD, VISA
enableWatchlistScreeningStringEnables Jumio Screening. Can be ENABLED, DISABLED or DEFAULT (when not specified reverts to DEFAULT)
watchlistSearchProfileStringSpecifies specific profile of watchlist

Initialization example with configuration.

JumioMobileSDK.initNetverify("API_TOKEN", "API_SECRET", "US", {
  "enableVerification": true,
  "enableIdentityVerification": true,
  "userReference": "CUSTOMERID",
  "preselectedCountry": "USA",
  "cameraPosition": "BACK",
  "documentTypes": ["DRIVER_LICENSE", "PASSPORT", "IDENTITY_CARD", "VISA"],
  "enableWatchlistScreening": "ENABLED",
  "watchlistSearchProfile": "YOURPROFILENAME"
});

Android eMRTD scanning

If you are using eMRTD scanning, following lines are needed in your proguard-rules.pro file:

-keep class net.sf.scuba.smartcards.IsoDepCardService {*;}
-keep class org.jmrtd.** { *; }
-keep class net.sf.scuba.** {*;}
-keep class org.bouncycastle.** {*;}
-keep class org.ejbca.** {*;}

-dontwarn java.nio.**
-dontwarn org.codehaus.**
-dontwarn org.ejbca.**
-dontwarn org.bouncycastle.**

Add the needed dependencies following this chapter of the android integration guide.

Enable eMRTD by using the following method in your native android code:

netverifySDK.setEnableEMRTD(true);

As soon as the sdk is initialized, the sdk is started by the following call.

JumioMobileSDK.startNetverify();

Authentication

To initialize and start the SDK, perform the following call.

JumioMobileSDK.initAuthentication(<API_TOKEN>, <API_SECRET>, <DATACENTER>, {configuration});

Datacenter can either be US or EU.

Configure the SDK with the configuration-Object. (configuration marked with * are mandatory)

In order to connect the Authentication transaction to a specific Netverify user identity the parameter enrollmentTransactionReference must be set. In case an Authentication transaction has been created via the facemap server to server API authenticationTransactionReference should be used. Therefore enrollmentTransactionReference should not be set.

ConfigurationDatatypeDescription
enrollmentTransactionReference*StringThe reference of the enrollment scan to authenticate for
authenticationTransactionReference*StringThe reference of the authentication scan to authenticate for
userReference*StringSet a customer identifier (max. 100 characters)

Initialization example with configuration:

await JumioMobileSDK.initAuthentication(API_TOKEN, API_SECRET, DATACENTER, {
  "enrollmentTransactionReference": "EnrollmentTransactionReference",
  //"userReference": "UserReference",
  //"callbackUrl": "URL",
  //"authenticationTransactionReference": "AuthenticationTransactionReference",
});

As soon as the sdk is initialized, the sdk is started by the following call.

bool result = await JumioMobileSDK.startAuthentication();

Document Verification

To initialize the SDK, perform the following call.

JumioMobileSDK.initDocumentVerification(<API_TOKEN>, <API_SECRET>, <DATACENTER>, {configuration});

Datacenter can either be US or EU.

Configure the SDK with the configuration-Object. (configuration marked with * are mandatory)

ConfigurationDatatypeDescription
type*StringSee the list below
userReference*StringSet a customer identifier (max. 100 characters)
country*StringSet the country (ISO-3166-1 alpha-3 code)
customerInternalReference*StringAllows you to identify the scan (max. 100 characters)
reportingCriteriaStringUse this option to identify the scan in your reports (max. 100 characters)
callbackUrlStringSpecify an URL for individual transactions
documentNameStringOverride the document label on the help screen
customDocumentCodeStringSet your custom document code (set in the merchant backend under "Settings" - "Multi Documents" - "Custom"
cameraPositionStringWhich camera is used by default. Can be FRONT or BACK.

Possible types:

  • BS (Bank statement)
  • IC (Insurance card)
  • UB (Utility bill, front side)
  • CAAP (Cash advance application)
  • CRC (Corporate resolution certificate)
  • CCS (Credit card statement)
  • LAG (Lease agreement)
  • LOAP (Loan application)
  • MOAP (Mortgage application)
  • TR (Tax return)
  • VT (Vehicle title)
  • VC (Voided check)
  • STUC (Student card)
  • HCC (Health care card)
  • CB (Council bill)
  • SENC (Seniors card)
  • MEDC (Medicare card)
  • BC (Birth certificate)
  • WWCC (Working with children check)
  • SS (Superannuation statement)
  • TAC (Trade association card)
  • SEL (School enrolment letter)
  • PB (Phone bill)
  • USSS (US social security card)
  • SSC (Social security card)
  • CUSTOM (Custom document type)

Initialization example with configuration.

await JumioMobileSDK.initDocumentVerification(API_TOKEN, API_SECRET, DATACENTER, {
  "type": "BS",
  "userReference": "123456789",
  "country": "USA",
  "customerInternalReference": "123456789",
  //"reportingCriteria": "Criteria",
  //"callbackUrl": "URL",
  //"documentName": "Name",
  //"customDocumentCode": "Custom",
  //"cameraPosition": "back",
  //"enableExtraction": true
});

As soon as the sdk is initialized, the sdk is started by the following call.

final String result = await JumioMobileSDK.startDocumentVerification();

BAM Checkout

To Initialize the SDK, perform the following call.

JumioMobileSDK.initBAM(<API_TOKEN>, <API_SECRET>, <DATACENTER>, {configuration});

Datacenter can either be US or EU.

Configure the SDK with the configuration-Object.

ConfigurationDatatypeDescription
cardHolderNameRequiredBoolean
sortCodeAndAccountNumberRequiredBoolean
expiryRequiredBoolean
cvvRequiredBoolean
expiryEditableBoolean
cardHolderNameEditableBoolean
reportingCriteriaStringOverwrite your specified reporting criteria to identify each scan attempt in your reports (max. 100 characters)
vibrationEffectEnabledBoolean
enableFlashOnScanStartBoolean
cardNumberMaskingEnabledBoolean
offlineTokenStringIn your Jumio merchant backend on the "Settings" page under "API credentials" you can find your Offline token. In case you use your offline token, you must not set the API token and secret
cameraPositionStringWhich camera is used by default. Can be FRONT or BACK.
cardTypesString-ArrayAn array of accepted card types. Available card types: VISA, MASTER_CARD, AMERICAN_EXPRESS, CHINA_UNIONPAY, DINERS_CLUB, DISCOVER, JCB

Initialization example with configuration.

await JumioMobileSDK.initBAM(API_TOKEN, API_SECRET, DATACENTER, {
  "cardHolderNameRequired": false,
  "cvvRequired": true,
  "cameraPosition": "BACK",
  "cardTypes": ["VISA", "MASTER_CARD"]
});

As soon as the sdk is initialized, the sdk is started by the following call.

bool result = await JumioMobileSDK.startBAM();

Android Netverify eMRTD

Use enableEMRTD to read the NFC chip of an eMRTD.

await JumioMobileSDK.enableEMRTD();

Retrieving information

Scan results are returned from the startXXX() methods asynchronously. Await the returned values to get the results. Exceptions are thrown issuees such as invalid credentials, missing API keys, permissions errors and such.

Customization

Android

Netverify

The Netverify SDK can be customized to the respective needs by following this customization chapter.

Authentication

The Authentication SDK can be customized to the respective needs by following this customization chapter.

BAM Checkout

The BAM Checkout SDK can be customized to the respective needs by following this customization chapter.

Document Verification

The Document Verification SDK can be customized to the respective needs by following this customization chapter.

iOS

The SDK can be customized to the respective needs by using the following initializers instead.

JumioMobileSDKNetverify.initNetverify(<API_TOKEN>, <API_SECRET>, <DATACENTER>, {configuration}, {customization});
JumioMobileSDKDocumentVerification.initDocumentVerification(<API_TOKEN>, <API_SECRET>, <DATACENTER>, {configuration}, {customization});
JumioMobileSDKBamCheckout.initBAM(<API_TOKEN>, <API_SECRET>, <DATACENTER>, {configuration}, {customization});
JumioMobileSDKAuthentication.initAuthentication(<API_TOKEN>, <API_SECRET>, <DATACENTER>, {configuration}, {customization});

You can pass the following customization options to the initializer:

Customization keyTypeDescription
disableBlurBOOLDeactivate the blur effect
backgroundColorSTRINGChange base view's background color
foregroundColorSTRINGChange base view's foreground color
tintColorSTRINGChange the tint color of the navigation bar
barTintColorSTRINGChange the bar tint color of the navigation bar
textTitleColorSTRINGChange the text title color of the navigation bar
documentSelectionHeaderBackgroundColorSTRINGChange the background color of the document selection header
documentSelectionHeaderTitleColorSTRINGChange the title color of the document selection header
documentSelectionHeaderIconColorSTRINGChange the icon color of the document selection header
documentSelectionButtonBackgroundColorSTRINGChange the background color of the document selection button
documentSelectionButtonTitleColorSTRINGChange the title color of the document selection button
documentSelectionButtonIconColorSTRINGChange the icon color of the document selection button
fallbackButtonBackgroundColorSTRINGChange the background color of the fallback button
fallbackButtonBorderColorSTRINGChange the border color of the fallback button
fallbackButtonTitleColorSTRINGChange the title color of the fallback button
positiveButtonBackgroundColorSTRINGChange the background color of the positive button
positiveButtonBorderColorSTRINGChange the border color of the positive button
positiveButtonTitleColorSTRINGChange the title color of the positive button
negativeButtonBackgroundColorSTRINGChange the background color of the negative button
negativeButtonBorderColorSTRINGChange the border color of the negative button
negativeButtonTitleColorSTRINGChange the title color of the negative button
scanOverlayStandardColor (NV only)STRINGChange the standard color of the scan overlay
scanOverlayValidColor (NV only)STRINGChange the valid color of the scan overlay
scanOverlayInvalidColor (NV only)STRINGChange the invalid color of the scan overlay
scanOverlayTextColor (BAM only)STRINGChange the text color of the scan overlay
scanOverlayBorderColor (BAM only)STRINGChange the border color of the scan overlay

All colors are provided with a HEX string with the following format: #ff00ff.

Customization example

JumioMobileSDK.initNetverify("API_TOKEN", "API_SECRET", "US", {
  "enableVerification": false,
  ...
}, {
  "disableBlur": true,
  "backgroundColor": "#ff00ff",
  "barTintColor": "#ff1298"
);

Result objects

To get information about result fields, Netverify Retrieval API, Netverify Delete API and Global Netverify settings and more, please read our page with server related information.

The Map with all the extracted data that is returned for the specific products is described in the following subchapters:

Netverify & Fastfill

NetverifyDocumentData:

ParameterTypeMax. lengthDescription
selectedCountryString3ISO 3166-1 alpha-3 country code as provided or selected
selectedDocumentTypeString16PASSPORT, DRIVER_LICENSE, IDENTITY_CARD or VISA
idNumberString100Identification number of the document
personalNumberString14Personal number of the document
issuingDateDateDate of issue
expiryDateDateDate of expiry
issuingCountryString3Country of issue as (ISO 3166-1 alpha-3) country code
lastNameString100Last name of the customer
firstNameString100First name of the customer
dobDateDate of birth
genderString1m, f or x
originatingCountryString3Country of origin as (ISO 3166-1 alpha-3) country code
addressLineString64Street name
cityString64City
subdivisionString3Last three characters of ISO 3166-2:US state code
postCodeString15Postal code
mrzDataMRZ-DATAMRZ data, see table below
optionalData1String50Optional field of MRZ line 1
optionalData2String50Optional field of MRZ line 2
placeOfBirthString255Place of Birth
extractionMethodString12MRZ, OCR, BARCODE, BARCODE_OCR or NONE

MRZ-Data

ParameterTypeMax. lengthDescription
formatString8MRP, TD1, TD2, CNIS, MRVA, MRVB or UNKNOWN
line1String50MRZ line 1
line2String50MRZ line 2
line3String50MRZ line 3
idNumberValidBOOLTrue if ID number check digit is valid, otherwise false
dobValidBOOLTrue if date of birth check digit is valid, otherwise false
expiryDateValidBOOLTrue if date of expiry check digit is valid or not available, otherwise false
personalNumberValidBOOLTrue if personal number check digit is valid or not available, otherwise false
compositeValidBOOLTrue if composite check digit is valid, otherwise false

Authentication

AuthenticationResult:

ParameterTypeMax. lengthDescription
authenticationResultString8SUCCESS or FAILED

BAM Checkout

BAMCardInformation:

ParameterTypeMax. lengthDescription
cardTypeString16VISA, MASTER_CARD, AMERICAN_EXPRESS, CHINA_UNIONPAY, DINERS_CLUB, DISCOVER, JCB or STARBUCKS
cardNumberString16Full credit card number
cardNumberGroupedString19Grouped credit card number
cardNumberMaskedString19First 6 and last 4 digits of the grouped credit card number, other digits are masked with "X"
cardExpiryMonthString2Month card expires if enabled and readable
CardExpiryYearString2Year card expires if enabled and readable
cardExpiryDateString5Date card expires in the format MM/yy if enabled and readable
cardCVVString4Entered CVV if enabled
cardHolderNameString100Name of the card holder in capital letters if enabled and readable, or as entered if editable
cardSortCodeString8Sort code in the format xx-xx-xx or xxxxxx if enabled, available and readable
cardAccountNumberString8Account number if enabled, available and readable
cardSortCodeValidBOOLTrue if sort code valid, otherwise false
cardAccountNumberValidBOOLTrue if account number code valid, otherwise false

Document Verification

No data returned.

Support

Contact

If you have any questions regarding our implementation guide please contact Jumio Customer Service at support@jumio.com or https://support.jumio.com. The Jumio online helpdesk contains a wealth of information regarding our service including demo videos, product descriptions, FAQs and other things that may help to get you started with Jumio. Check it out at: https://support.jumio.com.

Licenses

The software contains third-party open source software. For more information, please see Android licenses and iOS licenses

This software is based in part on the work of the Independent JPEG Group.

© Jumio Corp. 268 Lambert Avenue, Palo Alto, CA 94306

The source code and software available on this website (“Software”) is provided by Jumio Corp. or its affiliated group companies (“Jumio”) "as is” and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall Jumio be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including but not limited to procurement of substitute goods or services, loss of use, data, profits, or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this Software, even if advised of the possibility of such damage. In any case, your use of this Software is subject to the terms and conditions that apply to your contractual relationship with Jumio. As regards Jumio’s privacy practices, please see our privacy notice available here: Privacy Policy.

Libraries

jumio_mobile_sdk_flutter