---
title: "Collect data"
description: "Collect customer identifiers to run your own analyses."
url: "https://docs.adyen.com/unified-commerce/collect-data"
source_url: "https://docs.adyen.com/unified-commerce/collect-data.md"
canonical: "https://docs.adyen.com/unified-commerce/collect-data"
last_modified: "2021-08-11T13:19:00+02:00"
language: "en"
---

# Collect data

Collect customer identifiers to run your own analyses.

[View source](/unified-commerce/collect-data.md)

When processing payments on the Adyen payments platform, 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.

## Requirements

To collect customer identifiers, you need to:

1. Consider [data privacy](/unified-commerce/shopper-insights#data-privacy).
2. Understand the [identifiers](#overview-of-identifiers) you could use.
3. [Set up webhooks](#receiving-identifiers-in-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.

## Overview of identifiers

To gain insights and create customer profiles, these are the identifiers you could collect:

* **Card 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.

* **Payment 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.

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.

* **Shopper reference**: a unique reference defined by you and stored on the Adyen payments platform. 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](/get-started-with-adyen/adyen-glossary/#recurring-payments-definition).

* **Shopper email**: the shopper's email address that you collected in some way, and stored on the Adyen payments platform when creating a recurring contract.

For analysis purposes, you can also collect:

* **Funding source**: funding source of the card, for example debit, credit, or prepaid.

* **Issuer 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.

## Using data from webhooks

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.

To receive identifiers as `additionalData` included in standard webhooks:

1. [Set up a standard webhook](/development-resources/webhooks), if you haven't done so already.

2. In your [Customer Area](https://ca-test.adyen.com/), open the **Standard webhook** you set up and select the [additional settings](/development-resources/webhooks/webhook-types/additional-settings) you want to receive.

   Some of the settings you may want to enable, are:

   | Identifier                       | Additional setting to select                                                                      |   |
   | -------------------------------- | ------------------------------------------------------------------------------------------------- | - |
   | Card alias                       | **Include Alias Info**                                                                            |   |
   | Funding source                   | **Include Funding Source**                                                                        |   |
   | Issuer country                   | **Include Issuer Country**                                                                        |   |
   | PAR                              | **Add Payment Account Reference** Must be enabled under **Developers** > **Additional data** too. |   |
   | Shopper email, shopper reference | **Include Shopper Details**                                                                       |   |
   | Token variant                    | **Include tokenTxVariant** Must be enabled under **Developers** > **Additional data** too.        |   |

3. To receive the PAR, or the token variant in standard webhooks, go to **Developers** > **Additional data** and enable these identifiers:

   | Identifier    | Additional data to select                                        |
   | ------------- | ---------------------------------------------------------------- |
   | PAR           | Under **Acquirer**, select **Payment account reference**         |
   | Token variant | Under **Card**, select **Token information for digital wallets** |

   When you enable identifiers under **Developers** > **Additional data** you also receive these identifiers in your API responses.

### Example standard webhook

The following example shows the standard webhook for a point-of-sale payment. The identifiers are in the `additionalData` object.

**Identifiers in a standard webhook**

```json
{
    "live": "false",
    "notificationItems": [
        {
            "NotificationRequestItem": {
                "additionalData": {
                    "alias": "M469509594859802",
                    "aliasType": "Default",
                    "authCode": "00",
                    "cardBin": "541333",
                    "cardSummary": "9999",
                    "expiryDate": "02/2028",
                    "fundingSource": "CREDIT",
                    "issuerCountry": "GB",
                    "recurring.shopperReference": "YOUR_SHOPPER_REFERENCE",
                    "shopperEmail": "S.Hopper@example.com",
                    "shopperIP": "198.51.100.1",
                    "shopperReference": "YOUR_SHOPPER_REFERENCE",
                    "store": "YOUR_STORE",
                    "tenderReference": "CYHG001647245627000",
                    "terminalId": "V400m-346403161"
                },
                "amount": {
                    "currency": "EUR",
                    "value": 12098
                },
                "eventCode": "AUTHORISATION",
                "eventDate": "2021-04-14T15:30:14+02:00",
                "merchantAccountCode": "YOUR_MERCHANT_ACCOUNT",
                "merchantReference": "902",
                "operations": [
                    "CANCEL",
                    "CAPTURE",
                    "REFUND"
                ],
                "paymentMethod": "mc",
                "pspReference": "8825408195409505",
                "reason": "00:9999:02/2028",
                "success": "true"
            }
        }
    ]
}
```

## Using data from Terminal API responses

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.

Refer to [Receiving identifiers in Terminal API responses](/point-of-sale/card-acquisition/identifiers#receiving-identifiers-in-responses) for more information and an example.

## See also

* [Shopper insights](/unified-commerce/shopper-insights)
