---
title: "Ask to select a single answer from a list"
description: "Use an input request to ask a multiple-choice question and allow a single answer."
url: "https://docs.adyen.com/point-of-sale/shopper-engagement/shopper-input/menu"
source_url: "https://docs.adyen.com/point-of-sale/shopper-engagement/shopper-input/menu.md"
canonical: "https://docs.adyen.com/point-of-sale/shopper-engagement/shopper-input/menu"
last_modified: "2025-03-14T16:17:00+01:00"
language: "en"
---

# Ask to select a single answer from a list

Use an input request to ask a multiple-choice question and allow a single answer.

[View source](/point-of-sale/shopper-engagement/shopper-input/menu.md)

##### Multiple-answer option

To allow users to select more than one option, you can use a [multiple-answer question](/point-of-sale/shopper-engagement/shopper-input/multi-menu).

Here we describe how you can use an input request to ask the shopper or your staff to select a menu option, such as an answer to a multiple choice question. You can use this, for example, to create a customer survey. You can show a header (your question), an optional second header (for example, an instruction), and up to 15 scrollable option buttons. Each option button can contain one or two text lines.

## Requirements

Before you begin, take into account the following requirement.

| Requirement          | Description                                                                      |
| -------------------- | -------------------------------------------------------------------------------- |
| **Integration type** | A [Terminal API integration](/point-of-sale/get-started) with payment terminals. |

## How it works

When you use a **MenuButtons** `InputRequest`, the terminal prompts the shopper to answer a multiple-choice question that allows them to select only one option. The terminal continues to show your input request until one of these events occurs:

* The user has provided input.
* The maximum input time expires. You can set this time in the request.
* On the terminal, **Cancel** **![](/images/5/8/8/4/9/58849deb729ef765fb92c34a2b367b9ae58a5598-cancel2x.png)** is selected.
* The terminal receives a [request to cancel collecting input](/point-of-sale/shopper-engagement/shopper-input/cancel-input) or any other request from the POS app.

### Examples

The following illustrations show a menu screen on a small portrait, a portrait, and landscape display.

![](/images/a/b/f/c/8/abfc8c8383516b8a00fb5a7dee104ff27d8323a6-screen-engetmenuportrait-small.png)

![](/images/1/3/4/6/c/1346caa38107277f2d85c8aee0fa67e003673f49-screen-engetmenuportrait.png)

![](/images/1/1/5/8/6/11586457f97a86d806e34667ca13ed844f648a08-screenengetmenulandscape.png)

The following illustrations show a menu screen with a second header line on a portrait, small portrait, and landscape display.

![](/images/a/f/5/c/5/af5c566b3c0e224f08b1de008adc7a9c4b2ee753-screenenmenusecondarytextportrait-small.png)

![](/images/3/5/3/2/8/3532857fe2b81e2c2903e7ad3bc9bcd10b348fb7-screen-enmenusecondarytextportrait.png)

![](/images/f/b/1/2/1/fb12179f4bb8c6cbabfdeb2627f5a9fc6a6f0651-screen-enmenusecondarytextlandscape.png)

And finally these illustrations show a menu screen where the option buttons have a second line of text.

![](/images/0/6/e/3/f/06e3f130bc92346a4c2b1a605d55961eb3351446-screen-enmenumultilinebuttonportrait.png)

![](/images/b/8/f/a/5/b8fa518c150b80642801b0559b5bb7a7227b81c5-screen-enmenumultilinebuttonportrait-small.png)

![](/images/7/c/6/e/c/7c6ec10b25f9043c33a56fe14ea38aa3875fa0da-screen-enmenumultilinebuttonlandscape.png)

## Make a single-answer MenuButtons input request

We support two **MenuButtons** input requests:

* Multiple choice—single answer: ensures no more than one answer is selected.
* [Multiple choice—multiple answers](/point-of-sale/shopper-engagement/shopper-input/multi-menu): allows selecting more than one answer.

To use the payment terminal to show a menu that allows the user to select only one option:

