Fingerprint Android

1. Add the SDK to your project

Download Android SDK

Then add the SDK to your project.

2. Add the libraries

Add the libraries and dependencies to the project:

  • TMXProfiling-6.0-138.aar
  • MXProfilingConnections-6.0-138.aar

Learn more about building libraries on Android in the Android for Developers documentation.

3. Include permissions

In tManifest, you must include the following permissions:

<uses-permission android:name="android.permission.INTERNET">

</uses-permission>

4. Import the libraries

Import the following libraries:

  • import com.threatmetrix.TrustDefender.TMXConfig
  • import com.threatmetrix.TrustDefender.TMXEndNotifier
  • import com.threatmetrix.TrustDefender.TMXProfiling
  • import com.threatmetrix.TrustDefender.TMXProfilingHandle
  • import com.threatmetrix.TrustDefender.TMXProfilingOptions

5. Parameterize the SDK

You must parameterize the SDK with the following parameters:

TMXConfig config = new TMXConfig()

.setOrgId("OrgId")

In the “OrgId” value, indicate the value corresponding to the environment in Threatmetrix:

  • Sandbox: “1snn5n9w”;
  • Production: “k8vif92e”.

.setFPServer("h.online-metrix.net")

.setContext(getApplicationContext());

.setTimeout(20, TimeUnit.SECONDS)

TMXProfiling.getInstance().init(config);

6. Create the session ID variable

The ProviderMerchantId value must be concatenated with the ProviderIdentifier variable (defined by your e-commerce) to create the session identification (MyVariable).

MyVariable = ProviderMerchantId + ProviderIdentifier

Example:

MyVariable = braspag_XXXX + ProviderIdentifier

In the fraud analysis request, send only the ProviderIdentifier value in the Customer.BrowserFingerprint field. If the ProviderIdentifier generated by your e-commerce is “202201080949”, send the value "202201080949" in the Customer.BrowserFingerprint field.

ℹ️

Important

We recommend that the ProviderIdentifier variable be a GUID.

7. Implement profiling

Implement Profiling with EndNotifier.

TMXProfilingOptions options = new TMXProfilingOptions().setCustomAttributes(null);options.setSessionID(MyVariable)

TMXProfilingHandle profilingHandle = TMXProfiling.getInstance().profile(options,new CompletionNotifier());

class CompletionNotifier implements TMXEndNotifier

{

Override public void complete(TMXProfilingHandle.Result result)

{ // Once Profile is done. Check the status code in the results dictionary, and use the session Id in the API.

}

}

Download Cybersource support material

Previous SDK version

Android SDK version 5.5

Support material: download here