Getting customer input

There are many points in a customer interaction where a merchant may want to ask the customer for input and store the response. Use the /v1/device/read-input endpoint to display a custom question and get the response.

📘

NOTE

If you need the customer to provide a yes or no response to a question, and log the answer, use the /v1/device/read-confirmation endpoint.

Prerequisites

  • The POS is connected to the device using a network or cloud connection.
  • The Clover device is in an idle state, that is, no payment is being taken.

Collecting a month/year response

To get information related to month and year, example: age verification:

  1. Construct a request with text set to your question and format set to MONTHYEAR.
{
  "text": "Please enter your birth month/year",
  "format": "MONTHYEAR"
}
  1. Send a POST request to the /v1/device/read-input endpoint.
  2. Required. Include the required headers for your request.
    The text displays on the device. When the customer enters information, and taps OK, a success message appears.
{
  "response": "1277"
}

Collecting a phone number

To collect the customer's phone number:

  1. Construct a request with text set to your question and format set to PHONE.
{
  "text": "Please enter your phone number",
  "format": "PHONE"
}
  1. Send a POST request to the /v1/device/read-input endpoint.
    The text displays on the device. When the customer enters information, and taps OK, a success message appears.
{
  "response": "17725559392"
}

Collecting a customer-entered amount

To get information in numeric format, example: a number to confirm the number of items ordered:

  1. Construct a request with text set to your question and format set to AMOUNT.
{
  "text": "Please enter the number of items",
  "format": "AMOUNT"
}
  1. Send a POST request to the /v1/device/read-input endpoint.
    The text displays on the device. When the customer enters information, and taps OK, a success message appears.
{
  "response": "3"
}

Collecting customer-provided text

To get information in text format:

  1. Construct a request with text set to your question and format set to TEXT.
{
  "text": "Please enter your name",
  "format": "TEXT"
}
  1. Send a POST request to the /v1/device/read-input endpoint.
    The text displays on the device. When the customer enters information, and taps OK, a success message appears.
{
  "response": "Customer Name"
}

See Displaying the welcome screen for instructions to display the default idle screen, or take other appropriate action.


Did this page help you?