{"title":"Device fingerprinting","category":"default","creationDate":1776961628,"content":"<p>Device fingerprinting lets you log the attributes of the shopper device and\u00a0analyze them during repeat visits of the same shopper.<\/p>\n<div class=\"notices blue\">\n<p>Using the device fingerprint is optional.<\/p>\n<\/div>\n<p>The only risk rule that can take the device fingerprint into account as one of the variables is the <a href=\"\/pt\/risk-management\/configure-manual-risk\/standard-risk-rules#velocity-rules\">velocity<\/a> rule <strong>Shopper initiated a transaction more than X times within a time period<\/strong>.<\/p>\n<p>If you decide to use the device fingerprint in this risk check, we recommend that you use it in combination with the other variables.<\/p>\n<h2>Integration types<\/h2>\n<p>If you just started integrating with Adyen, or if you are already using one of our <a href=\"\/pt\/online-payments\">online payments<\/a> 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 <strong>Shopper initiated a transaction more than X times within a time period<\/strong>.<\/p>\n<p>Adyen provides the options listed below to submit the device fingerprint for classic integration types.<\/p>\n<ul>\n<li>\n<p>For\u00a0<a href=\"\/pt\/online-payments\/classic-integrations\/classic-api-integration\/client-side-encryption\/hosting-the-cse-library\">HTML-based Client-Side Encryption<\/a>\u00a0and\u00a0<a href=\"\/pt\/online-payments\/classic-integrations\/hosted-payment-pages\">Hosted Payment Pages<\/a>, the device fingerprint is calculated and submitted automatically.<\/p>\n<\/li>\n<li>\n<p>For\u00a0<a href=\"\/pt\/online-payments\/classic-integrations\/classic-api-integration\/client-side-encryption\/hosting-the-cse-library\">JavaScript-only Client-Side Encryption<\/a>\u00a0and\u00a0<a href=\"\/pt\/online-payments\/classic-integrations\/classic-api-integration\">Classic API<\/a>, you need to <a href=\"#get-the-fingerprint\">manually calculate<\/a> and <a href=\"#submit-the-fingerprint-to-adyen\">submit<\/a> the fingerprint.<\/p>\n<\/li>\n<\/ul>\n<h3 id=\"get-the-fingerprint\">Get the fingerprint<\/h3>\n<div class=\"notices yellow\">\n<p>These instructions apply to <a href=\"\/pt\/online-payments\/classic-integrations\/classic-api-integration\/client-side-encryption\/hosting-the-cse-library\">JavaScript-only Client-Side Encryption<\/a>\u00a0and\u00a0<a href=\"\/pt\/online-payments\/classic-integrations\/classic-api-integration\">Classic API<\/a> integrations.<\/p>\n<\/div>\n<p>First, calculate a fingerprint on a client side and submit it to your server, along with other payment details.<\/p>\n<div class=\"notices blue\">\n<p>Calculating the device fingerprint might take some time varying on the shopper's computer speed and Internet connection.\u00a0Run fingerprinting on page load to ensure that the fingerprint is successfully calculated while a shopper fills out payment details.<\/p>\n<\/div>\n<p>To get the device fingerprint:<\/p>\n<ol>\n<li>Add a reference to the <a href=\"https:\/\/live.adyen.com\/hpp\/js\/df.js\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">https:\/\/live.adyen.com\/hpp\/js\/df.js<\/a>\u00a0script to your Checkout page.\u00a0Browsers typically cache JavaScript files, so we recommend specifying the current date (YYYYMMDD) in the URL (for instance,\u00a0<a href=\"https:\/\/live.adyen.com\/hpp\/js\/df.js?v=20171130\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">https:\/\/live.adyen.com\/hpp\/js\/df.js?v=20171130<\/a>). This ensures you benefit from future updates to the calculation of the device fingerprint.<\/li>\n<li>Add a hidden field with any <code>id<\/code>\u00a0to your page.<\/li>\n<li>\n<p>Calculate a fingerprint for the hidden field by calling the <code>dfDo<\/code> function with the field's\u00a0<code>id<\/code>\u00a0as a parameter.<\/p>\n<div class=\"sc-notice info\"><div>\n<p>If you want to calculate the device fingerprint dynamically, for example after the DOM is loaded, use the <code>dfSet<\/code> function instead of <code>dfDo<\/code>.<\/p>\n<\/div><\/div>\n<\/li>\n<\/ol>\n<p>Below is an example form that calculates the device fingerprint using the <code>bar<\/code> hidden field.<\/p>\n<pre><code class=\"language-html\">    &lt;html&gt;\n      &lt;head&gt;\n        &lt;title&gt;Your Website&lt;\/title&gt;\n      &lt;\/head&gt;\n      &lt;body&gt;&lt;p&gt;Your Checkout page.&lt;\/p&gt;\n        &lt;script type=\"text\/javascript\" src=\"https:\/\/live.adyen.com\/hpp\/js\/df.js?v=20171130\"&gt;&lt;\/script&gt;\n        &lt;form action=\"http:\/\/www.yourdomain.com\/checkout\" method=\"POST\"&gt;\n          &lt;!--\n          Your other payment related fields\n          --&gt;\n          &lt;input type=\"hidden\" name=\"foo\" id=\"bar\" \/&gt;\n          &lt;input type=\"submit\" value=\"Submit\" \/&gt;\n        &lt;\/form&gt;\n        &lt;script&gt;\n          \/\/&lt;![CDATA[\n          dfDo(\"bar\");\n          \/\/]]&gt;\n        &lt;\/script&gt;\n      &lt;\/body&gt;\n    &lt;\/html&gt;<\/code><\/pre>\n<h3 id=\"submit-the-fingerprint-to-adyen\">Submit the fingerprint to Adyen<\/h3>\n<div class=\"notices yellow\">\n<p>These instructions apply to <a href=\"\/pt\/online-payments\/classic-integrations\/classic-api-integration\/client-side-encryption\/hosting-the-cse-library\">JavaScript-only Client-Side Encryption<\/a>\u00a0and\u00a0<a href=\"\/pt\/online-payments\/classic-integrations\/classic-api-integration\">Classic API<\/a> integrations.<\/p>\n<\/div>\n<p>After the device fingerprint is calculated and submitted to your server, include this fingerprint into the payment request in the <code>deviceFingerprint<\/code> field value. The\u00a0plataforma de pagamentos da Adyen\u00a0then uses this fingerprint for fraud checks on the payment request.<\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"''\" :id=\"'1342613143'\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"JSON\",\"content\":\"{\\n   \\\"amount\\\":{\\n      \\\"currency\\\":\\\"EUR\\\",\\n      \\\"value\\\":\\\"2000\\\"\\n   },\\n   \\\"card\\\":{\\n      \\\"cvc\\\":\\\"737\\\",\\n      \\\"expiryMonth\\\":\\\"08\\\",\\n      \\\"expiryYear\\\":\\\"2018\\\",\\n      \\\"holderName\\\":\\\"Adyen Test\\\",\\n      \\\"number\\\":\\\"4111111111111111\\\"\\n   },\\n   \\\"merchantAccount\\\":\\\"YourMerchant\\\",\\n   \\\"reference\\\":\\\"Your Reference Here\\\",\\n   \\\"shopperEmail\\\":\\\"s.hopper@example.com\\\",\\n   \\\"shopperIP\\\":\\\"61.294.12.12\\\",\\n   \\\"shopperReference\\\":\\\"YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j\\\",\\n   \\\"deviceFingerprint\\\":\\\"m7Cmrf++0cW4P6XfF7m\\\/rA\\\"\\n}\"},{\"language\":\"xml\",\"tabTitle\":\"Soap\",\"content\":\"&lt;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\\\"&gt;\\n   &lt;soap:Body&gt;\\n      &lt;ns1:authorise xmlns:ns1=\\\"http:\\\/\\\/payment.services.adyen.com\\\"&gt;\\n         &lt;ns1:paymentRequest&gt;\\n            &lt;amount xmlns=\\\"http:\\\/\\\/payment.services.adyen.com\\\"&gt;\\n               &lt;currency xmlns=\\\"http:\\\/\\\/common.services.adyen.com\\\"&gt;EUR&lt;\\\/currency&gt;\\n               &lt;value xmlns=\\\"http:\\\/\\\/common.services.adyen.com\\\"&gt;2000&lt;\\\/value&gt;\\n            &lt;\\\/amount&gt;\\n            &lt;card xmlns=\\\"http:\\\/\\\/payment.services.adyen.com\\\"&gt;\\n               &lt;cvc&gt;737&lt;\\\/cvc&gt;\\n               &lt;expiryMonth&gt;08&lt;\\\/expiryMonth&gt;\\n               &lt;expiryYear&gt;2018&lt;\\\/expiryYear&gt;\\n               &lt;holderName&gt;Adyen Test&lt;\\\/holderName&gt;\\n               &lt;number&gt;4111111111111111&lt;\\\/number&gt;\\n            &lt;\\\/card&gt;\\n            &lt;merchantAccount xmlns=\\\"http:\\\/\\\/payment.services.adyen.com\\\"&gt;YourMerchant&lt;\\\/merchantAccount&gt;\\n            &lt;reference xmlns=\\\"http:\\\/\\\/payment.services.adyen.com\\\"&gt;Your Reference Here&lt;\\\/reference&gt;\\n            &lt;shopperEmail xmlns=\\\"http:\\\/\\\/payment.services.adyen.com\\\"&gt;s.hopper@example.com&lt;\\\/shopperEmail&gt;\\n            &lt;shopperIP xmlns=\\\"http:\\\/\\\/payment.services.adyen.com\\\"&gt;61.294.12.12&lt;\\\/shopperIP&gt;\\n            &lt;shopperReference xmlns=\\\"http:\\\/\\\/payment.services.adyen.com\\\"&gt;YOUR_UNIQUE_SHOPPER_ID_IOfW3k9G2PvXFu2j&lt;\\\/shopperReference&gt;\\n            &lt;deviceFingerprint xmlns=\\\"http:\\\/\\\/payment.services.adyen.com\\\"&gt;m7Cmrf++0cW4P6XfF7m\\\/rA&lt;\\\/deviceFingerprint&gt;\\n         &lt;\\\/ns1:paymentRequest&gt;\\n      &lt;\\\/ns1:authorise&gt;\\n   &lt;\\\/soap:Body&gt;\\n&lt;\\\/soap:Envelope&gt;\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>","url":"https:\/\/docs.adyen.com\/pt\/risk-management\/device-fingerprinting","articleFields":{"id":"25149671","type":"page","_expandable":{"operations":""},"status":"current","last_edit_on":"06-09-2019 14:40","feedback_component":true},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/risk-management\/device-fingerprinting","title":"Device fingerprinting","content":"Device fingerprinting lets you log the attributes of the shopper device and\u00a0analyze them during repeat visits of the same shopper.\n\nUsing the device fingerprint is optional.\n\nThe only risk rule that can take the device fingerprint into account as one of the variables is the velocity rule Shopper initiated a transaction more than X times within a time period.\nIf you decide to use the device fingerprint in this risk check, we recommend that you use it in combination with the other variables.\nIntegration types\nIf you just started integrating with Adyen, or if you are already using one of our 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.\nAdyen provides the options listed below to submit the device fingerprint for classic integration types.\n\n\nFor\u00a0HTML-based Client-Side Encryption\u00a0and\u00a0Hosted Payment Pages, the device fingerprint is calculated and submitted automatically.\n\n\nFor\u00a0JavaScript-only Client-Side Encryption\u00a0and\u00a0Classic API, you need to manually calculate and submit the fingerprint.\n\n\nGet the fingerprint\n\nThese instructions apply to JavaScript-only Client-Side Encryption\u00a0and\u00a0Classic API integrations.\n\nFirst, calculate a fingerprint on a client side and submit it to your server, along with other payment details.\n\nCalculating the device fingerprint might take some time varying on the shopper's computer speed and Internet connection.\u00a0Run fingerprinting on page load to ensure that the fingerprint is successfully calculated while a shopper fills out payment details.\n\nTo get the device fingerprint:\n\nAdd a reference to the https:\/\/live.adyen.com\/hpp\/js\/df.js\u00a0script to your Checkout page.\u00a0Browsers typically cache JavaScript files, so we recommend specifying the current date (YYYYMMDD) in the URL (for instance,\u00a0https:\/\/live.adyen.com\/hpp\/js\/df.js?v=20171130). This ensures you benefit from future updates to the calculation of the device fingerprint.\nAdd a hidden field with any id\u00a0to your page.\n\nCalculate a fingerprint for the hidden field by calling the dfDo function with the field's\u00a0id\u00a0as a parameter.\n\nIf you want to calculate the device fingerprint dynamically, for example after the DOM is loaded, use the dfSet function instead of dfDo.\n\n\n\nBelow is an example form that calculates the device fingerprint using the bar hidden field.\n    &lt;html&gt;\n      &lt;head&gt;\n        &lt;title&gt;Your Website&lt;\/title&gt;\n      &lt;\/head&gt;\n      &lt;body&gt;&lt;p&gt;Your Checkout page.&lt;\/p&gt;\n        &lt;script type=\"text\/javascript\" src=\"https:\/\/live.adyen.com\/hpp\/js\/df.js?v=20171130\"&gt;&lt;\/script&gt;\n        &lt;form action=\"http:\/\/www.yourdomain.com\/checkout\" method=\"POST\"&gt;\n          &lt;!--\n          Your other payment related fields\n          --&gt;\n          &lt;input type=\"hidden\" name=\"foo\" id=\"bar\" \/&gt;\n          &lt;input type=\"submit\" value=\"Submit\" \/&gt;\n        &lt;\/form&gt;\n        &lt;script&gt;\n          \/\/&lt;![CDATA[\n          dfDo(\"bar\");\n          \/\/]]&gt;\n        &lt;\/script&gt;\n      &lt;\/body&gt;\n    &lt;\/html&gt;\nSubmit the fingerprint to Adyen\n\nThese instructions apply to JavaScript-only Client-Side Encryption\u00a0and\u00a0Classic API integrations.\n\nAfter the device fingerprint is calculated and submitted to your server, include this fingerprint into the payment request in the deviceFingerprint field value. The\u00a0plataforma de pagamentos da Adyen\u00a0then uses this fingerprint for fraud checks on the payment request.\n\n    \n","type":"page","locale":"pt","boost":18,"hierarchy":{"lvl0":"Home","lvl1":"Risk management","lvl2":"Device fingerprinting"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/risk-management","lvl2":"\/pt\/risk-management\/device-fingerprinting"},"levels":3,"category":"Risk Management","category_color":"green","tags":["Device","fingerprinting"]},"articleFiles":{"1342613143.json":"<p alt=\"\">1342613143.json<\/p>"}}
