Collecting device data

It is recommended that all customer-initiated transactions include device data. Device data increases the accuracy of our available Advanced Fraud Management Tools in determining when a transaction is fraudulent.

Integration

In your build.gradle, add the following:

Groovy
dependencies {
  compile 'com.braintreepayments.api:data-collector:3.+'
}

Initialize a BraintreeFragment with a tokenization key or a client token from your server, then call collectDeviceData.

Java
DataCollector.collectDeviceData(braintreeFragment, new BraintreeResponseListener<String>() {
  @Override
  public void onResponse(String deviceData) {
    // send deviceData to your server
  }
});

Using Device Data

Include the device data string in the Transaction: Sale call on your server. If our Advanced Fraud Management Tools detect a high probability that the transaction is fraudulent it will be rejected.

Contact us for more information.