# Display Custom Form

This function is used to display a custom form and text for a consumer’s input on a Commerce Engine or UTG controlled PIN pad.
**Integration Methods:**
- Locally Installed UTG
- Commerce Engine For On Premise
- Commerce Engine For Cloud

See the [Integration Methods](/guides/quickstart#integration-methods) and [URLs Section](/guides/quickstart#urls) sections of the Development Quick Start guide for details regarding each processing option.

Endpoint: POST /devices/processform
Version: 1.7.61
Security: AccessToken

## Header parameters:

  - `InterfaceVersion` (string, required)
    Refers to the version of the program or application that is sending requests to Shift4. The following special characters are not allowed&colon;  $ % &colon; ^ - ~ < > , ? “ ” ‘ ’ { } [ ] \ + =

  - `InterfaceName` (string, required)
    Refers to the name of the program or application that is sending requests to Shift4. This should be the name of the program that you purchased or created. The following special characters are not allowed&colon;  $ % &colon; ^ - ~ ` < > , ? “ ” ‘ ’ { } [ ] \ + =

  - `CompanyName` (string, required)
    Refers to the vendor or partner that designed and certified the interface. The information you use in this field should match what Shift4 has on file or what was agreed upon in your Integration Plan. The following special characters are not allowed&colon;  $ % &colon; ^ - ~ ` < > , ? “ ” ‘ ’ { } [ ] \ + =

  - `AccessToken` (string, required)
    A security credential used to authenticate API requests and all [i4Go®](https://s4-myportal.s3.amazonaws.com/downloads/documentation/i4go/i4go%20technical%20reference%20guide.pdf) authorizeClient/preauthorizeClient requests. An Access Token is the alias for the merchant account and interface being used. The Access Token is required in all requests except an [Access Token Exchange](/apis/payments-platform-rest/openapi/credentials/accesstokenexchange) request, which generates an Access Token using an `authToken` and `clientGuid`.

## Request fields (application/json):

  - `dateTime` (string, required)
    The date and time in ISO 8601 format including the timezone offset (yyyy-mm-ddThh:mm:ss.nnn+hh:mm).
Must be sent as the local date/time of the merchant. For example, a request processed at a merchant in the Pacific time zone at 9:18am on April 15th 2021 would be sent as 2021-04-15T09:18:23.283-07:00
    Example: 2024-05-21T09:18:23.283-07:00

  - `form` (any, required)

  - `form.type` (string, required)
    Displays a form with header text, subheader text, scrolling body text and up to 4 buttons.
When using this custom form type at least one of the following fields must also be included in the request:
- `form.header`
- `form.subHeader`
- `form.text`
    Enum: "multiButtonScrollingText"

  - `form.header` (object)

  - `form.header.value` (string)
    Header text. Add `\r\n` to force a new line.
    Example: Header text goes here

  - `form.subHeader` (object)

  - `form.subHeader.value` (string)
    Sub Header text. Add `\r\n` to force a new line.
    Example: Sub Header text goes here

  - `form.text` (object)

  - `form.text.value` (string)
    Body text. Add `\r\n` to force a new line.
    Example: Body text goes here

  - `form.buttons` (array, required)
    Array of 1 - 4 buttons to be displayed on the device.
    Example: [{"id":"1","text":"Accept"},{"id":"2","text":"Decline"}]

  - `form.buttons.id` (string, required)
    ID value used to identify which button is pressed.
The ID of the button the user selected is returned in the `result.form.buttonSelected.id` response field.

  - `form.buttons.text` (string, required)
    Text to display on the button.
The text of the button the user selected is returned in the `result.form.buttonSelected.text` response field.

  - `form.timeout` (number)
    The number of seconds until the custom form will timeout. Defaults to 120 seconds if `form.timeout` is not sent in the request.
    Example: 120

  - `form.type` (string, required)
    Displays a message based form with header text, subheader text, and body text.
When using this custom form type at least one of the following fields must also be included in the request:
- `form.header`
- `form.subHeader`
- `form.text`
    Enum: "message"

  - `form.type` (string, required)
    Displays a QR code based form with header text, a QR code image and footer text.
    Enum: "qrDisplay"

  - `form.qrCode` (object, required)

  - `form.qrCode.value` (string)
    Contains the QR Code URL string. This value will be converted to a QR code and displayed on the device.
    Example: www.shift4.com

  - `form.footer` (object)

  - `form.footer.value` (string)
    Footer text. Add `\r\n` to force a new line.
    Example: Footer text goes here

  - `device` (object)

  - `device.nextStep` (object)
    An optional object used to control the device behavior after processing the request. If included in the request, the `type` sub-field is required

  - `device.nextStep.type` (string)
    Determines the device behavior after processing the request. If no additional request is received after 120 seconds the device will return to idle as a failsafe.
| Value | Description |
|  --- | --- |
| idle | Return back to the idle screen |
| none | Stay on the same screen. A subsequent message must be immediately sent or else the device will appear frozen to the user. |
| displayWait | Displays a please wait screen |
| displayText | Displays custom text. The request must include at least one of the following fields: `device.nextStep.header.value`, `device.nextStep.subHeader.value` or `device.nextStep.text.value`. |
    Enum: "idle", "none", "displayWait", "displayText"

  - `ui` (object)

  - `ui.language` (string)
    ISO 639-1 2-letter language code specifying the UI display language for the transaction (e.g. "en", "fr", "de"). When provided, overrides the device's configured default language for the duration of the session. Value persists across transactions until a new value is passed. Send default to reset the device back to its default language.
    Example: en

  - `ui.mode` (string)
    Set the UI to light mode by sending `light` or dark mode by sending `dark`
    Enum: "light", "dark"

## Response 200 fields (application/json):

  - `result` (array)

  - `result.dateTime` (string)
    The date and time in ISO 8601 format including the timezone offset (yyyy-mm-ddThh:mm:ss.nnn+hh:mm).
Must be sent as the local date/time of the merchant. For example, a request processed at a merchant in the Pacific time zone at 9:18am on April 15th 2021 would be sent as 2021-04-15T09:18:23.283-07:00
    Example: 2024-05-21T09:18:23.283-07:00

  - `result.device` (object)

  - `result.device.terminalId` (string)
    To prompt a specific UTG-controlled PIN pad in a request, the API Terminal ID configured in UTG TuneUp must be specified in this field.
    Example: 1742

  - `result.device.form` (object)

  - `result.device.form.name` (string)
    Specifies a 12-character, alphanumeric string containing the form name to display on a UTG-controlled PIN pad. The file extension should not be included in the value.
    Example: PF2

  - `result.device.form.result` (string)
    A five-character, alphanumeric string containing the ID of the button pressed by the consumer on a UTG-controlled PIN pad.
    Example: 87

  - `result.server` (object)

  - `result.server.name` (string)
    The name of the server that processed the request.
    Example: TM01CE

## Response 400 fields (application/json):

  - `result` (array)

  - `result.error` (object)

  - `result.error.code` (integer)
    Code indicating the type of error that occurred. Refer to the [Error Codes](/guides/appendices/error-codes) section of this document for more details.
**Note: This is currently only supported for European merchant processing.**
    Example: 64100

  - `result.error.severity` (string)
    Severity level of the error.
| Severity | Description |
|  --- | --- |
| Info | Action not required - Data input/formatting is incorrect |
| Error | Action may be required - Communication, timeout or network issue |
| Alert | Action required - System issue |
    Enum: "Info", "Error", "Alert"

  - `result.error.shortText` (string)
    Abbreviated error message that is always returned if an error condition exists
    Example: NOT IN CARDRANGE

  - `result.error.longText` (string)
    Extended error message that is returned if an error condition exists.
    Example: Card type not recognized

  - `result.error.primaryCode` (integer)
    Code indicating the type of error that occurred. Refer to the [Error Codes](/guides/appendices/error-codes) section of this document for more details.
    Example: 9842

  - `result.error.secondaryCode` (integer)
    This code supplements the code specified in the `error.primaryCode` field to provide additional information about the error that occurred.
    Example: 0

  - `result.server` (object)

  - `result.server.name` (string)
    The name of the server that processed the request.
    Example: TM01CE

## Response 504 fields (application/json):

  - `result` (array)

  - `result.error` (object)

  - `result.error.code` (integer)
    Code indicating the type of error that occurred. Refer to the [Error Codes](/guides/appendices/error-codes) section of this document for more details.
**Note: This is currently only supported for European merchant processing.**
    Example: 64100

  - `result.error.severity` (string)
    Severity level of the error.
| Severity | Description |
|  --- | --- |
| Info | Action not required - Data input/formatting is incorrect |
| Error | Action may be required - Communication, timeout or network issue |
| Alert | Action required - System issue |
    Enum: "Info", "Error", "Alert"

  - `result.error.shortText` (string)
    Abbreviated error message that is always returned if an error condition exists
    Example: NOT IN CARDRANGE

  - `result.error.longText` (string)
    Extended error message that is returned if an error condition exists.
    Example: Card type not recognized

  - `result.error.primaryCode` (integer)
    Code indicating the type of error that occurred. Refer to the [Error Codes](/guides/appendices/error-codes) section of this document for more details.
    Example: 9842

  - `result.error.secondaryCode` (integer)
    This code supplements the code specified in the `error.primaryCode` field to provide additional information about the error that occurred.
    Example: 0

  - `result.lighthouse` (object)

  - `result.lighthouse.data` (string)
    Base64 encoded JSON formatted data that will be returned from Lighthouse to be passed back to SkyTab. This data will contain variable information.
    Example: eyJwYXltZW50SWQiOiI4NWM0MWNhNy01NzVjLTQzNGUtODIyZi0xYzZlOTE0ZDAzODYiLCJyZW1haW5pbmdBbW91bnQiOjB9

  - `result.server` (object)

  - `result.server.name` (string)
    The name of the server that processed the request.
    Example: TM01CE

