{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/paypal/json-schema/paypal-event-request-schema.json",
  "title": "EventRequest",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/paypal-events-api-openapi.yml#/components/schemas/EventRequest",
  "allOf": [
    {
      "$ref": "#/$defs/EventBase"
    }
  ],
  "$defs": {
    "DateTimeWithZone": {
      "type": "string",
      "format": "date-time",
      "description": "Date and time in ISO 8601 format."
    },
    "EventBase": {
      "type": "object",
      "properties": {
        "transaction_id": {
          "type": "string",
          "description": "Unique identifier for the transaction associated with the event"
        },
        "external_subscription_id": {
          "type": "string",
          "description": "External subscription ID associated with the event"
        },
        "metric_code": {
          "type": "string",
          "description": "Identifier for the targeted metric. This value must match the `code` property of an active metric; otherwise, it will be disregarded during processing."
        },
        "timestamp": {
          "allOf": [
            {
              "$ref": "#/$defs/DateTimeWithZone"
            }
          ],
          "description": "Timestamp when the event occurred"
        },
        "properties": {
          "type": "object"
        }
      },
      "required": [
        "transaction_id",
        "metric_code",
        "external_subscription_id"
      ]
    }
  }
}