getUserInput
The getUserInput method prompts the user for a numeric or alphanumeric input on the payment terminal. This is typically used to collect an ID, amount, or any free-form entry required for the transaction or flow.
See also the abortGetUserInput method to cancel a pending input request.
Request
JSON-RPC 2.0All methods in TweezerComm follow a JSON-RPC 2.0 structure. See Get Startedfor more details on how the requests are structured and sent.
To invoke this method, set the method field to getUserInput, and include the service name and parameters as shown below.
{
"jsonrpc":"2.0",
"method":"getUserInput",
"id":"1234567890",
"params": [
"device",{
"title": "Main-Title",
"subtitle": "Sub-Ttitle",
"type": "numeric",
"minLength": 2,
"maxLength": 10,
"timeout": 5
}
]
}Request Parameters
The table below describes the parameters of the request:
| Parameter | Type | Description |
|---|---|---|
title | string | The main title is displayed to the user. |
subtitle | string | Subtitle is displayed below the title. |
type | string | Type of input (numeric or alphanumeric). |
minLength | int | Minimum number of characters allowed. |
maxLength | int | Maximum number of characters allowed. |
timeout | int | Timeout in seconds before the request expires. |
Response
A successful request will return the following response:
{
"jsonrpc": "2.0",
"id": "1234567890",
"result": {
"statusCode": 0,
"data": "12456"
}
}Response Parameters
The table below describes the response parameters for this method:
| Parameter | Type | Description |
|---|---|---|
retailerNumber | string | Retailer identifier. |
nayaxSN | string | Nayax serial number. |
isActiveDes | string | Activation status. |
emvConfigFileId | int | EMV configuration file ID. |
emvProvider | int | EMV provider ID. |
paymentMethods | string | Enabled payment method codes. |
cibusEnabled | string | Cibus support status. |
cibusRestaurantId | int | Cibus restaurant ID. |
cibusPosId | int | Cibus POS ID. |
multipassEnabled | string | Multipass support status. |
multipassPosId | int | Multipass POS ID. |
Updated about 1 month ago