{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.fideliyapass.com/schemas/webhooks/2026-11/envelope.json",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^evt_[0-9A-HJKMNP-TV-Z]{26}$",
      "description": "The event id: the same on every attempt and resend. De-duplicate on it."
    },
    "type": {
      "type": "string",
      "enum": [
        "pass.created",
        "customer.created",
        "scan.recorded",
        "scan.voided",
        "milestone.reached",
        "referral.completed",
        "gift_card.sent",
        "gift_card.spent",
        "subscription.created",
        "subscription.cancelled",
        "webhook.test",
        "webhook.ping"
      ]
    },
    "api_version": {
      "type": "string",
      "const": "2026-11"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
    },
    "livemode": {
      "type": "boolean",
      "description": "False for test events."
    },
    "business_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "description": "The business the event belongs to; null for account events."
    },
    "data": {
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {}
    }
  },
  "required": [
    "id",
    "type",
    "api_version",
    "created_at",
    "livemode",
    "business_id",
    "data"
  ],
  "description": "Every v2 delivery body. `data` is described by the schema named by `type`."
}
