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 show a custom question and get the response.

📘

NOTE

If you need the customer to accept or reject 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

If your needed information is a month and year (for example, if asking for age verification), complete the following steps.

  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. Be sure to include the required headers for the request you are making.

The message is shown on the device. When the customer enters their information and taps OK, a success message is returned.

{
  "response": "1277"
}

Collecting a phone number

If you want to collect the customer's phone number, complete the following steps.

  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 message is shown on the device. When the customer enters their information and taps OK, a success message is returned.

{
  "response": "17725559392"
}

Collecting a customer-entered amount

If you want the customer to provide a number (for example, to confirm the number of items being ordered), complete the following steps.

  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 message is shown on the device. When the customer enters their information and taps OK, a success message is returned.

{
  "response": "3"
}

Collecting customer-provided text

If you want the customer to provide information in text format, complete the following steps.

  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 message is shown on the device. When the customer enters their information and taps OK, a success message is returned.

{
  "response": "Customer Name"
}

See Showing the welcome screen for instructions on displaying the default idle screen, or take the action that is appropriate for your situation.


Did this page help you?