1. Make a [Terminal API](/point-of-sale/design-your-integration/terminal-api) input request, specifying:

   * The standard [`SaleToPOIRequest.MessageHeader` ](/point-of-sale/design-your-integration/terminal-api#request-message-header)object, with `MessageClass` set to **Device** and `MessageCategory` set to **Input**.

     | Parameter         | Required                                                                                    | Description                                                                                                                                                 |
     | ----------------- | ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
     | `ProtocolVersion` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | **3.0**                                                                                                                                                     |
     | `MessageClass`    | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | **Device**                                                                                                                                                  |
     | `MessageCategory` | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | **Input**                                                                                                                                                   |
     | `MessageType`     | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | **Request**                                                                                                                                                 |
     | `ServiceID`       | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | Your unique ID for this request, consisting of 1-10 alphanumeric characters. Must be unique within the last 48 hours for the terminal (`POIID`) being used. |
     | `SaleID`          | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | Your unique ID for the system where you send this request from.                                                                                             |
     | `POIID`           | ![-white\_check\_mark-](/user/data/smileys/emoji/white_check_mark.png "-white_check_mark-") | The unique ID of the terminal to send this request to. Format: *\[device model]-\[serial number]*.                                                          |

   - The [InputRequest.DisplayOutput](https://docs.adyen.com/api-explorer/terminal-api/latest/post/input#request-DisplayOutput) object to define what is shown on the terminal:

     | Parameter                                     | Description                                                                                                                                                                                                                                                           |
     | --------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
     | `Device`                                      | **CustomerDisplay**                                                                                                                                                                                                                                                   |
     | `InfoQualify`                                 | **Display**                                                                                                                                                                                                                                                           |
     | `OutputContent.OutputFormat`                  | **Text**                                                                                                                                                                                                                                                              |
     | `OutputContent.PredefinedContent.ReferenceID` | **MenuButtons**                                                                                                                                                                                                                                                       |
     | `OutputContent.OutputText`                    | An array of one or two `Text` fields to specify the header. The second text field is optional; you can omit it from the request. For example, you can use the first text field to specify the question or menu name, and the second text field to add an instruction. |

   - The [InputRequest.DisplayOutput.MenuEntry](https://docs.adyen.com/api-explorer/terminal-api/latest/post/input#request-DisplayOutput-MenuEntry) array of up to 15 items representing the options to choose from. The terminal shows these items as a scrollable list of buttons that the user can tap to select. Each item in the array has:

     | Parameter      | Description                                                                                                                                                                                                                                                                                                |
     | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
     | `OutputFormat` | **Text**                                                                                                                                                                                                                                                                                                   |
     | `OutputText`   | An array of one or two `Text` fields to specify the answer or menu button. The first text field will show in bold. The second text field is optional; you can omit it from the request. For example, you could write a short-form answer in the first field, and the long-form answer in the second field. |

   - The [InputRequest.InputData](https://docs.adyen.com/api-explorer/terminal-api/latest/post/input#request-InputData) object to handle the user input:

     | Parameter      | Description                                                                               |
     | -------------- | ----------------------------------------------------------------------------------------- |
     | `Device`       | **CustomerInput**                                                                         |
     | `InfoQualify`  | **Input**                                                                                 |
     | `InputCommand` | **GetMenuEntry**                                                                          |
     | `MaxInputTime` | (Integer) Time-out in seconds. This is the time that the user gets to finish their input. |

   The following example asks the shopper to respond to a survey question. There is a second header below the question, and the answer options have only one line.

   #### JSON

   ```json
   {
       "SaleToPOIRequest":{
           "MessageHeader":{
               "ProtocolVersion":"3.0",
               "MessageClass":"Device",
               "MessageCategory":"Input",
               "MessageType":"Request",
               "ServiceID":"0207111104",
               "SaleID":"POSSystemID12345",
               "POIID":"V400m-324688179"
           },
           "InputRequest":{
               "DisplayOutput":{
                   "Device":"CustomerDisplay",
                   "InfoQualify":"Display",
                   "OutputContent":{
                       "OutputFormat":"Text",
                       "PredefinedContent":{
                           "ReferenceID":"MenuButtons"
                       },
                       "OutputText":[
                           {
                               "Text":"How was your visit?"
                           },
                           {
                               "Text":"Please tap one of the options below:"
                           }
                       ]
                   },
                   "MenuEntry":[
                       {
                           "OutputFormat":"Text",
                           "OutputText":[
                               {
                                   "Text":"Excellent"
                               }
                           ]
                       },
                       {
                           "OutputFormat":"Text",
                           "OutputText":[
                               {
                                   "Text":"Good"
                               }
                           ]
                       },
                       {
                           "OutputFormat":"Text",
                           "OutputText":[
                               {
                                   "Text":"Not so good"
                               }
                           ]
                       },
                       {
                           "OutputFormat":"Text",
                           "OutputText":[
                               {
                                   "Text":"Bad"
                               }
                           ]
                       }
                   ]
               },
               "InputData":{
                   "Device":"CustomerInput",
                   "InfoQualify":"Input",
                   "InputCommand":"GetMenuEntry",
                   "MaxInputTime":120
               }
           }
       }
   }
   ```

   #### Java

   ```java
   SaleToPOIRequest saleToPOIRequest = new SaleToPOIRequest();
   MessageHeader messageHeader = new MessageHeader();
   saleToPOIRequest.setMessageHeader(messageHeader);

   InputRequest inputRequest = new InputRequest();
   DisplayOutput displayOutput = new DisplayOutput();
   displayOutput.setDevice( DeviceType.CUSTOMER_DISPLAY );
   displayOutput.setInfoQualify( InfoQualifyType.DISPLAY );
   OutputContent outputContent = new OutputContent();
   outputContent.setOutputFormat( OutputFormatType.TEXT );
   PredefinedContent predefinedContent = new PredefinedContent();
   predefinedContent.setReferenceID("MenuButtons");
   outputContent.setPredefinedContent(predefinedContent);
   OutputText headerLine1 = new OutputText();
   headerLine1.setText("How was your visit?");
   OutputText headerLine2 = new OutputText();
   headerLine2.setText("Please tap one of the options below:");
   outputContent.getOutputText().add(headerLine1);
   outputContent.getOutputText().add(headerLine2);
   displayOutput.setOutputContent(outputContent);

   MenuEntry menuEntry1 = new MenuEntry();
   menuEntry1.setOutputFormat( OutputFormatType.TEXT );
   OutputText option1Line1 = new OutputText();
   option1Line1.setText("Excellent");
   menuEntry1.getOutputText().add(option1Line1);
   displayOutput.getMenuEntry().add(menuEntry1);

   MenuEntry menuEntry2 = new MenuEntry();
   menuEntry2.setOutputFormat( OutputFormatType.TEXT );
   OutputText option2Line1 = new OutputText();
   option2Line1.setText("Good");
   menuEntry2.getOutputText().add(option2Line1);
   displayOutput.getMenuEntry().add(menuEntry2);

   MenuEntry menuEntry3 = new MenuEntry();
   menuEntry3.setOutputFormat( OutputFormatType.TEXT );
   OutputText option3Line1 = new OutputText();
   option3Line1.setText("Not so good");
   menuEntry3.getOutputText().add(option3Line1);
   displayOutput.getMenuEntry().add(menuEntry3);

   MenuEntry menuEntry4 = new MenuEntry();
   menuEntry4.setOutputFormat( OutputFormatType.TEXT );
   OutputText option4Line1 = new OutputText();
   option4Line1.setText("Bad");
   menuEntry4.getOutputText().add(option4Line1);
   displayOutput.getMenuEntry().add(menuEntry4);

   inputRequest.setDisplayOutput(displayOutput);

   InputData inputData = new InputData();
   inputData.setDevice( DeviceType.CUSTOMER_INPUT );
   inputData.setInfoQualify( InfoQualifyType.INPUT );
   inputData.setInputCommand( InputCommandType.GET_MENU_ENTRY );
   inputData.setMaxInputTime( BigInteger.valueOf(120) );
   inputRequest.setInputData(inputData);
   saleToPOIRequest.setInputRequest(inputRequest);
   terminalAPIRequest.setSaleToPOIRequest(saleToPOIRequest);
   ```

2. Wait for the user to supply the requested input.

   The input is not validated against a format.

   If input is received from the terminal, the input response includes an [InputResult](https://docs.adyen.com/api-explorer/terminal-api/latest/post/input#responses-200-InputResult) object with:

   * `Input.MenuEntryNumber`: An array that indicates the option that the user selected. For example, if the third option is selected, the third item in the array is `1` and all other array items are `0`.

   **Example response when the shopper selected an option**

   ```json
   {
     "SaleToPOIResponse": {
       "InputResponse": {
         "InputResult": {
           "Device": "CustomerInput",
           "InfoQualify": "Input",
           "Response": {
             "Result": "Success"
           },
           "Input": {
             "MenuEntryNumber": [
               0,
               0,
               1,
               0,
               0
             ],
             "InputCommand": "GetMenuEntry"
           }
         },
         "OutputResult": {
           "Device": "CustomerDisplay",
           "InfoQualify": "Display",
           "Response": {
             "Result": "Success"
           }
         }
       },
       "MessageHeader": {
         "ProtocolVersion": "3.0",
         "SaleID": "POSSystemID12345",
         "MessageClass": "Device",
         "MessageCategory": "Input",
         "ServiceID": "0207111104",
         "POIID": "V400m-324688179",
         "MessageType": "Response"
       }
     }
   }
   ```

   * If the input request times out, the `InputResult.Response` has `AdditionalResponse`: **message=Screen%20timeout**, `Result`: **Failure**, and `ErrorCondition`: **Cancel**.

   * If you make a payment request while the input request is waiting for input on the terminal, the payment request overrides the input request. The `InputResult.Response` has `AdditionalResponse`: **message=A%20higher%20priority%20request%20has%20been%20received**, `Result`: **Failure**, and `ErrorCondition`: **Busy**.

   * If the user declined to respond (selected the **Cancel** key **![](/images/5/8/8/4/9/58849deb729ef765fb92c34a2b367b9ae58a5598-cancel2x.png)**), the `InputResult.Input.MenuEntryNumber` field is empty. The `InputResult.Response` has `Result`: **Failure** and `ErrorCondition`: **Cancel**.

3. Pass the relevant data from `InputResult.Input` to your system for validation and further use.

## See also

* [Multiple choice - single answer](/point-of-sale/shopper-engagement/shopper-input/multi-menu)
* [Cancel an input request](/point-of-sale/shopper-engagement/shopper-input/cancel-input)
* [Ask for another type of input](/point-of-sale/shopper-engagement/shopper-input/select-input-request)
* [Create a session](/point-of-sale/shopper-engagement/create-session)
