---
title: "Creating customer profiles"
description: "Create a profile for your customers, both online and at the point of sale."
url: "https://docs.adyen.com/unified-commerce/loyalty-program/create-profiles"
source_url: "https://docs.adyen.com/unified-commerce/loyalty-program/create-profiles.md"
canonical: "https://docs.adyen.com/unified-commerce/loyalty-program/create-profiles"
last_modified: "2026-06-01T15:33:15+02:00"
language: "en"
---

# Creating customer profiles

Create a profile for your customers, both online and at the point of sale.

[View source](/unified-commerce/loyalty-program/create-profiles.md)

Before you are able to recognize a customer, you need to create a profile for them in your Customer Relationship Management System (CRM) or other database. Each [customer profile](#store-customer-data) should include [identifiers](/unified-commerce/collect-data#overview-of-identifiers) that you will also receive in API responses.

You should always ask for your customer's consent before storing their personal information or tokenizing their card. See [Data privacy](/unified-commerce/shopper-insights#data-privacy).

## Enable receiving identifiers

Proceed as follows to ensure the API responses that you receive from us contain the shopper identifiers that are needed for shopper loyalty use cases:

1. Ask your Adyen contact to enable receiving the **card alias** in the payment response, for both ecommerce and point-of-sale payments.

2. Log in to your [Customer Area](https://ca-test.adyen.com/).

3. Go to **Developers** > **Additional data** and select:

   * **Recurring details**: This returns the shopper reference and the recurring detail reference in API responses.
   * Any other details you want to receive. For example, issuer country/region.

## Create profile from online payment

##### Ask for customer consent

Are you using Drop-in or our Card Component? You can [configure your integration](/payment-methods/cards#how-do-you-want-to-integrate) to show a ***Save details for next time*** checkbox in your payment form.

If customers select this box, they choose to save and tokenize their card details.

When a customer makes a purchase in your web or in-app store, collect their contact details (such as their email address) in your payment form, and generate a unique reference for them.

To create a customer profile:

1. Make a POST [/payments](https://docs.adyen.com/api-explorer/Checkout/latest/post/payments) request to initiate the payment. In this request additionally include:

   * `shopperEmail`: the customer's email address.
   * `shopperReference`: your unique reference for this customer. Do not include personally identifiable information (PII), for example name or email address (minimum length 3 characters).
   * `storePaymentMethod`: set this to **true** if the customer chooses to save their card details for future payments or for a subscription.

   The example below shows how you would make a **EUR 10.99** payment request, store the customer's details, and request a token representing their card. This customer has the email address **john.smith\@example.com** and the unique reference **ShopperID-A16729**:

   **Online payment request**

   ```json
   {
      "amount":{
         "value":1099,
         "currency":"EUR"
      },
      "paymentMethod": {
         "type": "scheme",
         "encryptedCardNumber": "test_4111111111111111",
         "encryptedExpiryMonth": "test_03",
         "encryptedExpiryYear": "test_2030",
         "encryptedSecurityCode": "test_737"
      },
       "reference":"YOUR_ORDER_NUMBER",
       "merchantAccount":"YOUR_MERCHANT_ACCOUNT",
       "returnUrl":"https://your-company.example.com/...",
       "shopperReference":"ShopperID-A16729",
       "shopperEmail":"john.smith@example.com",
       "storePaymentMethod":true
   }
   ```

   If the payment was successful, you receive a response that contains an `additionalData` object. If the payment was successful this object includes:

   * `shopperEmail`: customer's email address. This echoes the `shopperEmail` provided in the payment request.
   * `alias`: value that uniquely represents the customer's card number, for recognition purposes. For NFC wallet transactions, the `alias` is not available.
   * `tokenization.shopperReference`: your unique reference for the customer. This echoes the `shopperReference` provided in the payment request.
   * `tokenization.storedPaymentMethodId`: token representing the customer's saved card, for use in future tokenized payments.
   * `tokenization.store.operationType`: **created**.

   The example below is from a successful payment, where the customer's details were successfully saved with Adyen. This includes a `storedPaymentMethodId` **7219687191761347**, indicating that their payment method was tokenized.

   **Online payment response**

   ```json
   {
      "additionalData": {
         "alias":"M469509594859802",
         "recurring.shopperEmail":"john.smith@example.com"
      },
      "tokenization": {
         "shopperReference":"ShopperID-A16729",
         "storedPaymentMethodId":"7219687191761347"
      },
      "pspReference":"881468919096134D",
      "resultCode":"Authorised"
   }
   ```

2. Save the `alias` or PAR, `shopperEmail`, `shopperReference`, and `storedPaymentMethodId` in your customer database. For more information, refer to [Store customer data](#store-customer-data).

   You will be able to use these identifiers to recognize this customer when they make a purchase in your online or physical stores.

Next, let's find out how to create a customer profile in store, from a point-of-sale payment.

## Create profile from point-of-sale payment

Just like an online purchase, when your customer makes an in-person payment you need to collect their contact details, and then submit these in a payment request.

To encourage your customer to provide you with their contact details, you may want to offer them incentives such as [payment-linked loyalty](/unified-commerce/loyalty-program/payment-linked-loyalty), or the option to receive their receipt by email.

To create a customer profile from a point-of-sale payment:

1. Collect your customer's contact details, such as an email address.

   There are several ways you could do this. You can let your customer enter this directly on the terminal, using its touch-screen display. Alternatively, your staff could ask them for this information, then enter it in your POS app.

   In the examples below, we explain how to collect a customer's email address on the terminal. This will use **GetText** [input request](/point-of-sale/shopper-engagement/shopper-input)s, which you can initiate from your POS app. The `OutputText.Text` that you provide in this request will be presented to the customer.

   **GetText input request**

   ```json
   {
      "SaleToPOIRequest":{
         "MessageHeader":{
            "ProtocolVersion":"3.0",
            "MessageClass":"Service",
            "MessageCategory":"Payment",
            "MessageType":"Request",
            "ServiceID":"0207112304",
            "SaleID":"POSSystemID12345",
            "POIID":"V400m-324688179"
         },
         "InputRequest":{
            "DisplayOutput":{
               "Device":"CustomerDisplay",
               "InfoQualify":"Display",
               "OutputContent":{
                  "OutputFormat":"Text",
                  "PredefinedContent":{
                     "ReferenceID":"GetText"
                  },
                  "OutputText":[
                     {
                        "Text":"Enter your email address"
                     }
                  ]
               }
            },
            "InputData":{
               "Device":"CustomerInput",
               "InfoQualify":"Input",
               "InputCommand":"TextString",
               "MaxInputTime":120,
               "DefaultInputString":"name@domain.com"
            }
         }
      }
   }
   ```

   An on-screen keyboard appears on the terminal, where your customer can enter their email address.

   You receive an input response when the customer has finished entering their email address. The text your customer entered is provided in the `Input.TextInput`.

   The example below shows what this response would look like if a customer entered **john.smith\@example.com** as their email address.

   **GetText input response**

   ```json
   {
      "SaleToPOIResponse":{
         "InputResponse": {
            "InputResult": {
               "Device":"CustomerInput",
               "InfoQualify":"Input",
               ...
            },
            "Input": {
               "TextInput":"john.smith@example.com",
               "InputCommand":"TextString"
            }
         },
         "OutputResult": {
            "Device":"CustomerDisplay",
            "InfoQualify":"Display",
            "Response": {
   	            "Result":"Success"
            }
         }
      }
      "MessageHeader": {...}
   }
   ```

[]()

2. Initiate the payment by making a [payment request](/point-of-sale/basic-tapi-integration/make-a-payment#make-a-payment). In this request, additionally include the following in the `PaymentRequest.SaleData` object:

   * `SaleToAcquirerData`: include the following parameters either as a JSON object converted to a base64-encoded string, or as form-encoded key-value pairs. For our example, we'll use a [form-encoded key-value pair format](/point-of-sale/add-data#instructions).

     * `shopperReference`: your unique reference for the customer. Do not include personally identifiable information (PII), for example name or email address (minimum length 3 characters).
     * `shopperEmail`: the customer's email address that you received from the **GetText** input response.
     * `recurringContract`: if the customer agrees to store their payment details, provide this parameter with a value of **UnscheduledCardOnFile**. This saves the `shopperReference` and `shopperEmail` on our platform, and ensures the values are returned in future card acquisition and payment requests. It also creates a token that you can use for subscriptions and future payments in your online store.

   Before saving a customer's payment details, you should ask for their consent. For more information, see [Data privacy](/unified-commerce/shopper-insights#data-privacy).

   The following example shows how to make a payment request for **10.99 euros**, store the customer's details, and request a token representing their card. This customer has the email address **john.smith\@example.com** and the unique reference **ShopperID-A16729**.

   **Terminal API Request**

   ```json
   {
      "SaleToPOIRequest":{
         "MessageHeader":{
            "ProtocolVersion":"3.0",
            "MessageClass":"Service",
            "MessageCategory":"Payment",
            "MessageType":"Request",
            "ServiceID":"0207112304",
            "SaleID":"POSSystemID12345",
            "POIID":"V400m-324688179"
         },
         "PaymentRequest":{
            "SaleData":{
               "SaleTransactionID":{
                  "TransactionID":"27958",
                  "TimeStamp":"2019-12-12T10:11:04+00:00"
               },
               "SaleToAcquirerData":"shopperReference=ShopperID-A16729&shopperEmail=john.smith@example.com&recurringContract=UnscheduledCardOnFile"
            },
            "PaymentTransaction":{
               "AmountsReq":{
                  "Currency":"EUR",
                  "RequestedAmount":10.99
               }
            }
         }
      }
   }
   ```

   You receive a [payment response](/point-of-sale/basic-tapi-integration/make-a-payment#payment-response) containing an `PaymentResponse.Response.AdditionalResponse` string object. If the payment was successful the string includes:

   * `alias`: a value that uniquely represents the customer's card.
   * `shopperEmail`: the customer's email address. This echoes the `shopperEmail` you provided in the payment request.
   * `tokenization.shopperReference` and `recurring.shopperReference`: your unique reference for the customer. This echoes the `shopperReference` you provided in the payment request.
   * `tokenization.storedPaymentMethodId` and `recurring.recurringDetailReference`: a token representing this customer's card details.\
     You can use this token to offer your customer a [more frictionless online checkout](/unified-commerce/loyalty-program/recognize-customers#showing-a-saved-card-in-your-online-checkout) experience, or [create a subscription](/online-payments/tokenization/make-token-payments) to your products or services.

   The example below is from a successful payment, where the customer's details were successfully stored with Adyen. This includes a `recurringDetailReference` **7219687191761347**, indicating that their payment method was tokenized.

   **Payment response**

   ```json
   {
      "SaleToPOIResponse":{
         "MessageHeader":{...},
         "PaymentResponse":{
            "Response":{
               "Result":"Success",
               "AdditionalResponse":"...alias=M469509594859802...recurring.recurringDetailReference=7219687191761347&recurring.shopperReference=ShopperID-A16729...shopperEmail=SHOPPER_EMAIL...tokenization.shopperReference=12345&tokenization.store.operationType=created&tokenization.storedPaymentMethodId=7219687191761347..."
            }
            ...
         },
         "PaymentReceipt":{...}
      }
   }
   ```

3. Store the `alias`,`shopperEmail`, `shopperReference`, and `recurring.recurringDetailReference` or `tokenization.storedPaymentMethodId` in your customer database. For more information, refer to [Store customer data](#store-customer-data).

You will be able to use the card `alias`, `shopperEmail` and `shopperReference` to recognize this customer when they make a purchase again whether online or in store. You can also use the `shopperReference` with `recurring.recurringDetailReference` or `tokenization.storedPaymentMethodId` to offer the customer a [more frictionless online checkout](/unified-commerce/loyalty-program/recognize-customers#showing-a-saved-card-in-your-online-checkout) by showing their saved card, or [create a subscription](/online-payments/tokenization/make-token-payments) to your products or services.

## Store customer data

You have to save customer data collected in your online or physical stores as a record in your CRM or other database.

In each customer profile, save the following information:

* `shopperEmail`: the customer's email address.

* Card `alias`: a value that uniquely represents the customer's card number, for recognition purposes. In case a customer has multiple cards, link them to the shopper through the `shopperEmail`.

* `tokenization.shopperReference` and `recurring.shopperReference`: your unique reference for the customer.

* `tokenization.storedPaymentMethodId` and `recurring.recurringDetailReference`: a token representing the customer's card details, for use in future tokenized payments. In case a customer has multiple cards, create a token for each card using the same `shopperReference` in your payments request. Add the new token returned in the response to the existing customer record. To know if a customer is using a new card, you first need to [recognize the customer](/unified-commerce/loyalty-program/recognize-customers).

  ![](/user/pages/docs/06.unified-commerce/14.loyalty-program/03.create-profiles/customerprofile.svg?decoding=auto\&fetchpriority=auto)

  For more information on creating and managing tokens, see our [Tokenization documentation](/online-payments/tokenization).

You will need to make the data in this record both readable and writable for all your sales channels.

## Next steps

[required](/unified-commerce/loyalty-program/recognize-customers)

[Recognize customers](/unified-commerce/loyalty-program/recognize-customers)

[Identify your returning customers when they make an online or in-person purchase.](/unified-commerce/loyalty-program/recognize-customers)

[Loyalty use case](/unified-commerce/loyalty-program/payment-linked-loyalty)

[Offer a loyalty program without a separate loyalty card or app.](/unified-commerce/loyalty-program/payment-linked-loyalty)
