{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Request Message for 'signatureVerificationRequest'",
  "description": "Request to the EPoS to confirm whether the signature has been accepted or not in a transaction that requires signature verification. This request must be replied to within a set period of time defined by the timeout property. If no reply to this request is received (i.e. no confirmation of acceptance), the signature will automatically be accepted. Only the merchant receipt (that requires the signature) will be provided in this request. The PerformTransaction response should be relied upon for the outcome of the transaction as usual.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "jsonrpc",
    "id",
    "method",
    "params"
  ],
  "properties": {
    "jsonrpc": {
      "title": "JSON-RPC Version Number",
      "description": "Identifies the JSON Remote Protocol version that this message uses.",
      "type": "string",
      "enum": [
        "2.0"
      ],
      "default": "2.0"
    },
    "id": {
      "title": "JSON-RPC2 Message ID",
      "description": "Used to identify this request message. The same id will be used in the response message so that the response can be matched with the request.",
      "type": "integer",
      "maximum": 999999,
      "minimum": 0
    },
    "method": {
      "type": "string",
      "enum": [
        "signatureVerificationRequest"
      ]
    },
    "params": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "timeout",
        "tid",
        "receiptLines",
        "authCode",
        "applicationId",
        "applicationLabel",
        "cardholderVerificationMethod",
        "paymentMethod",
        "primaryAccountNumber",
        "transactionType"
      ],
      "properties": {
        "applicationId": {
          "type": "string",
          "default": ""
        },
        "applicationLabel": {
          "type": "string",
          "default": ""
        },
        "authCode": {
          "type": "string",
          "default": ""
        },
        "paymentMethod": {
          "title": "paymentMethod",
          "description": "Method by which the card details have been read from the payment medium.",
          "type": "string",
          "default": "UNKNOWN",
          "enum": [
            "UNKNOWN",
            "KEYED",
            "SWIPED",
            "ICC_CHIP",
            "CONTACTLESS"
          ]
        },
        "primaryAccountNumber": {
          "type": "string",
          "default": ""
        },
        "cardholderVerificationMethod": {
          "title": "cardholderVerificationMethod",
          "description": "Method used to verify that the person presenting the card is the legitimate cardholder.",
          "type": "string",
          "default": "NONE",
          "enum": [
            "UNKNOWN",
            "NONE",
            "PIN",
            "SIGNATURE",
            "DEVICE"
          ]
        },
        "transactionType": {
          "title": "transactionType",
          "description": "Type of the transaction.",
          "type": "string",
          "enum": [
            "LOGON",
            "REFUND",
            "REFUND_REVERSAL",
            "SALE",
            "SALE_REVERSAL",
            "PRE_AUTH",
            "COMPLETION",
            "ACCOUNT_VERIFICATION"
          ]
        },
        "timeout": {
          "title": "Request Timeout ",
          "description": "The amount of time in seconds this request will wait for a response before timing out.",
          "type": "integer",
          "minimum": 0
        },
        "tid": {
          "title": "Terminal Identifier (TID)",
          "description": "The identifier for a terminal.",
          "type": "string",
          "default": "N/A"
        },
        "receiptLines": {
          "title": "Transaction Receipt(s)",
          "description": "The receipt(s) from the transaction. The receipts can come in the form of a 'MERCHANT' receipt and/or a 'CUSTOMER' receipt. The combination of receipts provided depends on the request taking place.",
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "MERCHANT": {
              "title": "Receipt Lines",
              "description": "A receipt from the terminal defined by an ordered array of Receipt Line objects.",
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "title": "Text Receipt Line",
                    "description": "A receipt line containing text that has optional formatting.",
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "value",
                      "type"
                    ],
                    "properties": {
                      "value": {
                        "title": "Value of Receipt Line",
                        "description": "This is the text to be printed for this line. The string can only contain ASCII characters 0x20-0x7E (inclusive), 0x80 (Euro Symbol) and 0xA3 (Pound Symbol). The maxLength of this string depends on the formatting options used.",
                        "type": "string",
                        "default": "",
                        "maxLength": 24
                      },
                      "type": {
                        "title": "Type of Receipt Line",
                        "description": "Defines the type of the receipt line to be text.",
                        "type": "string",
                        "enum": [
                          "TEXT"
                        ]
                      },
                      "format": {
                        "title": "Formatting of Receipt Line",
                        "description": "Optional formatting for the printed text. If using DOUBLE_WIDTH the maximum length of the text reduces to 12 characters.",
                        "type": "array",
                        "maxItems": 3,
                        "items": {
                          "type": "string",
                          "enum": [
                            "BOLD",
                            "DOUBLE_HEIGHT",
                            "DOUBLE_WIDTH"
                          ]
                        }
                      }
                    }
                  },
                  {
                    "title": "Graphic Receipt Line",
                    "description": "A receipt line containing a graphic.",
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "value",
                      "type"
                    ],
                    "properties": {
                      "value": {
                        "title": "Value of Receipt Line",
                        "description": "If this is a receipt from a terminal, this will contain the text equivalent of the printed graphic object. If this is a receipt to be printed on a terminal, then this property must be an empty string.",
                        "type": "string",
                        "default": ""
                      },
                      "type": {
                        "title": "Type of Graphic",
                        "description": "Defines the type of graphic to be printed.",
                        "type": "string",
                        "enum": [
                          "CARRIAGE_RETURN",
                          "LINE_SEPARATOR_DOUBLE",
                          "LINE_SEPARATOR_SINGLE",
                          "TICKET_FEED"
                        ]
                      },
                      "format": {
                        "title": "Formatting of Receipt Line",
                        "description": "This property has no effect on this type of receipt line, which is why it is an optional parameter and when it is defined it is an empty list.",
                        "type": "array",
                        "maxItems": 0,
                        "items": {}
                      }
                    }
                  }
                ]
              }
            },
            "CUSTOMER": {
              "title": "Receipt Lines",
              "description": "A receipt from the terminal defined by an ordered array of Receipt Line objects.",
              "type": "array",
              "items": {
                "anyOf": [
                  {
                    "title": "Text Receipt Line",
                    "description": "A receipt line containing text that has optional formatting.",
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "value",
                      "type"
                    ],
                    "properties": {
                      "value": {
                        "title": "Value of Receipt Line",
                        "description": "This is the text to be printed for this line. The string can only contain ASCII characters 0x20-0x7E (inclusive), 0x80 (Euro Symbol) and 0xA3 (Pound Symbol). The maxLength of this string depends on the formatting options used.",
                        "type": "string",
                        "default": "",
                        "maxLength": 24
                      },
                      "type": {
                        "title": "Type of Receipt Line",
                        "description": "Defines the type of the receipt line to be text.",
                        "type": "string",
                        "enum": [
                          "TEXT"
                        ]
                      },
                      "format": {
                        "title": "Formatting of Receipt Line",
                        "description": "Optional formatting for the printed text. If using DOUBLE_WIDTH the maximum length of the text reduces to 12 characters.",
                        "type": "array",
                        "maxItems": 3,
                        "items": {
                          "type": "string",
                          "enum": [
                            "BOLD",
                            "DOUBLE_HEIGHT",
                            "DOUBLE_WIDTH"
                          ]
                        }
                      }
                    }
                  },
                  {
                    "title": "Graphic Receipt Line",
                    "description": "A receipt line containing a graphic.",
                    "type": "object",
                    "additionalProperties": false,
                    "required": [
                      "value",
                      "type"
                    ],
                    "properties": {
                      "value": {
                        "title": "Value of Receipt Line",
                        "description": "If this is a receipt from a terminal, this will contain the text equivalent of the printed graphic object. If this is a receipt to be printed on a terminal, then this property must be an empty string.",
                        "type": "string",
                        "default": ""
                      },
                      "type": {
                        "title": "Type of Graphic",
                        "description": "Defines the type of graphic to be printed.",
                        "type": "string",
                        "enum": [
                          "CARRIAGE_RETURN",
                          "LINE_SEPARATOR_DOUBLE",
                          "LINE_SEPARATOR_SINGLE",
                          "TICKET_FEED"
                        ]
                      },
                      "format": {
                        "title": "Formatting of Receipt Line",
                        "description": "This property has no effect on this type of receipt line, which is why it is an optional parameter and when it is defined it is an empty list.",
                        "type": "array",
                        "maxItems": 0,
                        "items": {}
                      }
                    }
                  }
                ]
              }
            }
          }
        }
      }
    }
  }
}