{"title":"Collect data","category":"default","creationDate":1776961628,"content":"<p>When processing payments on the plataforma de pagamentos da Adyen, we send you payment details containing data you can use to identify customers. You can import these identifiers into your own data warehouse to create granular customer profiles and gain insights into your customers.<\/p>\n<h2>Requirements<\/h2>\n<p>To collect customer identifiers, you need to:<\/p>\n<ol>\n<li>Consider <a href=\"\/pt\/unified-commerce\/shopper-insights#data-privacy\">data privacy<\/a>.<\/li>\n<li>Understand the <a href=\"#overview-of-identifiers\">identifiers<\/a> you could use.<\/li>\n<li><a href=\"#receiving-identifiers-in-webhooks\">Set up webhooks<\/a> to receive <strong>standard webhooks<\/strong>. With this, you receive a webhook event for every payment, regardless of the sales channel. The webhook event contains the payment details, including customer identifiers.<\/li>\n<\/ol>\n<h2 id=\"overview-of-identifiers\">Overview of identifiers<\/h2>\n<p>To gain insights and create customer profiles, these are the identifiers you could collect:<\/p>\n<ul>\n<li>\n<p><strong>Card alias<\/strong>: a value that uniquely represents the shopper's card number (PAN), for example <code>A373176724022941<\/code>. With this, you can recognize the card that a shopper is using and identify if they are returning customers. You cannot use the card alias for making payments.<\/p>\n<\/li>\n<li>\n<p><strong>Payment Account Reference<\/strong> (PAR): the PAR is an identifier behind the card or NFC wallet. It represents the payment account that the card and\/or NFC wallet is linked to. It solves the issue with the PAN not being available for NFC wallet transactions. You can use the PAR to identify the shopper.<\/p>\n<\/li>\n<\/ul>\n<div class=\"notices green\">\n<p>Card schemes are starting to adopt the PAR. Currently, we return it for Visa and MasterCard transactions, when available. The PAR can be returned for ecommerce transactions and for Terminal API payment and card acquisition requests.<\/p>\n<\/div>\n<ul>\n<li>\n<p><strong>Shopper reference<\/strong>: a unique reference defined by you and stored on the plataforma de pagamentos da Adyen.  Each shopper reference must have a minimum length of three characters, and should not include personally identifiable information (PII), such as name or email address. With the shopper reference, you can recognize the shopper who makes the purchase. If you collect the shopper's email address, you can link multiple card aliases, shopper references, and stored payment method identifiers (tokens) to the same shopper through their email address. The shopper reference and the tokens are necessary for making <a href=\"\/pt\/get-started-with-adyen\/adyen-glossary\/#recurring-payments-definition\">recurring contract payments<\/a>.<\/p>\n<\/li>\n<li>\n<p><strong>Shopper email<\/strong>: the shopper's email address that you collected in some way, and stored on the plataforma de pagamentos da Adyen when creating a recurring contract.<\/p>\n<\/li>\n<\/ul>\n<p>For analysis purposes, you can also collect:<\/p>\n<ul>\n<li>\n<p><strong>Funding source<\/strong>: funding source of the card, for example debit, credit, or prepaid.<\/p>\n<\/li>\n<li>\n<p><strong>Issuer country<\/strong>: the two-letter country code and the numeric country code of the country where the card was issued. This is a good indicator of the shopper's country\/region of residence.<\/p>\n<\/li>\n<\/ul>\n<h2 id=\"receiving-identifiers-in-webhooks\">Using data from webhooks<\/h2>\n<p>To combine data from multiple sales channels, we recommend using standard webhooks for all channels. Standard webhooks are generated on our platform. They have the same format and are delivered in the same way across channels. This makes it easier to set up your integration for collecting data.<\/p>\n<p>To receive identifiers as <code>additionalData<\/code> included in standard webhooks:<\/p>\n<ol>\n<li>\n<p><a href=\"\/pt\/development-resources\/webhooks\">Set up a standard webhook<\/a>, if you haven't done so already.<\/p>\n<\/li>\n<li>\n<p>In your <a href=\"https:\/\/ca-test.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Customer Area<\/a>, open the <strong>Standard webhook<\/strong> you set up and select the <a href=\"\/pt\/development-resources\/webhooks\/webhook-types\/additional-settings\">additional settings<\/a> you want to receive.<\/p>\n<p>Some of the settings you may want to enable, are:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Identifier<\/th>\n<th style=\"text-align: left;\">Additional setting to select<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\">Card alias<\/td>\n<td style=\"text-align: left;\"><strong>Include Alias Info<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">Funding source<\/td>\n<td style=\"text-align: left;\"><strong>Include Funding Source<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">Issuer country<\/td>\n<td style=\"text-align: left;\"><strong>Include Issuer Country<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">PAR<\/td>\n<td style=\"text-align: left;\"><strong>Add Payment Account Reference<\/strong> <br> <div class=\"sc-notice info\"><div>Must be enabled under <b>Developers<\/b> &gt; <b>Additional data<\/b> too.<\/div><\/div><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">Shopper email, shopper reference<\/td>\n<td style=\"text-align: left;\"><strong>Include Shopper Details<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">Token variant<\/td>\n<td style=\"text-align: left;\"><strong>Include tokenTxVariant<\/strong> <br> <div class=\"sc-notice info\"><div>Must be enabled under <b>Developers<\/b> &gt; <b>Additional data<\/b> too.<\/div><\/div><\/td>\n<td><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<li>\n<p>To receive the PAR, or the token variant in standard webhooks, go to <strong>Developers<\/strong> &gt; <strong>Additional data<\/strong> and enable these identifiers:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Identifier<\/th>\n<th style=\"text-align: left;\">Additional data to select<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\">PAR<\/td>\n<td style=\"text-align: left;\">Under <strong>Acquirer<\/strong>, select <strong>Payment account reference<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">Token variant<\/td>\n<td style=\"text-align: left;\">Under <strong>Card<\/strong>, select <strong>Token information for digital wallets<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"notices yellow\">\n<p>When you enable identifiers under <strong>Developers<\/strong> &gt; <strong>Additional data<\/strong> you also receive these identifiers in your API responses.<\/p>\n<\/div>\n<\/li>\n<\/ol>\n<h3>Example standard webhook<\/h3>\n<p>The following example shows the standard webhook for a point-of-sale payment. The identifiers are in the <code>additionalData<\/code> object.<\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Identifiers in a standard webhook'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"live\\\": \\\"false\\\",\\n    \\\"notificationItems\\\": [\\n        {\\n            \\\"NotificationRequestItem\\\": {\\n                \\\"additionalData\\\": {\\n                    \\\"alias\\\": \\\"M469509594859802\\\",\\n                    \\\"aliasType\\\": \\\"Default\\\",\\n                    \\\"authCode\\\": \\\"00\\\",\\n                    \\\"cardBin\\\": \\\"541333\\\",\\n                    \\\"cardSummary\\\": \\\"9999\\\",\\n                    \\\"expiryDate\\\": \\\"02\\\/2028\\\",\\n                    \\\"fundingSource\\\": \\\"CREDIT\\\",\\n                    \\\"issuerCountry\\\": \\\"GB\\\",\\n                    \\\"recurring.shopperReference\\\": \\\"YOUR_SHOPPER_REFERENCE\\\",\\n                    \\\"shopperEmail\\\": \\\"S.Hopper@example.com\\\",\\n                    \\\"shopperIP\\\": \\\"198.51.100.1\\\",\\n                    \\\"shopperReference\\\": \\\"YOUR_SHOPPER_REFERENCE\\\",\\n                    \\\"store\\\": \\\"YOUR_STORE\\\",\\n                    \\\"tenderReference\\\": \\\"CYHG001647245627000\\\",\\n                    \\\"terminalId\\\": \\\"V400m-346403161\\\"\\n                },\\n                \\\"amount\\\": {\\n                    \\\"currency\\\": \\\"EUR\\\",\\n                    \\\"value\\\": 12098\\n                },\\n                \\\"eventCode\\\": \\\"AUTHORISATION\\\",\\n                \\\"eventDate\\\": \\\"2021-04-14T15:30:14+02:00\\\",\\n                \\\"merchantAccountCode\\\": \\\"YOUR_MERCHANT_ACCOUNT\\\",\\n                \\\"merchantReference\\\": \\\"902\\\",\\n                \\\"operations\\\": [\\n                    \\\"CANCEL\\\",\\n                    \\\"CAPTURE\\\",\\n                    \\\"REFUND\\\"\\n                ],\\n                \\\"paymentMethod\\\": \\\"mc\\\",\\n                \\\"pspReference\\\": \\\"8825408195409505\\\",\\n                \\\"reason\\\": \\\"00:9999:02\\\/2028\\\",\\n                \\\"success\\\": \\\"true\\\"\\n            }\\n        }\\n    ]\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h2>Using data from Terminal API responses<\/h2>\n<p>If you have a point-of-sale integration with our Terminal API, you could use the Terminal API payment responses to collect customer data. The same identifiers that are returned in standard webhooks, are also returned in Terminal API payment responses. However, the format is different.<\/p>\n<p>Refer to <a href=\"\/pt\/point-of-sale\/card-acquisition\/identifiers#receiving-identifiers-in-responses\">Receiving identifiers in Terminal API responses<\/a> for more information and an example.<\/p>\n<h2>See also<\/h2>\n<div class=\"see-also-links output-inline\" id=\"see-also\">\n<ul><li><a href=\"\/unified-commerce\/shopper-insights\"\n                        target=\"_self\"\n                        >\n                    Shopper insights\n                <\/a><\/li><\/ul><\/div>\n","url":"https:\/\/docs.adyen.com\/pt\/unified-commerce\/collect-data","articleFields":{"description":"Collect customer identifiers to run your own analyses.","feedback_component":true,"last_edit_on":"11-08-2021 13:19"},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/unified-commerce\/collect-data","title":"Collect data","content":"When processing payments on the plataforma de pagamentos da Adyen, we send you payment details containing data you can use to identify customers. You can import these identifiers into your own data warehouse to create granular customer profiles and gain insights into your customers.\nRequirements\nTo collect customer identifiers, you need to:\n\nConsider data privacy.\nUnderstand the identifiers you could use.\nSet up webhooks to receive standard webhooks. With this, you receive a webhook event for every payment, regardless of the sales channel. The webhook event contains the payment details, including customer identifiers.\n\nOverview of identifiers\nTo gain insights and create customer profiles, these are the identifiers you could collect:\n\n\nCard alias: a value that uniquely represents the shopper's card number (PAN), for example A373176724022941. With this, you can recognize the card that a shopper is using and identify if they are returning customers. You cannot use the card alias for making payments.\n\n\nPayment Account Reference (PAR): the PAR is an identifier behind the card or NFC wallet. It represents the payment account that the card and\/or NFC wallet is linked to. It solves the issue with the PAN not being available for NFC wallet transactions. You can use the PAR to identify the shopper.\n\n\n\nCard schemes are starting to adopt the PAR. Currently, we return it for Visa and MasterCard transactions, when available. The PAR can be returned for ecommerce transactions and for Terminal API payment and card acquisition requests.\n\n\n\nShopper reference: a unique reference defined by you and stored on the plataforma de pagamentos da Adyen.  Each shopper reference must have a minimum length of three characters, and should not include personally identifiable information (PII), such as name or email address. With the shopper reference, you can recognize the shopper who makes the purchase. If you collect the shopper's email address, you can link multiple card aliases, shopper references, and stored payment method identifiers (tokens) to the same shopper through their email address. The shopper reference and the tokens are necessary for making recurring contract payments.\n\n\nShopper email: the shopper's email address that you collected in some way, and stored on the plataforma de pagamentos da Adyen when creating a recurring contract.\n\n\nFor analysis purposes, you can also collect:\n\n\nFunding source: funding source of the card, for example debit, credit, or prepaid.\n\n\nIssuer country: the two-letter country code and the numeric country code of the country where the card was issued. This is a good indicator of the shopper's country\/region of residence.\n\n\nUsing data from webhooks\nTo combine data from multiple sales channels, we recommend using standard webhooks for all channels. Standard webhooks are generated on our platform. They have the same format and are delivered in the same way across channels. This makes it easier to set up your integration for collecting data.\nTo receive identifiers as additionalData included in standard webhooks:\n\n\nSet up a standard webhook, if you haven't done so already.\n\n\nIn your Customer Area, open the Standard webhook you set up and select the additional settings you want to receive.\nSome of the settings you may want to enable, are:\n\n\n\nIdentifier\nAdditional setting to select\n\n\n\n\nCard alias\nInclude Alias Info\n\n\nFunding source\nInclude Funding Source\n\n\nIssuer country\nInclude Issuer Country\n\n\nPAR\nAdd Payment Account Reference  Must be enabled under Developers &gt; Additional data too.\n\n\nShopper email, shopper reference\nInclude Shopper Details\n\n\nToken variant\nInclude tokenTxVariant  Must be enabled under Developers &gt; Additional data too.\n\n\n\n\n\n\nTo receive the PAR, or the token variant in standard webhooks, go to Developers &gt; Additional data and enable these identifiers:\n\n\n\nIdentifier\nAdditional data to select\n\n\n\n\nPAR\nUnder Acquirer, select Payment account reference\n\n\nToken variant\nUnder Card, select Token information for digital wallets\n\n\n\n\nWhen you enable identifiers under Developers &gt; Additional data you also receive these identifiers in your API responses.\n\n\n\nExample standard webhook\nThe following example shows the standard webhook for a point-of-sale payment. The identifiers are in the additionalData object.\n\n    \n\nUsing data from Terminal API responses\nIf you have a point-of-sale integration with our Terminal API, you could use the Terminal API payment responses to collect customer data. The same identifiers that are returned in standard webhooks, are also returned in Terminal API payment responses. However, the format is different.\nRefer to Receiving identifiers in Terminal API responses for more information and an example.\nSee also\n\n\n                    Shopper insights\n                \n","type":"page","locale":"pt","boost":18,"hierarchy":{"lvl0":"Home","lvl1":"Omnichannel","lvl2":"Collect data"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/unified-commerce","lvl2":"\/pt\/unified-commerce\/collect-data"},"levels":3,"category":"Omnichannel","category_color":"green","tags":["Collect"]}}
