# Request Signature

This function is used to request a prompt for signature on a UTG or Commerce Engine controlled PIN pad and returns the signature.

Integration Methods:
- Locally Installed UTG
- Commerce Engine For On Premise
- Commerce Engine For Cloud

See the Integration Methods and URLs Section sections of the Development Quick Start guide for details regarding each processing option.

See the JSON Body Schemas for more details on the various JSON body formats.

Endpoint: POST /devices/promptsignature
Version: 1.7.56
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; ^ - ~  , ? “ ” ‘ ’ { } [ ] \ + =
    Example: "2.1"

  - `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; ^ - ~ `  , ? “ ” ‘ ’ { } [ ] \ + =
    Example: "ForwardPOS"

  - `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; ^ - ~ `  , ? “ ” ‘ ’ { } [ ] \ + =
    Example: "PAWS"

  - `AccessToken` (string, required)
    A security credential used to authenticate API requests and all i4Go® 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 request, which generates an Access Token using an authToken and clientGuid.
    Example: "EA79FB05-3AA7-4500-AF9A-73F986FF2C1D"

## Request fields (application/json):

  - `body` (object, required) — one of:
    - Commerce Engine For On Premise:
      - `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"
      - `device` (object)
      - `device.displayText` (string)
        Specifies the text to display on the device.
      - `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"
      - `device.nextStep.header` (object)
      - `device.nextStep.header.value` (string)
        Header text. Add \r\n to force a new line.
        Example: "Header text goes here"
      - `device.nextStep.subHeader` (object)
      - `device.nextStep.subHeader.value` (string)
        Sub Header text. Add \r\n to force a new line.
        Example: "Sub Header text goes here"
      - `device.nextStep.text` (object)
      - `device.nextStep.text.value` (string)
        Body text. Add \r\n to force a new line.
        Example: "Body text goes here"
      - `device.terminalId` (string)
        This field is optional and is for backwards compatibility with existing vendors that are used to processing via UTG controlled devices.

Since Commerce Engine is running directly on the payment device it does not require a device.terminalId to be specified.
    - Commerce Engine For Cloud:
      - `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"
      - `device` (object, required)
        Example: {"cloud":true,"manufacturer":"PAX","serialNumber":"1170301234"}
      - `device.cloud` (boolean, required)
        Indicates the transaction will be processed via the Commerce Engine solution for cloud based POS/PMS systems. Value must be sent as true in order to route the request to the payment device at the merchant location.
        Example: true
      - `device.manufacturer` (string, required)
        Specifies the company which manufactured the device.
        Enum: "Ingenico", "Innowi", "PAX", "Verifone", "Castles", "Miura"
      - `device.serialNumber` (string, required)
        Specifies the serial number of the device.
        Example: "1170301234"
      - `device.displayText` (string)
        Specifies the text to display on the device.
      - `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: same as `device.nextStep.type` in "Commerce Engine For On Premise" (4 values)
      - `device.nextStep.header` (object)
      - `device.nextStep.header.value` (string)
        Header text. Add \r\n to force a new line.
        Example: "Header text goes here"
      - `device.nextStep.subHeader` (object)
      - `device.nextStep.subHeader.value` (string)
        Sub Header text. Add \r\n to force a new line.
        Example: "Sub Header text goes here"
      - `device.nextStep.text` (object)
      - `device.nextStep.text.value` (string)
        Body text. Add \r\n to force a new line.
        Example: "Body text goes here"
    - UTG Controlled Device:
      - `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: "2021-04-15T09:18:23.283-07:00"
      - `device` (object, required)
        Example: {"terminalId":"1742"}
      - `device.terminalId` (string, required)
        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"

## 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

  - `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.

  - `result.server` (object)

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

  - `result.signature` (object)

  - `result.signature.data` (string)
    The base64-encoded data sent when a signature is captured as a Portable Network Graphics (PNG) file.

  - `result.signature.format` (string)
    The data format the signature data will be in. "P" for PNG format.
    Enum: "P"

## 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.

  - `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

  - `result.error.longText` (string)
    Extended error message that is returned if an error condition exists.

  - `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.

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

  - `result.server` (object)

## Response 504 fields (application/json):

  - `result` (array)

  - `result.error` (object)

  - `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.

  - `result.server` (object)


