{
  "taxonomy_version": "1.0.0",
  "status": "published",
  "published_at": "2026-06-11T14:07:27.117295+00:00",
  "notes": [
    "PUBLISHED 1.0.0 (2026-06-11) \u2014 IMMUTABLE. Any change to event definitions requires a new version file; editing this one is a violation. Content hash recorded in gates.md and shown on the public spec page.",
    "Seeded from services/payment_assurance.py failure codes per Gate 0->1 amendment (c); each event's seeded_from records that lineage. Every definition was reviewed against the plan spec before inclusion.",
    "Buyer-claimable set per 2026-06-10 amendment: NON_DELIVERY, MALFORMED_RESPONSE, LATENCY_BREACH, OVERCHARGE, DUPLICATE_CHARGE, SILENT_FAILURE. SETTLEMENT_FAILURE is recorded but never claimable.",
    "Amendment (d): LATENCY_BREACH is claimable only when the endpoint has a declared SLA (claimable_condition). No declared SLA => not claimable for that endpoint.",
    "Amounts are USDC atomic units (6 decimals) unless a field name says otherwise."
  ],
  "events": [
    {
      "id": "NON_DELIVERY",
      "title": "Payment settled, no response returned",
      "claimable": true,
      "claimable_condition": null,
      "severity": "critical",
      "detection": {
        "rule": "settlement_success is true for the receipt AND response_hash is null after the delivery timeout",
        "auto_confidence": "deterministic",
        "inputs": [
          "receipt.settlement_tx_hash",
          "receipt.response_hash",
          "receipt.timestamp_request",
          "delivery_timeout"
        ]
      },
      "required_evidence": [
        "settlement_tx_hash",
        "receipt_id",
        "timestamp_request",
        "absence_of_response_hash"
      ],
      "default_resolution": "refund",
      "seeded_from": [
        "payment_assurance.delivery.status:not_observed",
        "payment_assurance.recourse:refund_request"
      ]
    },
    {
      "id": "MALFORMED_RESPONSE",
      "title": "Response fails the endpoint's declared schema",
      "claimable": true,
      "claimable_condition": "declared_schema_present",
      "severity": "high",
      "detection": {
        "rule": "response body fails validation against the schema identified by receipt.declared_schema_hash (invalid JSON, missing required keys, or type mismatch)",
        "auto_confidence": "deterministic",
        "inputs": [
          "receipt.declared_schema_hash",
          "response_body_or_hash",
          "schema_validation_result"
        ]
      },
      "required_evidence": [
        "receipt_id",
        "response_hash",
        "declared_schema_hash",
        "validation_failure_detail"
      ],
      "default_resolution": "refund",
      "seeded_from": [
        "payment_assurance.failure_code:invalid_json",
        "payment_assurance.failure_code:missing_required_keys"
      ]
    },
    {
      "id": "LATENCY_BREACH",
      "title": "Response exceeds the endpoint's declared SLA",
      "claimable": true,
      "claimable_condition": "declared_sla_present",
      "severity": "medium",
      "detection": {
        "rule": "(timestamp_response - timestamp_request) exceeds receipt.declared_sla.max_latency_ms",
        "auto_confidence": "deterministic",
        "inputs": [
          "receipt.timestamp_request",
          "receipt.timestamp_response",
          "receipt.declared_sla"
        ]
      },
      "required_evidence": [
        "receipt_id",
        "timestamp_request",
        "timestamp_response",
        "declared_sla"
      ],
      "default_resolution": "refund",
      "seeded_from": []
    },
    {
      "id": "OVERCHARGE",
      "title": "Settled amount exceeds quoted amount",
      "claimable": true,
      "claimable_condition": null,
      "severity": "high",
      "detection": {
        "rule": "receipt.settled_amount > receipt.quote_amount for the same settlement",
        "auto_confidence": "deterministic",
        "inputs": [
          "receipt.quote_amount",
          "receipt.settled_amount",
          "receipt.settlement_tx_hash"
        ]
      },
      "required_evidence": [
        "receipt_id",
        "quote_amount",
        "settled_amount",
        "settlement_tx_hash"
      ],
      "default_resolution": "refund",
      "seeded_from": []
    },
    {
      "id": "DUPLICATE_CHARGE",
      "title": "Multiple settlements for one request",
      "claimable": true,
      "claimable_condition": null,
      "severity": "high",
      "detection": {
        "rule": "more than one settlement_tx_hash maps to the same request (same receipt_id / payment_payload hash)",
        "auto_confidence": "deterministic",
        "inputs": [
          "receipt.receipt_id",
          "receipt.payment_payload_sha256",
          "settlement_tx_hashes"
        ]
      },
      "required_evidence": [
        "receipt_id",
        "all_settlement_tx_hashes"
      ],
      "default_resolution": "refund",
      "seeded_from": []
    },
    {
      "id": "SILENT_FAILURE",
      "title": "HTTP 200 with error payload or empty body",
      "claimable": true,
      "claimable_condition": null,
      "severity": "medium",
      "detection": {
        "rule": "HTTP status is 2xx but the body is empty, an error envelope, or otherwise fails the content heuristic plus schema check; lowest auto-confidence in the taxonomy",
        "auto_confidence": "heuristic",
        "inputs": [
          "http_status",
          "response_hash",
          "response_body",
          "schema_validation_result"
        ]
      },
      "required_evidence": [
        "receipt_id",
        "response_hash",
        "http_status",
        "heuristic_detail"
      ],
      "default_resolution": "manual_review",
      "seeded_from": [
        "payment_assurance.failure_code:http_status",
        "payment_assurance.delivery.status:degraded"
      ]
    },
    {
      "id": "SETTLEMENT_FAILURE",
      "title": "Settlement fails after successful delivery; buyer not charged",
      "claimable": false,
      "claimable_condition": null,
      "severity": "low",
      "detection": {
        "rule": "receipt.settlement_success is false AND response_hash is present (the handler did the work; the x402 middleware returned 402 to the buyer and no USDC moved)",
        "auto_confidence": "deterministic",
        "inputs": [
          "receipt.settlement_success",
          "receipt.settlement_error_reason",
          "receipt.response_hash"
        ]
      },
      "required_evidence": [
        "receipt_id",
        "settlement_error_reason",
        "response_hash"
      ],
      "default_resolution": "record_only",
      "seeded_from": [
        "spike-settlement-capture finding #2"
      ]
    }
  ]
}
