Initiate a new prompt request on the selected Smart Terminal.
Prompt requests display text and up to three buttons on the selected Smart Terminal. The label text of the button selected by the user 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.
- Send a prompt request to the smart terminal as a POST to /smartterminals/ {smartTerminalId}/request-prompt
- { smartTerminalId } is the UUID of a specific Smart Terminal you are requesting to display a prompt. Example: 88888888-4444-4444-4444-cccccccccccc
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 locatoin, sales department, etc. Terminal Ids can be fetched using GET /terminals. |
* | text | Max Length 10,000 | String of text that will be shown on Smart Terminal. The string is interpreted as plain text. Use "\n" to display a new line. |
* | buttons[] |
Multiple Strings Max 3 Strings Max Length 8 for each string |
Label for each button displayed on the screen. Buttons are displayed in the order they're defined. |
Example Request
curl https://api.payjunction.com/smartterminals/${smartTerminalId}/request-prompt \ -u login:password \ -H Accept:application/json \ -H 'X-PJ-Application-Key: ${YOUR_PRODUCTION_APP_KEY}' \ -d terminalId=${terminalId} \ -d text="Do you agree to the terms of service?" \ -d buttons[]=Yes \ -d buttons[]=No \ -d buttons[]=Maybe
Example Response
HTTP 200 - Successful Request
{ "requestId" : "1223e21e-9e51-484d-9612-30a2570a53d4" }
HTTP 400 - Validation Error
{ "errors" : [ { "message" : "size must be between 1 and 3", "parameter" : "buttons", "type" : "invalid" }, { "message" : "size must be between 1 and 8", "parameter" : "buttons[0].<list element>", "type" : "invalid" } ]
}