Premium Fraud Management Tools
Client-Side Implementation
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
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 data
PayPalDataCollector
enables you to collect data about a customer's device and correlate it with a session identifier on your server.
Get the SDK
CocoaPods
Include Braintree/PayPalDataCollector
in your Podfile:
- Ruby
# Podfile
pod 'Braintree/PayPalDataCollector'
Swift Package Manager
Include the PayPalDataCollector
framework.
Carthage
Include the PayPalDataCollector
and PPRiskMagnes
frameworks.
Implementation
PayPalDataCollector 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.
- Before making a request to your server, get the device data string by calling
collectPayPalDeviceData
.
- Swift
let deviceData = PPDataCollector.collectPayPalDeviceData()
print("Send this device data to your server: (deviceData)")
To collect device data as expected in sandbox you must use iOS v5.9.0+. Call collectDeviceData(isSandbox: Bool)
to collect the appropriate device data.
- Swift
// for production pass 'isSandbox' as 'false'
self.dataCollector.collectDeviceData(isSandbox: true) { deviceData in
// Send deviceData to your server
}
- Send the device data string to your server along with transaction or verification data (e.g.
Transaction.sale
calls). Your server will include thisdevice_data
parameter when submitting the request to the Braintree gateway.
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.
PayPal
If you're accepting PayPal using the Vault flow, collecting device data via PayPalDataCollector
is required.