--- title: "Receive card and shopper identifiers" description: "Understand the data you may want to collect in shopper recognition use cases." url: "https://docs.adyen.com/point-of-sale/card-acquisition/identifiers" source_url: "https://docs.adyen.com/point-of-sale/card-acquisition/identifiers.md" canonical: "https://docs.adyen.com/point-of-sale/card-acquisition/identifiers" last_modified: "2020-03-27T16:16:00+01:00" language: "en" --- # Receive card and shopper identifiers Understand the data you may want to collect in shopper recognition use cases. [View source](/point-of-sale/card-acquisition/identifiers.md) Using card and shopper identifiers is even more powerful across channels. See our [omnichannel documentation](/unified-commerce). The payment data that you receive from Adyen offer a unique opportunity to connect payments with [insights](/point-of-sale/card-acquisition/insights) into your customers, and to implement specific customer journeys like the [card acquisition scenarios](/point-of-sale/card-acquisition#scenarios). We refer to these data as *card and shopper identifiers*. The identifiers are returned in Terminal API card acquisition and payment responses, and also asynchronously in [webhooks](/development-resources/webhooks). However, you do not receive all of them automatically. There are some identifiers that you need to enable in your [Customer Area](https://ca-test.adyen.com/), and some that you first need to collect or create yourself. ## Requirements Before you begin, take into account the following requirements and preparations. | Requirement | Description | | -------------------- | ----------------------------------------------------------------------------------------------------- | | **Integration type** | A [Terminal API integration](/point-of-sale/basic-tapi-integration/) with payment terminals. | | **Webhooks** | To use identifiers from webhook events, set up [standard webhooks](/development-resources/webhooks/). | | **Setup steps** | Before you begin, check the [general considerations](#considerations). | ## General considerations To use card and shopper identifiers, you need to: * Know what data you will be handling. Refer to the [overview](#overview) to learn more. * Understand and manage the [privacy implications](#privacy) of using such data. * Have your own back-end system for storing shopper identifiers and purchase data, like a Customer Relationship Management System (CRM) or other database. * Implement business logic to get the desired result from this data. For example, to combine data in a way that answers questions about your shoppers. ## Customer data and privacy Before storing any customer data, including payment data, you need to consider data privacy. * Consult your legal department or an accredited third-party company to understand the data privacy regulations of the countries/regions that you operate in. * Ask for your customer's explicit permission to store their data, and be clear about what you intend to use it for. For this, you could use the Terms and Conditions on your website, or you can [use the payment terminal to interact with the customer](/point-of-sale/shopper-engagement/shopper-input). If the customer asks to remove their information, you can use our [Data Protection API](/development-resources/data-protection-api) to remove any customer-related data that you have stored with Adyen. The API also enables you to comply with the General Data Protection Regulation (GDPR) [right to erasure](https://gdpr-info.eu/art-17-gdpr/). ## Overview of card and shopper identifiers Specific use cases or customer journeys can involve one or more of the following identifiers: * **BIN**: the [Bank Identification Number](/get-started-with-adyen/adyen-glossary/#bank-identification-number-bin) of the shopper's card. * **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. * **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. * **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. * **Recurring detail reference**: the token for making [recurring contract payments](/get-started-with-adyen/adyen-glossary/#recurring-payments-definition). The token is generated on the Adyen payments platform and returned in the response for the initial payment. In the recurring payments you use this token instead of actual card details. * **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. * **Token variant**: the type of NFC wallet, like Apple Pay, used in the transaction. Note that this is not the kind of token you can use for making payments. Example value: **mc\_applepay**. The importance of these identifiers depends on your scenario. The following table shows the connection between identifiers and use case examples. | Identifier | [Insights](/point-of-sale/card-acquisition/insights) | [Card recognition](/point-of-sale/shopper-recognition/identification) | [Loyalty](/point-of-sale/loyalty) | [Tax-free shopping](/point-of-sale/shopper-recognition/tax-free-shopping) | [Recurring payments](/point-of-sale/recurring-payments) | | -------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- | | BIN | | | | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | | | Card alias | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | | | | Funding source | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | | | | | | Issuer country/region | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | | | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | | | Payment Account Reference | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | | | | Recurring detail reference | | | | | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | | Shopper email | | | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | | | | Shopper reference | | | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | ## Receive identifiers in Terminal API responses Now that you know based on the [overview](#overview) what card and shopper identifiers exist and which ones you need for your use cases, you have to make sure that your Terminal API responses actually return those identifiers. The following identifiers are returned automatically: * Funding source * Card BIN The shopper email is only returned in the response if you have previously collected the email from the shopper and submitted the email in a payment request. But to get the card alias, issuer country/region, PAR, shopper reference, and recurring detail reference, you need to enable receiving this data: 1. In your [Customer Area](https://ca-test.adyen.com/), go to **Developers** > **Additional data**. 2. Select options: | Identifier | Instruction | Result | | -------------------------- | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | Card alias | Select **Payment** > **Include alias info** | Returns the alias in the `AdditionalResponse`. | | Issuer country/region | Select **Card** > **Issuer country/region** | Returns the numeric country code (for example, **528**), both in the `CardData` and in the `AdditionalResponse`. Also returns the two-letter country code (for example, **NL**) in the `AdditionalResponse`. | | PAR | Select **Acquirer** > **Payment account reference** | Returns the PAR, if available | | Recurring detail reference | Select **Payment** > **Recurring details** | Returns the recurring detail reference and the shopper reference in the `AdditionalResponse`. | | Shopper reference | Select **Payment** > **Recurring details** | Returns the recurring detail reference and the shopper reference in the `AdditionalResponse`. | ### Example In the Terminal API response, the identifiers are in the `AdditionalResponse`. Some identifiers are also returned in other fields. We return the `AdditionalResponse` either as key-value pairs separated by an ampersand **&**, or as a Base64-encoded string that you need to decode to get a JSON object. **Identifiers in a payment response** ```json { "SaleToPOIResponse": { "MessageHeader": {...}, "PaymentResponse": {...}, "PaymentReceipt": [...], "PaymentResult": { ... "PaymentInstrumentData": { "CardData": { "{hint:Included if you enabled receiving the issuer country}CardCountryCode{/hint}": "826", ... "PaymentToken": { "TokenRequestedType": "Customer", "{hint:The card alias, returned if the request includes TokenRequestedType}TokenValue{/hint}": "M469509594859802" }, }, "PaymentInstrumentType": "Card" } }, "Response": { "{hint:Includes identifiers and transaction details}AdditionalResponse{/hint}": "...&alias=M469509594859802....&recurring.shopperReference=SREF12458...&shopperReference=SREF12458&shopperEmail=S.Hopper%40example.com...&cardIssuerCountryId=826...&fundingSource=CREDIT&issuerCountry=GB...&cardBin=541333...", "Result": "Success" }, "SaleData": {...} } } } ``` If the `AdditionalResponse` is returned as a Base64-encoded string, you get a JSON object similar to the following when you Base64-decode the string: ```json { "additionalData": { "AID": "A000000004101001", "adjustAuthorisationData": "BQABAQA20...oyMyv", "alias": "M469509594859802", "aliasType": "Default", "applicationPreferredName": "mc en gbr gbp", "backendGiftcardIndicator": "false", "batteryLevel": "40%", "cardBin": "541333", "cardHolderVerificationMethodResults": "420300", "cardIssueNumber": "33", "cardIssuerCountryId": "826", "cardScheme": "mc", "cardSummary": "9999", "cardType": "mc", "expiryMonth": "02", "expiryYear": "2028", "fundingSource": "CREDIT", "giftcardIndicator": "false", "iso8601TxDate": "2021-04-14T13:06:39.0000000+0000", "issuerCountry": "GB", "merchantReference": "818", "mid": "1000", "offline": "false", "paymentMethod": "mc", "paymentMethodVariant": "mc", "posAmountCashbackValue": "0", "posAmountGratuityValue": "0", "posAuthAmountCurrency": "EUR", "posAuthAmountValue": "12098", "posEntryMode": "CLESS_CHIP", "posOriginalAmountValue": "12098", "posadditionalamounts.originalAmountCurrency": "EUR", "posadditionalamounts.originalAmountValue": "12098", "pspReference": "NC6HT9CRT65ZGN82", "recurring.shopperReference": "SREF12458", "shopperEmail": "S.Hopper@example.com", "shopperReference": "SREF12458", "startMonth": "01", "startYear": "2017", "tc": "23733CAF5C7F70B2", "tid": "47069832", "transactionLanguage": "en", "transactionReferenceNumber": "NC6HT9CRT65ZGN82", "transactionType": "GOODS_SERVICES", "txdate": "14-04-2021", "txtime": "15:06:39" }, "store": "YOUR_STORE" } ``` ## Receive identifiers in webhooks In particular for [gaining insights across channels](/point-of-sale/card-acquisition/insights), you may want to gather identifiers from standard webhooks. For this, you need to enable receiving the identifiers that your use cases require. The identifies are then included in the webhook message in the `additionalData` object. 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. | | | BIN | **Include Card Bin** | | | POIID | **Include POS TerminalInfo** | | | Store name | **Include Store** | | | Tender reference, POIID | **Include POS Details** | | 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" } } ] } ``` ## See also * [Card acquisition](/point-of-sale/card-acquisition) * [Shopper insights](/point-of-sale/card-acquisition/insights)