This guide is a reference manual and configuration guide for the Netswipe Mobile product. It illustrates how to embed the SDK into your app.
Copyright: Jumio Inc. 268 Lambert Avenue, Palo Alto, CA 94306
2 Contents Netswipe Mobile Implementation Guide for Android ............................................................... 1 Contents .................................................................................................................................. 2 Release notes ...................................................................................................................... 3 Contact ................................................................................................................................ 3 Setup ....................................................................................................................................... 4 Integration .............................................................................................................................. 4 Initializing the SDK .............................................................................................................. 5 Configuring the SDK ............................................................................................................ 5 Localizing labels ................................................................................................................... 6 Customizing look and feel ................................................................................................... 6 Displaying the SDK .............................................................................................................. 6 Retrieving information ........................................................................................................ 7 Netswipe Retrieval API ........................................................................................................... 8 Two-factor authentication ...................................................................................................... 9
3 Release notes The current version of the Jumio SDK is 1.2.1. Visit Netswipe Mobile Release Notes to see additions, changes and fixes included in each release. Contact If you have any questions regarding our implementation guide please contact Jumio Customer Service at [email protected] 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.
4 Setup The minimum requirements for the SDK are: Android 4.0 (API level 14) ARMv7 processor with Neon Internet connection, communication via standard SSL port 443
The following permissions are required by the SDK: <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> <uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.CAMERA"/> <uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>
The following permissions are optional: <uses-permission android:name="android.permission.VIBRATE"/> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> <uses-feature android:name="android.hardware.camera" android:required="true"/>
Using the SDK requires an activity declaration in your AndroidManifest.xml. The orientation can be sensor based or locked with the attribute android:screenOrientation.
If you are using Proguard, add the following lines in its configuration.
-keep class com.jumio.** { *; } -keep class jumiomobile.** { *; } Integration Use the SDK in your application by including the JumioMobileSDK and NetswipeResources library projects. Check the Android sample project to learn the most common use.
Note: If you are also using Netverify in your app, make sure to include JumioMobileSDK only once.
Applications implementing the SDK shall not run on rooted devices 1 . Use either the below method or a self-devised check to prevent usage of SDK scanning functionality on rooted devices.
NetswipeSDK.isRooted()
1 In case of doubt, please consult a PCI QSA (Qualified Security Assessor).
5 Use the method isSupportedPlatform to check if the device is supported (camera available, ARMv7 processor with Neon, Android 4.0 or higher).
NetswipeSDK.isSupportedPlatform(this) Initializing the SDK To create an instance of the SDK, perform the following call.
NetswipeSDK sdk = new NetswipeSDK(yourActivity, "YOURAPITOKEN", "YOURAPISECRET", "YOURREPORTINGCRITERIA");
Make sure that your merchant API token and API secret are correct, specify an instance of your activity and provide a reference to identify the scans in your reports (max. 100 characters or null).
Note: Log into https://netswipe.com, and you can find your merchant API token and API secret on the "Settings" page under "API credentials". We strongly recommend you to store credentials outside your app. Configuring the SDK Overwrite your specified reporting criteria to identify each scan attempt in your reports (max. 100 characters).
To restrict supported card types, pass an ArrayList of CreditCardTypes to the setSupportedCreditCardTypes method.
ArrayList<CreditCardType> creditCardTypes = new ArrayList<CreditCardType>(); creditCardTypes.add(CreditCardType.VISA); creditCardTypes.add(CreditCardType.MASTER_CARD); sdk.setSupportedCreditCardTypes(creditCardTypes);
You can enable the recognition of card holder name, sort code and account number. Manual entry, expiry recognition and CVV entry are enabled by default and can be disabled.
Use setName to pass first and last name for name match if card holder recognition is enabled. The user can edit the recognized card holder name if setCardHolderNameEditable is enabled.
To show the unmasked card number during the user journey, disable the following setting.
sdk.setCardNumberMaskingEnabled(false);
You can add fields to "Manual entry" and the confirmation page.
sdk.addCustomField("idZipCode", "Zip code", "94306", InputType.TYPE_CLASS_NUMBER, "YOURREGULAREXPRESSION"); Localizing labels All label texts and button titles can be changed and localized using the standard strings.xml file. Just add the Netswipe strings and adapt them to your required language (see JumioMobileSample/res/values/strings.xml). Customizing look and feel The SDK can be customized to fit your applications look and feel by specifying Theme.Netswipe as a parent style of your own theme, or by editing the NetswipeResources/res/values/styles.xml file. Submit button: title color and background color Action Bar: title color, background and back button image
To change button and background image for "Manual entry", replace the following files.
NetswipeResources/res/drawable-xhdpi/netswipe_info_view_error.png Displaying the SDK To show the SDK, call the respective method below within your activity or fragment.
Note: The default request code is 100. To use another code, override the public static variable NetswipeSDK.REQUEST_CODE before displaying the SDK.
7 Retrieving information Implement the standard method onActivityResult in your activity for successful scans and user cancellation notifications.
You receive a Jumio scan reference for each try, if the Internet connection is available. Offline scans will not be part of the Arraylist scanReferences.
Call clear() after processing the card information to make sure no sensitive data remains in the device's memory.
Parameter Type Max. length Description cardType CreditC ardType VISA, MASTER_CARD, AMERICAN_EXPRESS, DINERS_CLUB, DISCOVER, CHINA_UNIONPAY, or JCB cardNumber char[] 16 Full credit card number cardNumberGrouped char[] 19 Grouped credit card number cardNumberMasked char[] 19 First 6 and last 4 digits of the grouped credit card number, other digits are masked with "X" cardNumberManuallyEntered boolean True if manual entry, otherwise false cardExpiryMonth char[] 2 Month card expires, 2 digits, if enabled and readable cardExpiryYear char[] 2 Year card expires, 2 digits, if enabled and readable cardExpiryDate char[] 5 Date card expires in the format MM/yy, if enabled and readable cardCVV char[] 4 Entered CVV, if enabled cardHolderName char[] 100 Name of the card holder in capital letters, if enabled cardSortCode char[] 8 Sort code in the format xx-xx-xx, if enabled cardAccountNumber char[] 8 Account number, if enabled cardSortCodeValid boolean True if sort code valid, otherwise false cardAccountNumberValid boolean True if account number code valid, otherwise false nameMatch boolean True if successful name match (nameDistance <= 20 % of name length), otherwise false nameDistance int Levenshtein distance for name match, otherwise -1
Method Parameter type Return type Description clear - - Clear card information getCustomField String String Get entered value for added field
Error codes
Code Message Description 300 Your card type is not accepted Retry possible, user decided to cancel 310 Background execution is not supported Cancellation triggered automatically 320 Your card is expired Retry possible, user decided to cancel 210 220 Authentication failed API credentials invalid, retry impossible 240 Scanning not available at this time, please contact the app vendor Resources cannot be loaded, retry impossible 250 Canceled by end-user No error occurred 260 The camera is currently not available Camera cannot be initialized, retry impossible Netswipe Retrieval API You can implement RESTful HTTP GET APIs to retrieve credit card image and data for a specific scan. Find the Implementation Guide at the link below. http://www.jumio.com/implementation-guides/netswipe-retrieval-api/.
9 Two-factor authentication If you want to enable two-factor authentication for your Jumio merchant backend please contact [email protected]. Once enabled, users will be guided through the setup upon their first login to obtain a security code using the "Google Authenticator" app.