> For the complete documentation index, see [llms.txt](https://docs.sensepass.com/sensepay/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sensepass.com/sensepay/transaction-api/other-flows/customer-input.md).

# Customer Input

API for retrieving input from consumer using SensePass Tags and EMV devices.

### API Interface

## Get customer input

<mark style="color:green;">`POST`</mark> `https://api.sensepass.com/api/transactions/customer-input`

For terminal agent invoke use this endpoint: <http://localhost:8003/api/transactions/customer-input>

#### Request Body

| Name                                       | Type   | Description                                                                               |
| ------------------------------------------ | ------ | ----------------------------------------------------------------------------------------- |
| deviceId<mark style="color:red;">\*</mark> | string | unique device ID provided by SensePass                                                    |
| inputs<mark style="color:red;">\*</mark>   | array  | Array of [Customer Input Model](/sensepay/transaction-api/models/customer-input-model.md) |

{% tabs %}
{% tab title="200: OK OK" %}
**See Transactions entity schema:** [Transaction Model](/sensepay/transaction-api/models/transaction-model.md#transaction-entity)

```javascript
{
  "success": true,
  "error": null,
  "results": [
    {
      "type": "email",
      "question": "Please input your email address",
      "input": "a@b.com"
    },
    {
      "type": "phone",
      "minimumLength": 10,
      "question": "Please input your phone number",
      "input": "1234567890"
    }
  ]
}    
```

{% endtab %}

{% tab title="400: Bad Request Invalid Input" %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="500: Internal Server Error Internal Error" %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

###

### Example - Simple Questions

```json
{
  "deviceId": "Your-Device-ID",
  "inputs": [
    {
      "type": "email",
      "question": "Please input your email address"
    },
    {
      "type": "phone",
      "minimumLength": 10,
      "question": "Please input your phone number"
    }
  ]
}
```

### Example - Yes/No Questions

```json
{
  "deviceId": "Your-Device-ID",
  "inputs": [
    {
      "type": "boolean",
      "question": "Please verify your email address is a@b.c",
      "acceptText": "Yes",
      "rejectText": "No"
    }
  ]
}
```

### Clear all questions on device

## Clear customer input

<mark style="color:green;">`POST`</mark> `https://api.sensepass.com/api/transactions/customer-input/reset`

For terminal agent invoke use this endpoint:&#x20;

<http://localhost:8003/api/transactions/customer-input/reset>

#### Request Body

| Name                                       | Type   | Description                            |
| ------------------------------------------ | ------ | -------------------------------------- |
| deviceId<mark style="color:red;">\*</mark> | string | unique device ID provided by SensePass |

{% tabs %}
{% tab title="200: OK OK" %}

```javascript
{
}
```

{% endtab %}

{% tab title="400: Bad Request Invalid Input" %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="500: Internal Server Error Internal Error" %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

###


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.sensepass.com/sensepay/transaction-api/other-flows/customer-input.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
