{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "title": "Notification Message for 'terminalNotification'",
  "description": "A notification providing the current state of the transaction being processed on the terminal with the stated TID.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "jsonrpc",
    "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"
    },
    "method": {
      "type": "string",
      "enum": [
        "terminalNotification"
      ]
    },
    "params": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "notificationValue",
        "tid"
      ],
      "properties": {
        "notificationValue": {
          "title": "Transaction Notification Value",
          "description": "The current state of an in progress transaction.",
          "type": "string",
          "enum": [
            "APPROVED",
            "ATTEMPTING_CANCEL",
            "BAD_SWIPE",
            "CANCELLING",
            "CARD_ERROR",
            "CARD_EXPIRED",
            "CARD_NOT_SUPPORTED",
            "CONNECTING",
            "CONNECTION_MADE",
            "DECLINED",
            "DECLINED_BY_CARD",
            "INSERT_CARD",
            "PIN_ENTRY",
            "PLEASE_WAIT",
            "PRESENT_CARD",
            "PRESENT_ONLY_ONE_CARD",
            "PROCESSING_ERROR",
            "REMOVE_CARD",
            "RETRYING",
            "REQUEST_SENT",
            "RE_PRESENT_CARD",
            "SIGNATURE_VERIFICATION",
            "SIGNATURE_VERIFICATION_PROCESS_COMPLETED",
            "SIGNATURE_VERIFICATION_PROCESS_COULD_NOT_BE_COMPLETED",
            "SIGNATURE_VERIFICATION_IN_PROGRESS",
            "SIGNATURE_VERIFICATION_TIMEOUT",
            "TRANSACTION_FINISHED",
            "TRANSACTION_STARTED",
            "UNABLE_TO_CANCEL"
          ]
        },
        "tid": {
          "title": "Terminal Identifier (TID)",
          "description": "The identifier for a terminal.",
          "type": "string",
          "default": "N/A"
        }
      }
    }
  }
}