---
title: "Add information to a payment"
description: "Send us extra data elements such as application info, tender options, and additional data."
url: "https://docs.adyen.com/point-of-sale/add-data"
source_url: "https://docs.adyen.com/point-of-sale/add-data.md"
canonical: "https://docs.adyen.com/point-of-sale/add-data"
last_modified: "2024-03-12T16:30:00+01:00"
language: "en"
---

# Add information to a payment

Send us extra data elements such as application info, tender options, and additional data.

[View source](/point-of-sale/add-data.md)

A basic Terminal API payment request includes the amount, currency, ID, and timestamp of the transaction. But maybe you want to add information that you want us to apply to your request, or save on the Adyen payments platform. The `SaleToAcquirerData` field allows you to do that.

## Requirements

Before you begin, take into account the following requirements.

| Requirement          | Description                                                                                                                                         |
| -------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Integration type** | A [Terminal API](/point-of-sale/basic-tapi-integration/) integration with payment terminals or with a [Mobile solution](/point-of-sale/ipp-mobile). |
| **Setup steps**      | Before you begin, [select the data you want to receive in the additional response](/point-of-sale/add-data#receive-additional-data).                |

## Data elements

In the `SaleToAcquirerData` field you can add all kinds of data elements:

* [Application info](#application-info) that we can use for troubleshooting purposes.
* [Metadata](#metadata) of your own choice that you want to connect to the payment.
* Data to use for [shopper recognition and tokenization](#shopper-recognition).
* Dynamic [shopper statements](#shopper-statement).
* [Split payment](#split-payments) details.
* [Tender options](#tender-options) to influence how the transaction is processed.
* [Additional data](#additional-data-elements) for common use cases like pre-authorization, or hospitality.

Refer to the [sample collection of SaleToAcquirerData](/point-of-sale/add-data/sale-to-acquirer-data) to see what these data elements look like. Below we describe them in a bit more detail, and we explain how to add a combination of data elements to your payment request.

### Application info

Application info consists of data elements that identify the software that you use for making payment requests to the Adyen payments platform. When you pass this information in your payment requests, we are able to analyze and troubleshoot payments more efficiently, and provide a better support experience.

For details, see [Pass application info](/point-of-sale/basic-tapi-integration/pass-application-information).

### Metadata

Metadata are data elements that you create yourself. When you add metadata to your payment request, they are [returned in the response](#receive-additional-data) so that you can connect the transaction to your metadata. For example, to add a shift number and an employee ID to a payment. You are free to create up to 20 metadata fields, where the maximum field name is 20 characters, and the maximum value 80 characters.

To also receive metadata in your settlement reports, contact our [Support Team](https://ca-test.adyen.com/ca/ca/contactUs/support.shtml?form=other).

### Shopper recognition and tokenization

Based on shopper identifiers that you receive in your payment response, you can link the payment to a shopper. This enables you to personalize the shopping experience or make recurring payments using a token instead of real card details. You first need to create those shopper identifiers by including data elements like `shopperEmail`, `shopperReference`, and `recurringProcessingModel` in the `SaleToAcquirerData` field of your initial payment request. You then retrieve the shopper identifiers from the payment response and store them in your system.

For more information see [Shopper recognition](/point-of-sale/shopper-recognition).

### Shopper statement

When shoppers check their bank statements, they need to be able to easily identify the charges they see. The description of the transaction should start with your brand or the merchant name that is most recognizable to the cardholder.

In your Terminal API payment request, you can provide a transaction-specific `shopperStatement`. We recommend sending no more than 22 characters and using only **a-z**, **A-Z**, **0-9**, spaces, and the special characters `. , ' _ - ? + * /`. That is because banks may cut off longer statements and do not always support Unicode characters.

The `shopperStatement` from your Terminal API payment request only appears on your shopper's bank statement if your [account is configured](/account/transaction-description/) to include a dynamic shopper statement in the transaction description.

### Split payments

Platforms usually split payments between the platform and the users of the platform. Using the `SaleToAcquirerData` field you can define how to split a payment, such as the amount and type of each split and the accounts that receive the splits.

For instructions, see our Adyen for Platforms documentation about [processing in-person payments](/platforms/in-person-payments).

### Tender options

Tender options are parameters that change how the [tender](/get-started-with-adyen/adyen-glossary/#tender) is processed. For example, the tender option `AskGratuity` triggers the payment terminal to ask the shopper for a tip.

### Additional data

There are many additional data elements that you can add to your payment requests. The list is long and growing, so we cannot mention all of them here. See for example the [Additional data in our API Explorer](https://docs.adyen.com/api-explorer/#/Payment/latest/authorise__reqParam_additionalData). Many of these elements also apply to point-of-sale payments.

## Adding data elements to your request

There are two ways to pass data elements in the `SaleToAcquirerData` field of your payment request:

* **Option 1**: as a JSON object converted to a Base64-encoded string.
* **Option 2**: as form-encoded key-value pairs (using **&** as a separator).

Refer to the [sample collection of SaleToAcquirerData](/point-of-sale/add-data/sale-to-acquirer-data) to see what these formats look like.

The format of the `SaleToAcquirerData`, Base64-encoded or key-value pairs, determines the format of the `AdditionalResponse` that you receive. To always receive the `AdditionalResponse` in one of those formats, contact our [Support Team](https://ca-test.adyen.com/ca/ca/contactUs/support.shtml?form=other).

## Receiving the additional response

The `AdditionalResponse` in your payment response returns information resulting from the processing of your payment request. It also returns some of the information you added to your payment request, so you can use this in your business logic.

The additional response can contain many data fields, but you may not need them all. To select the data that you want:

1. In your Customer Area, go to **Developers** > **Additional data**.
2. Select the options for the type of data you want to receive.

The format of the `AdditionalResponse` corresponds with the format of the `SaleToAcquirerData` in the payment request: a Base64-encoded JSON object, or form-encoded key-value pairs.\
If the request doesn't contain any `SaleToAcquirerData`, the `AdditionalResponse` will be in key-value pairs format.

## Option 1: Pass data elements as Base64-encoded JSON

This example shows how to add data elements to your payment request as a JSON object converted to a Base64-encoded string:

1. Create a JSON object with the data elements you want to pass.

   In this example, we use a limited set of data:

   * Metadata: the key `employeeNumber` with a value of **1**
   * Shopper statement: Book shop - ISBN 9780706414004
   * Shopper email: S.Hopper\@example.com
   * Shopper reference: CUST01\_34582
   * Two tender options: `ReceiptHandler` to let the POS app handle printing or sending the receipt, and `AskGratuity` to ask for a tip.

   So the JSON object looks like this:

   **Data elements in JSON format**

   ```json
   {
       "metadata": {
           "employeeNumber": "1"
       },
       "shopperStatement": "Book shop - ISBN 9780706414004",
       "shopperEmail": "S.Hopper@example.com",
       "shopperReference": "CUST01_34582",
       "tenderOption": "ReceiptHandler,AskGratuity"
   }
   ```

2. Encode the JSON object to Base64.

   ```raw
   ewogICAibWV0YWRhdGEiOnsKICAgICAgImVtcGxveWVlTnVtYmVyIjoiMSIKICAgfSwKICAgInNob3BwZXJTdGF0ZW1lbnQiOiJCb29rIHNob3AgLSBJU0JOIDk3ODA3MDY0MTQwMDQiLAogICAic2hvcHBlckVtYWlsIjoiUy5Ib3BwZXJAZXhhbXBsZS5jb20iLAogICAic2hvcHBlclJlZmVyZW5jZSI6IkNVU1QwMV8zNDU4MiIsCiAgICJ0ZW5kZXJPcHRpb24iOiJSZWNlaXB0SGFuZGxlcixBc2tHcmF0dWl0eSIKfQ==
   ```

3. [Make a payment request](/point-of-sale/basic-tapi-integration/make-a-payment) with:

   * `SaleData.SaletoAcquirerData`: The Base64-encoded JSON object.

   #### JSON

   ```json
   {
       "SaleToPOIRequest": {
           "PaymentRequest": {
               "SaleData": {
                   "SaleToAcquirerData": "ewogICAibWV0YWRhdGEiOnsKICAgICAgImVtcGxveWVlTnVtYmVyIjoiMSIKICAgfSwKICAgInNob3BwZXJTdGF0ZW1lbnQiOiJCb29rIHNob3AgLSBJU0JOIDk3ODA3MDY0MTQwMDQiLAogICAic2hvcHBlckVtYWlsIjoiUy5Ib3BwZXJAZXhhbXBsZS5jb20iLAogICAic2hvcHBlclJlZmVyZW5jZSI6IkNVU1QwMV8zNDU4MiIsCiAgICJ0ZW5kZXJPcHRpb24iOiJSZWNlaXB0SGFuZGxlcixBc2tHcmF0dWl0eSIKfQ==",
                   "SaleTransactionID": {
                       "TransactionID": "27908",
                       "TimeStamp": "2020-04-08T12:08:52+00:00"
                   }
               },
               "PaymentTransaction": {
                   "AmountsReq": {
                       "Currency": "EUR",
                       "RequestedAmount": 10.99
                   }
               }
           },
           "MessageHeader": {
               "ProtocolVersion": "3.0",
               "MessageClass": "Service",
               "MessageCategory": "Payment",
               "MessageType": "Request",
               "ServiceID": "692",
               "SaleID": "POSSystemID12346",
               "POIID": "e280-346403161"
           }
       }
   }
   ```

   #### Java

   ```java
   String POIID = "YOUR_TERMINAL_ID";
   String serviceID = "YOUR_UNIQUE_ATTEMPT_ID";
   String saleID = "YOUR_CASH_REGISTER_ID";
   String transactionID = "YOUR_UNIQUE_TRANSACTION_ID";

   SaleToPOIRequest saleToPOIRequest = new SaleToPOIRequest();
   MessageHeader messageHeader = new MessageHeader();
   messageHeader.setPOIID(POIID);
   messageHeader.setMessageClass( MessageClassType.SERVICE );
   messageHeader.setMessageType( MessageType.REQUEST );
   messageHeader.setProtocolVersion("3.0");
   messageHeader.setServiceID(serviceID);
   messageHeader.setSaleID(saleID);
   messageHeader.setMessageCategory( MessageCategoryType.PAYMENT );
   saleToPOIRequest.setMessageHeader(messageHeader);

   PaymentRequest paymentRequest = new PaymentRequest();
   PaymentTransaction paymentTransaction = new PaymentTransaction();
   AmountsReq amountsReq = new AmountsReq();
   amountsReq.setRequestedAmount( BigDecimal.valueOf(10.99) );
   amountsReq.setCurrency("EUR");
   paymentTransaction.setAmountsReq(amountsReq);

   TransactionConditions transactionConditions = new TransactionConditions();
   paymentTransaction.setTransactionConditions(transactionConditions);
   paymentRequest.setPaymentTransaction(paymentTransaction);

   SaleData saleData = new SaleData();
   saleData.setSaleToAcquirerData("ewogICAibWV0YWRhdGEiOnsKICAgICAgImVtcGxveWVlTnVtYmVyIjoiMSIKICAgfSwKICAgInNob3BwZXJTdGF0ZW1lbnQiOiJCb29rIHNob3AgLSBJU0JOIDk3ODA3MDY0MTQwMDQiLAogICAic2hvcHBlckVtYWlsIjoiUy5Ib3BwZXJAZXhhbXBsZS5jb20iLAogICAic2hvcHBlclJlZmVyZW5jZSI6IkNVU1QwMV8zNDU4MiIsCiAgICJ0ZW5kZXJPcHRpb24iOiJSZWNlaXB0SGFuZGxlcixBc2tHcmF0dWl0eSIKfQ==");
   saleData.setTokenRequestedType( TokenRequestedType.CUSTOMER );
   TransactionIdentification saleTransactionID = new TransactionIdentification();
   saleTransactionID.setTransactionID(transactionID);
   saleTransactionID.setTimeStamp(DatatypeFactory.newInstance().newXMLGregorianCalendar(new GregorianCalendar()));
   saleData.setSaleTransactionID(saleTransactionID);
   paymentRequest.setSaleData(saleData);
   saleToPOIRequest.setPaymentRequest(paymentRequest);
   terminalAPIRequest.setSaleToPOIRequest(saleToPOIRequest);
   ```

   Note that the payment response has an `AdditionalResponse` in the same format as the `SaleToAcquirerData` field: a Base64-encoded string.

   **Base64 encoded AdditionalResponse**

   ```json
   {
       "SaleToPOIResponse": {
           "PaymentResponse": {
               "POIData": {...},
               "SaleData": {
                   "SaleTransactionID": {
                       "TimeStamp": "2020-04-08T12:08:52.000Z",
                       "TransactionID": "27908"
                   }
               },
               "PaymentReceipt": [...],
               "PaymentResult": {
                   "AmountsResp": {
                       "AuthorizedAmount": 12.08,
                       "Currency": "EUR",
                       "TipAmount": 1.09,
                   },
                   "OnlineFlag": true,
                   "PaymentAcquirerData": {...},
                   },
                   "PaymentInstrumentData": {
                       "CardData": {...},
                       "PaymentInstrumentType": "Card"
                   }
               },
               "Response": {
                   "Result": "Success",
                   "AdditionalResponse": " ",
               }
           },
           "MessageHeader": {...}
       }
   }
   ```

4. Decode the Base64 string in the `AdditionalResponse` field of the payment response. This contains:

   * The `metadata`, `shopperEmail`, `shopperReference`, and `shopperStatement` from the request.
   * Data resulting from the processing of the payment. The shopper gave a 10% tip (EUR 1.09).

   **Decoded Base64 AdditionalResponse**

   ```json
   {
      "additionalData":{
         "AID":"A000000004101001",
         "PaymentAccountReference":"cXs5pW5qRpreJdFGQtcY36pCAqjS2",
         "acquirerResponseCode":"APPROVED",
         "alias":"M469509594859802",
         "aliasType":"Default",
         "applicationLabel":"MCENGBRGBP",
         "applicationPreferredName":"mc en gbr gbp",
         "backendGiftcardIndicator":"false",
         "batteryLevel":"6%",
         "cardBin":"541333",
         "cardHolderName":" \/",
         "cardHolderVerificationMethodResults":"1F0302",
         "cardIssueNumber":"33",
         "cardIssuerCountryId":"826",
         "cardScheme":"mc",
         "cardSummary":"9999",
         "cardType":"mc",
         "expiryMonth":"02",
         "expiryYear":"2028",
         "fundingSource":"CREDIT",
         "giftcardIndicator":"false",
         "gratuityAmount":"109",
         "iso8601TxDate":"2023-01-24T11:37:56.669Z",
         "issuerCountry":"GB",
         "merchantReference":"27908",
         "metadata.employeeNumber":"1",
         "mid":"50",
         "offline":"false",
         "paymentMethod":"mc",
         "paymentMethodVariant":"mc",
         "posAmountCashbackValue":"0",
         "posAmountGratuityValue":"109",
         "posAuthAmountCurrency":"EUR",
         "posAuthAmountValue":"1208",
         "posEntryMode":"CLESS_CHIP",
         "posOriginalAmountValue":"1099",
         "posadditionalamounts.gratuityAmount":"109",
         "posadditionalamounts.originalAmountCurrency":"EUR",
         "posadditionalamounts.originalAmountValue":"1099",
         "pspReference":"XDKTNLDG975ZGN82",
         "recurring.shopperReference":"CUST01_34582",
         "shopperEmail":"S.Hopper@example.com",
         "shopperReference":"CUST01_34582",
         "shopperStatement":"Book shop - ISBN 9780706414004",
         "startMonth":"01",
         "startYear":"2017",
         "tc":"71D49C21362B74CC",
         "tid":"47069832",
         "transactionReferenceNumber":"XDKTNLDG975ZGN82",
         "transactionType":"GOODS_SERVICES",
         "txdate":"24-01-2023",
         "txtime":"12:37:56"
      },
      "store":"YOUR_STORE"
   }
   ```

## Option 2: Pass data elements as key-value pairs

This example shows how to add data elements to your payment request as form-encoded key-value pairs.

1. Create a string with the data elements you want to pass in key-value pairs, using **&** as a separator between the pairs.

   In this example, we use a limited set of data:

   * Metadata: `metadata.employeeNumber=1`
   * Shopper statement: `shopperStatement=Book shop - ISBN 9780706414004`
   * Shopper email: `shopperEmail=S.Hopper@example.com`
   * Shopper reference: `shopperReference=CUST01_34582`
   * Two tender options, to let the POS app handle printing or sending the receipt, and to ask for a tip: `tenderOption=ReceiptHandler,AskGratuity`

   So the string looks like this:

   ```raw
   metadata.employeeNumber=1&shopperStatement=Book shop - ISBN 9780706414004&shopperEmail=S.Hopper@example.com&shopperReference=CUST01_34582&tenderOption=ReceiptHandler,AskGratuity
   ```

2. [Make a payment request](/point-of-sale/basic-tapi-integration/make-a-payment) with:

   * `SaleData.SaletoAcquirerData`: Your string of form-encoded key-value pairs.

   #### JSON

   ```json
   {
       "SaleToPOIRequest": {
           "PaymentRequest": {
               "SaleData": {
                   "SaleToAcquirerData": "metadata.employeeNumber=1&shopperStatement=Book shop - ISBN 9780706414004&shopperEmail=S.Hopper@example.com&shopperReference=CUST01_34582&tenderOption=ReceiptHandler,AskGratuity",
                   "SaleTransactionID": {
                       "TransactionID": "27908",
                       "TimeStamp": "2023-01-24T11:56:38.471Z"
                   }
               },
               "PaymentTransaction": {
                   "AmountsReq": {
                       "Currency": "EUR",
                       "RequestedAmount": 10.99
                   }
               }
           },
           "MessageHeader": {
               "ProtocolVersion": "3.0",
               "MessageClass": "Service",
               "MessageCategory": "Payment",
               "MessageType": "Request",
               "ServiceID": "811",
               "SaleID": "POSSystemID12346",
               "POIID": "e280-346403161"
           }
       }
   }
   ```

   #### Java

   ```java
   String POIID = "YOUR_TERMINAL_ID";
   String serviceID = "YOUR_UNIQUE_ATTEMPT_ID";
   String saleID = "YOUR_CASH_REGISTER_ID";
   String transactionID = "YOUR_UNIQUE_TRANSACTION_ID";

   SaleToPOIRequest saleToPOIRequest = new SaleToPOIRequest();
   MessageHeader messageHeader = new MessageHeader();
   messageHeader.setPOIID(POIID);
   messageHeader.setMessageClass( MessageClassType.SERVICE );
   messageHeader.setMessageType( MessageType.REQUEST );
   messageHeader.setProtocolVersion("3.0");
   messageHeader.setServiceID(serviceID);
   messageHeader.setSaleID(saleID);
   messageHeader.setMessageCategory( MessageCategoryType.PAYMENT );
   saleToPOIRequest.setMessageHeader(messageHeader);

   PaymentRequest paymentRequest = new PaymentRequest();
   PaymentTransaction paymentTransaction = new PaymentTransaction();
   AmountsReq amountsReq = new AmountsReq();
   amountsReq.setRequestedAmount( BigDecimal.valueOf(10.99) );
   amountsReq.setCurrency("EUR");
   paymentTransaction.setAmountsReq(amountsReq);

   TransactionConditions transactionConditions = new TransactionConditions();
   paymentTransaction.setTransactionConditions(transactionConditions);
   paymentRequest.setPaymentTransaction(paymentTransaction);

   SaleData saleData = new SaleData();
   saleData.setSaleToAcquirerData("metadata.employeeNumber=1&shopperStatement=Book shop - ISBN 9780706414004&shopperEmail=S.Hopper@example.com&shopperReference=CUST01_34582&tenderOption=ReceiptHandler,AskGratuity");
   saleData.setTokenRequestedType( TokenRequestedType.CUSTOMER );
   TransactionIdentification saleTransactionID = new TransactionIdentification();
   saleTransactionID.setTransactionID(transactionID);
   saleTransactionID.setTimeStamp(DatatypeFactory.newInstance().newXMLGregorianCalendar(new GregorianCalendar()));
   saleData.setSaleTransactionID(saleTransactionID);
   paymentRequest.setSaleData(saleData);
   saleToPOIRequest.setPaymentRequest(paymentRequest);
   terminalAPIRequest.setSaleToPOIRequest(saleToPOIRequest);
   ```

   Note that the payment response has an `AdditionalResponse` in the same format as the `SaleToAcquirerData`: form-encoded key-value pairs. This contains:

   * The `metadata`, `shopperEmail`, `shopperReference`, and `shopperStatement` from the request.
   * Data resulting from the processing of the payment. The shopper gave a 10% tip (EUR 1.09).

   **Form-encoded AdditionalResponse**

   ```json
   {
       "SaleToPOIResponse": {
           "PaymentResponse": {
               "POIData": {...},
               "SaleData": {
                   "SaleTransactionID": {
                       "TimeStamp": "2020-04-08T13:53:52.000Z",
                       "TransactionID": "27908"
                   }
               },
               "PaymentReceipt": [...],
               "PaymentResult": {
                   "AmountsResp": {
                       "AuthorizedAmount": 12.08,
                       "Currency": "EUR",
                       "TipAmount": 1.09
                   },
                   "OnlineFlag": true,
                   "PaymentAcquirerData": {...},
                   "PaymentInstrumentData": {
                       "CardData": {...},
                       "PaymentInstrumentType": "Card"
                   }
               },
               "Response": {
                   "Result": "Success",
                   "AdditionalResponse": "AID=A000000004101001&tid=47069832&transactionType=GOODS_SERVICES&backendGiftcardIndicator=false&posadditionalamounts.originalAmountValue=1099&shopperStatement=Book%20shop%20-%20ISBN%000158204503066&expiryYear=2028&acquirerResponseCode=APPROVED&alias=M469509594859802&giftcardIndicator=false&gratuityAmount=109&posAmountGratuityValue=109&batteryLevel=27%25&cardHolderName=%20%2f&paymentMethodVariant=mc&pspReference=HZP8T728QRWZNN82&applicationPreferredName=mc%20en%20gbr%20gbp&store=YOUR_STORE&aliasType=Default&cardType=mc&iso8601TxDate=2023-01-24T11%3a56%3a40.471Z&offline=false&posOriginalAmountValue=1099&recurring.shopperReference=CUST01_34582&txtime=12%3a56%3a40&paymentMethod=mc&txdate=24-01-2023&shopperEmail=S.Hopper%40example.com&shopperReference=CUST01_34582&startYear=2017&tc=3FCC3D9E2B3E30F9&applicationLabel=MCENGBRGBP&cardIssueNumber=33&cardSummary=9999&expiryMonth=02&merchantReference=27908&mid=50&posadditionalamounts.originalAmountCurrency=EUR&transactionReferenceNumber=HZP8T728QRWZNN82&posAuthAmountCurrency=EUR&PaymentAccountReference=cXs5pW5qRpreJdFGQtcY36pCAqjS2&cardHolderVerificationMethodResults=1F0302&cardIssuerCountryId=826&posAmountCashbackValue=0&fundingSource=CREDIT&metadata.employeeNumber=1&posEntryMode=CLESS_CHIP&startMonth=01&cardBin=541333&cardScheme=mc&issuerCountry=GB&posAuthAmountValue=1208&posadditionalamounts.gratuityAmount=109"
               }
           },
           "MessageHeader": {...}
       }
   }
   ```

## See also

* [Sample collection of SaleToAcquirerData](/point-of-sale/add-data/sale-to-acquirer-data)
* [Pass application information](/point-of-sale/basic-tapi-integration/pass-application-information)
* [Pass tender options](/point-of-sale/add-data/tender-options)
* [Shopper recognition and tokenization](/point-of-sale/shopper-recognition)
