--- title: "Device fingerprinting" url: "https://docs.adyen.com/risk-management/device-fingerprinting" source_url: "https://docs.adyen.com/risk-management/device-fingerprinting.md" canonical: "https://docs.adyen.com/risk-management/device-fingerprinting" last_modified: "2019-09-06T14:40:00+02:00" language: "en" --- # Device fingerprinting [View source](/risk-management/device-fingerprinting.md) Device fingerprinting lets you log the attributes of the shopper device and analyze them during repeat visits of the same shopper. Using the device fingerprint is optional. The only risk rule that can take the device fingerprint into account as one of the variables is the [velocity](/risk-management/configure-manual-risk/standard-risk-rules#velocity-rules) rule **Shopper initiated a transaction more than X times within a time period**. If you decide to use the device fingerprint in this risk check, we recommend that you use it in combination with the other variables. ## Integration types If you just started integrating with Adyen, or if you are already using one of our [online payments](/online-payments) integrations, we recommend that you use one or more of the other variables (shopper email address, shopper IP or persistent cookie) for the risk check **Shopper initiated a transaction more than X times within a time period**. Adyen provides the options listed below to submit the device fingerprint for classic integration types. * For [HTML-based Client-Side Encryption](/online-payments/classic-integrations/classic-api-integration/client-side-encryption/hosting-the-cse-library) and [Hosted Payment Pages](/online-payments/classic-integrations/hosted-payment-pages), the device fingerprint is calculated and submitted automatically. * For [JavaScript-only Client-Side Encryption](/online-payments/classic-integrations/classic-api-integration/client-side-encryption/hosting-the-cse-library) and [Classic API](/online-payments/classic-integrations/classic-api-integration), you need to [manually calculate](#get-the-fingerprint) and [submit](#submit-the-fingerprint-to-adyen) the fingerprint. ### Get the fingerprint These instructions apply to [JavaScript-only Client-Side Encryption](/online-payments/classic-integrations/classic-api-integration/client-side-encryption/hosting-the-cse-library) and [Classic API](/online-payments/classic-integrations/classic-api-integration) integrations. First, calculate a fingerprint on a client side and submit it to your server, along with other payment details. Calculating the device fingerprint might take some time varying on the shopper's computer speed and Internet connection. Run fingerprinting on page load to ensure that the fingerprint is successfully calculated while a shopper fills out payment details. To get the device fingerprint: 1. Add a reference to the  script to your Checkout page. Browsers typically cache JavaScript files, so we recommend specifying the current date (YYYYMMDD) in the URL (for instance, ). 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. If you want to calculate the device fingerprint dynamically, for example after the DOM is loaded, use the `dfSet` function instead of `dfDo`. Below is an example form that calculates the device fingerprint using the `bar` hidden field. ```html Your Website

Your Checkout page.

``` ### Submit the fingerprint to Adyen These instructions apply to [JavaScript-only Client-Side Encryption](/online-payments/classic-integrations/classic-api-integration/client-side-encryption/hosting-the-cse-library) and [Classic API](/online-payments/classic-integrations/classic-api-integration) integrations. 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. #### JSON ```json { "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@example.com", "shopperIP":"61.294.12.12", "shopperReference":"YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j", "deviceFingerprint":"m7Cmrf++0cW4P6XfF7m/rA" } ``` #### Soap ```xml EUR 2000 737 08 2018 Adyen Test 4111111111111111 YourMerchant Your Reference Here s.hopper@example.com 61.294.12.12 YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j m7Cmrf++0cW4P6XfF7m/rA ```