Collect customer input via the Smart Terminal, such as their phone number.
Request input displays a screen asking the customer to enter information. The value of the input entered by the customer is returned in the Smart Terminal request result. Integrations using webhooks must be subscribed to SMARTTERMINAL_REQUEST, otherwise the result can be fetched via polling.
Customers have the ability to cancel the request by pressing the red X key on the Smart Terminal keypad. In that case, the request will complete without a result.
Parameters
required | name | format | description |
---|---|---|---|
* | terminalId | Numeric | This field points to the specific merchant account which the prompt will be processed through. For example: main location, second location, sales department, etc. Terminal Ids can be fetched using GET /terminals. |
* | type | PHONE | Type of input request. Currently PHONE is the only type supported. |
Input Types
- PHONE: valid US phone number (10 digits)
Example Request
curl https://api.payjunction.com/smartterminals/${smartTerminalId}/request-input \ -u login:password \ -H Accept:application/json \ -H 'X-PJ-Application-Key: ${YOUR_PRODUCTION_APP_KEY}' \ -d terminalId=${terminalId} \ -d type=PHONE
Example Response
HTTP 200 - Successful Request
{ "requestId" : "1223e21e-9e51-484d-9612-30a2570a53d4" }
HTTP 400 - Validation Error
{ "errors" : [ { "message" : "This field is invalid.", "parameter" : "type", "type" : "invalid" } ] }