1. Add the SDK to your project

Download the Android SDK

Then, add the SDK to your project.

2. Add the libraries

Add the libraries and dependencies to the project:

TMXProfiling-rl-8.0-82.aar
TMXProfilingConnections-rl-8.0-82.aar

Learn more about creating libraries on Android in the Android for Developers documentation

3. Include the permissions

In the Manifest, 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. Configure the SDK parameters

You must configure the SDK with the following parameters:

TMXConfig config = new TMXConfig()

.setOrgId("OrgId")

For the "OrgId" value, provide the value corresponding to the environment in Threatmetrix:

  • Sandbox: "1snn5n9w";
  • Production: "k8vif92e".
.setContext(getApplicationContext());

.setTimeout(20, TimeUnit.SECONDS)

TMXProfiling.getInstance().init(config);

6. Create the session identification 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 the Cybersource documentation

In the EBC dashboard, click Decision Manager > Documentation > Guide. In Device Fingerprinting Guide, choose the format you'd like to download (PDF or HTML):


Did this page help you?