{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://weverlabs.com/schemas/provider-webhook-verification.schema.json",
  "title": "Provider Webhook Verification",
  "description": "Normalized record for verifying provider webhook events before credit funding and settlement receipt issuance.",
  "type": "object",
  "required": [
    "verification_id",
    "provider_id",
    "event_id",
    "signature_status",
    "verification_state",
    "verified_at"
  ],
  "additionalProperties": true,
  "properties": {
    "verification_id": {
      "type": "string"
    },
    "provider_id": {
      "type": "string"
    },
    "event_id": {
      "type": "string"
    },
    "event_type": {
      "type": "string"
    },
    "signature_status": {
      "type": "string",
      "enum": [
        "valid",
        "invalid",
        "missing",
        "not_required"
      ]
    },
    "idempotency_key": {
      "type": "string"
    },
    "received_at": {
      "type": "string",
      "format": "date-time"
    },
    "verified_at": {
      "type": "string",
      "format": "date-time"
    },
    "verification_state": {
      "type": "string",
      "enum": [
        "verified",
        "rejected",
        "duplicate",
        "manual_review"
      ]
    },
    "provider_reference": {
      "type": "string"
    },
    "raw_event_hash": {
      "type": "string"
    },
    "normalized_payload": {
      "type": "object"
    }
  }
}