Premium Fraud Management Tools

Client-Side Implementation

Important

The SSL certificates for all Braintree SDKs are set to expire by June 30, 2025. This will impact existing versions of the SDK in published versions of your app. To reduce the impact, upgrade the iOS SDK to version 6.17.0+Android SDK to version 4.45.0+ or version 5.0.0+ for the new SSL certifications.

If you do not decommission your app versions that include the older SDK versions or force upgrade your app with the updated certificates by the expiration date, 100% of your customer traffic will fail.

Collecting device dataAnchorIcon

BraintreeDataCollector enables you to collect data about a customer's device and correlate it with a session identifier on your server.

Get the SDKAnchorIcon

CocoaPodsAnchorIcon

Include Braintree/DataCollector in your Podfile:

  1. Ruby
# Podfile
pod 'Braintree/DataCollector'

Swift Package ManagerAnchorIcon

Include the BraintreeDataCollector framework.

CarthageAnchorIcon

Include the BraintreeDataCollector and PPRiskMagnes frameworks.

ImplementationAnchorIcon

BraintreeDataCollector collects data about a customer's device and returns a device_data string that contains one or more identifiers that correlate with the collected data. Collecting and passing this data with transactions helps reduce decline rates.

  1. Before making a request to your server, get the device data string by intializing a BTDataCollector instance and calling collectDeviceData.
  1. Swift
let apiClient = BTAPIClient("<TOKENIZATION_KEY_OR_CLIENT_TOKEN>")
let dataCollector = BTDataCollector(apiClient: apiClient)

dataCollector.collectDeviceData { deviceData, error in
    // print("Send this device data to your server: \(deviceData)")
}
  1. Send the device data string to your server along with transaction or verification data (e.g. Transaction.sale calls). Your server will include this device_data parameter when submitting the request to the Braintree gateway.
Note

If you choose to automatically vault a customer's new payment method, verifications for those payment methods will not include device data when they are evaluated by our Premium Fraud Management Tools. Subsequent transactions can still pass device data.

PayPalAnchorIcon

If you're accepting PayPal using the Vault flow, collecting device data via BraintreeDataCollector is required.

See also


    Next Page: Server-side

    If you accept cookies, we’ll use them to improve and customize your experience and enable our partners to show you personalized PayPal ads when you visit other sites. Manage cookies and learn more