Braintree Data enables you to collect data about a customer's device and include it when creating a transaction or verification on your server. For more information, refer to the iOS header file for BTData.
- Add the
Braintree/Datasubspec to your Podfile. For example:Ruby
pod 'Braintree', '~> 3.9' pod 'Braintree/Data', '~> 3.9'
In your app, initialize
initWithClient:for your environment, e.g. sandbox:
#import "Braintree.h" #import "BTData.h" // ... // Retain your `BTData` instance for your entire application lifecycle. @property (nonatomic, strong) BTData *data; // ... // Example. You should use your existing Braintree or BTClient object. // If CLIENT_TOKEN_FROM_SERVER is invalid, `braintree.client` and // the subsequent `self.data` object will be nil. Braintree *braintree = [Braintree braintreeWithClientToken:CLIENT_TOKEN_FROM_SERVER]; BTClient *client = braintree.client; self.data = [[BTData alloc] initWithClient:client environment:BTDataEnvironmentSandbox];
- Optionally, set a delegate to receive lifecycle notifications.
- Before submitting a transaction from your server, call
NSString *deviceData = [self.data collectDeviceData]; NSLog(@"Send this device data to your server: %@", deviceData);
- Send the returned string to your server along with transaction data to be included with the request to the Braintree gateway.
Kount, our fraud detection partner, flags multiple orders from the same device if there are multiple card numbers associated with that device. If your customer service reps manually create orders through your normal checkout flow, Kount may identify false positives. This can increase your decline rate.
There are a few ways to prevent false positives when creating multiple orders on the same device:
- Build a separate checkout flow that doesn’t use device data and make it accessible only to customer service reps (e.g. via a VPN). This prevents Kount from linking and flagging transactions based on device data.
- If you are using Kount Standard, have customer service reps create transactions in the Braintree Control Panel instead of creating orders via your website. This ensures that the transactions will be automatically approved by Kount's fraud rules. Kount Custom merchants need to create their own rules to mimic this behavior.
- Skip Advanced Fraud Tools checks completely to avoid sending a transaction to Kount for evaluation.
We offer a direct integration with Kount, our partner for providing advanced fraud detection technology. Like our Kount Standard integration, Kount Custom is also compatible with many payment methods.
To use this feature, you must be processing at least 2500 transactions per month, and you’ll be subject to additional fees from Kount for their services. Learn more about the requirements and considerations.
- Once you've acquired your Kount merchant ID, initialize
setFraudMerchantId:with your own Kount merchant ID.
collectDeviceDataas shown above.
[self.dataCollector setFraudMerchantId:@"YOUR_MERCHANT_ID"]; [self.dataCollector collectDeviceData];
Contact us for more information.