{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "eventId": {
      "type": "string"
    },
    "dateTime": {
      "type": "string",
       "format": "yyyy-MM-dd'T'HH:mm:ss.SSSZ"
    },
    "organizationId": {
      "type": "string"
    },
    "correlationId": {
      "type": "string"
    },
    "tenantId": {
      "type": "string"
    },
    "userId": {
      "type": "string"
    },
    "priority": {
      "type": "integer"
    },
    "status": {
      "type": "string"
    },
    "eventSourceId": {
      "type": "string"
    },
    "businessObjects": {
      "type": "object"
    },
    "eventType": {
      "type": "string"
    },
    "operationInstanceId": {
      "type": "string"
    },
    "payload": {
      "type": "object",
      "properties": {
        "commandId": {
          "type": "string"
        },
        "operationInstanceId": {
          "type": "string"
        },
        "sequenceInstanceId": {
          "type": "string"
        },
        "eventType": {
          "type": "string"
        },
        "status": {
          "type": "string"
        },
        "businessObject": {
          "type": "object",
          "properties": {
            "status": {
              "type": "integer"
            },
            "failureMessages": {
              "type": "array",
              "items": {}
            },
            "body": {
  "type" : "object",
  "id" : "urn:jsonschema:com:temenos:microservice:paymentorder:view:PaymentStatus",
  "properties" : {
    "debitAccount" : {
      "type" : "string"
    },
    "paymentId" : {
      "type" : "string"
    },
    "status" : {
      "type" : "string"
    },
    "details" : {
      "type" : "string"
    },
    "paymentMethod" : {
      "type" : "object",
      "id" : "urn:jsonschema:com:temenos:microservice:paymentorder:view:PaymentMethod",
      "properties" : {
        "id" : {
          "type" : "integer"
        },
        "name" : {
          "type" : "string"
        },
        "extensionData" : {
          "type" : "any"
        },
        "card" : {
          "type" : "object",
          "id" : "urn:jsonschema:com:temenos:microservice:paymentorder:view:Card",
          "properties" : {
            "cardid" : {
              "type" : "integer"
            },
            "cardname" : {
              "type" : "string"
            },
            "cardlimit" : {
              "type" : "number"
            }
          }
        }
      }
    },
    "exchangeRates" : {
      "type" : "array",
      "items" : {
        "type" : "object",
        "id" : "urn:jsonschema:com:temenos:microservice:paymentorder:view:ExchangeRate",
        "properties" : {
          "id" : {
            "type" : "integer"
          },
          "name" : {
            "type" : "string"
          },
          "value" : {
            "type" : "number"
          }
        }
      }
    }
  }
},
            "success": {
              "type": "boolean"
            }
          },
          "required": [
            "status",
            "failureMessages",
            "body",
            "success"
          ]
        }
      },
      "required": [
        "commandId",
        "operationInstanceId",
        "sequenceInstanceId",
        "eventType",
        "status",
        "businessObject"
      ]
    },
    "sequenceInstanceId": {
      "type": "string"
    }
  },
  "required": [
     "eventId",
    "organizationId",
    "tenantId",
    "userId",
    "priority",
    "status",
    "eventType",
    "payload"
  ]
}