{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/sezzle/main/json-schema/webhook.json",
  "title": "Webhook",
  "description": "A Sezzle webhook subscription configuration.",
  "type": "object",
  "required": ["url"],
  "properties": {
    "url": {
      "type": "string",
      "format": "uri",
      "description": "HTTPS endpoint to deliver webhook payloads to."
    },
    "events": {
      "type": "array",
      "description": "List of event types to subscribe to.",
      "items": {
        "type": "string",
        "enum": [
          "customer.tokenized",
          "order.authorized",
          "order.captured",
          "order.refunded"
        ]
      }
    }
  }
}
