Device fingerprinting

Device Fingerprinting allows you to log unique attributes of the shopper device and analyze them during repeat visits of the same shopper. This helps the ShopperDNA system identify the same machine across multiple sessions (despite the user changing login identities, using proxies, clearing cache and cookies, and attempting other obfuscation techniques) and detect fraudulent behavior easily on a payment page.

Adyen provides you with the following options depending on the integration type you use:

Get the fingerprint

First, calculate a fingerprint on a client side and submit it to your server, along with other payment details. Note that calculating the device fingerprint might take some time varying on the shopper's computer speed and Internet connection. We recommend that you call the fingerprinting code on the page load to make sure that the fingerprint has been successfully calculated while a shopper fills out payment details.

To get the device fingerprint:

  1. Add a reference to the https://live.adyen.com/hpp/js/df.js script to your Checkout page. Browsers typically cache JavaScript files, so we recommend specifying the current date (YYYYMMDD) in the URL (for instance, https://live.adyen.com/hpp/js/df.js?v=20171130). This ensures you benefit from future updates to the calculation of the device fingerprint.
  2. Add a hidden field with any id to your page.
  3. Calculate a fingerprint for the hidden field by calling the dfDo function with the field's id as a parameter.

The JavaScript file that calculates the device fingerprint has been minified to reduce loading time.

Below is an example form that calculates the device fingerprint using the bar hidden field.

<html>
  <head>
    <title>Your Website</title>
  </head>
  <body>
<p>Your Checkout page.</p> 
    <script type="text/javascript" src="https://live.adyen.com/hpp/js/df.js?v=20171130"></script>
    <form action="http://www.yourdomain.com/checkout" method="POST">
      <!--
      Your other payment related fields
      -->
      <input type="hidden" name="foo" id="bar" />
      <input type="submit" value="Submit" />
    </form> 
    <script> 
      //<![CDATA[ 
      dfDo("bar");
      //]]> 
    </script>
  </body>
</html>

Submit the fingerprint to Adyen

After the device fingerprint is calculated and submitted to your server, include this fingerprint into the payment request in the deviceFingerprint field value. The Adyen payments platform then uses this fingerprint for fraud checks on the payment request.

{
   "amount":{
      "currency":"EUR",
      "value":"2000"
   },
   "card":{
      "cvc":"737",
      "expiryMonth":"08",
      "expiryYear":"2018",
      "holderName":"Adyen Test",
      "number":"4111111111111111"
   },
   "merchantAccount":"YourMerchant",
   "reference":"Your Reference Here",
   "shopperEmail":"s.hopper@test.com",
   "shopperIP":"61.294.12.12",
   "shopperReference":"Simon Hopper",
   "deviceFingerprint":"m7Cmrf++0cW4P6XfF7m/rA"
}
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soap:Body>
      <ns1:authorise xmlns:ns1="http://payment.services.adyen.com">
         <ns1:paymentRequest>
            <amount xmlns="http://payment.services.adyen.com">
               <currency xmlns="http://common.services.adyen.com">EUR</currency>
               <value xmlns="http://common.services.adyen.com">2000</value>
            </amount>
            <card xmlns="http://payment.services.adyen.com">
               <cvc>737</cvc>
               <expiryMonth>08</expiryMonth>
               <expiryYear>2018</expiryYear>
               <holderName>Adyen Test</holderName>
               <number>4111111111111111</number>
            </card>
            <merchantAccount xmlns="http://payment.services.adyen.com">YourMerchant</merchantAccount>
            <reference xmlns="http://payment.services.adyen.com">Your Reference Here</reference>
            <shopperEmail xmlns="http://payment.services.adyen.com">s.hopper@test.com</shopperEmail>
            <shopperIP xmlns="http://payment.services.adyen.com">61.294.12.12</shopperIP>
            <shopperReference xmlns="http://payment.services.adyen.com">Simon Hopper</shopperReference>
            <deviceFingerprint xmlns="http://payment.services.adyen.com">m7Cmrf++0cW4P6XfF7m/rA</deviceFingerprint>
         </ns1:paymentRequest>
      </ns1:authorise>
   </soap:Body>
</soap:Envelope>