{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nsgoods-org/json-schema/nsgoods-org-payability-result-schema.json",
  "title": "PayabilityResult",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/payable-nsgoods-org-openapi.json#/components/schemas/PayabilityResult",
  "properties": {
    "accepts_wellformed": {
      "type": "boolean"
    },
    "checked_at": {
      "format": "date-time",
      "type": "string"
    },
    "disclaimer": {
      "type": "string"
    },
    "observatory": {
      "description": "paid only; present when the observatory has prior data for the resource",
      "properties": {
        "first_seen": {
          "type": "string"
        },
        "last_change_at": {
          "type": [
            "string",
            "null"
          ]
        },
        "scans": {
          "type": "integer"
        },
        "verdict_now_vs_history": {
          "enum": [
            "stable",
            "changed"
          ],
          "type": "string"
        }
      },
      "type": "object"
    },
    "options": {
      "items": {
        "properties": {
          "detail": {
            "type": "object"
          },
          "network": {
            "type": "string"
          },
          "pay_to": {
            "type": "string"
          },
          "remediation": {
            "description": "present only on a failing option",
            "type": "object"
          },
          "verdict": {
            "enum": [
              "PAYABLE",
              "ATA_MISSING_NEVER_EXISTED",
              "ATA_CLOSED_AFTER_USE",
              "EVM_NO_ATA_CHECK_NEEDED",
              "NOT_SPL_SETTLEMENT",
              "MALFORMED_402"
            ],
            "type": "string"
          }
        },
        "type": "object"
      },
      "type": "array"
    },
    "payable_networks": {
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "proof": {
      "description": "paid only; pointer to the published payable correctness set",
      "properties": {
        "correctness_set": {
          "type": "string"
        },
        "verify": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "reachable": {
      "type": "boolean"
    },
    "remediation": {
      "description": "present only on a top-level UNREACHABLE / MALFORMED_402",
      "type": "object"
    },
    "resource": {
      "type": "string"
    },
    "returns_402": {
      "type": "boolean"
    },
    "schema_version": {
      "const": 2,
      "type": "integer"
    },
    "signature": {
      "type": "string"
    },
    "signed_by": {
      "type": "string"
    },
    "verdict": {
      "enum": [
        "PAYABLE",
        "NOT_PAYABLE",
        "UNREACHABLE",
        "MALFORMED_402"
      ],
      "type": "string"
    }
  },
  "required": [
    "schema_version",
    "resource",
    "reachable",
    "returns_402",
    "accepts_wellformed",
    "options",
    "payable_networks",
    "verdict",
    "signed_by",
    "signature"
  ],
  "type": "object"
}