{
  "anyOf": [
    {
      "type": "object",
      "properties": {
        "action": { "type": "string", "const": "APPLEPAY_onvalidatemerchant" },
        "validationURL": { "type": "string" },
        "domain": { "type": "string" },
        "merchantIdentifier": { "type": "string" },
        "merchantName": { "type": "string" }
      },
      "required": ["action", "validationURL", "domain", "merchantIdentifier", "merchantName"],
      "additionalProperties": true
    },
    {
      "type": "object",
      "properties": {
        "action": { "type": "string", "const": "checkBalance" },
        "paymentMethod": { "type": "object", "additionalProperties": { "type": "string" } }
      },
      "required": ["action", "paymentMethod"],
      "additionalProperties": true
    },
    {
      "type": "object",
      "properties": { "action": { "type": "string", "const": "createOrder" } },
      "required": ["action"],
      "additionalProperties": true
    },
    {
      "type": "object",
      "properties": {
        "action": { "type": "string", "const": "cancelOrder" },
        "orderData": { "type": "string" },
        "pspReference": { "type": "string" }
      },
      "required": ["action", "orderData", "pspReference"],
      "additionalProperties": true
    }
  ],
  "$schema": "http://json-schema.org/draft-07/schema#"
}
