{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/logbrew/json-schema/logbrew-billing-catalog-response-schema.json",
  "title": "BillingCatalogResponse",
  "description": "Public fixed-plan catalog.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/logbrew-billing-api-openapi.yml#/components/schemas/BillingCatalogResponse",
  "properties": {
    "checkout_available": {
      "description": "Whether self-serve checkout is available.",
      "type": "boolean"
    },
    "currency": {
      "description": "ISO currency used by every self-serve price.",
      "type": "string"
    },
    "interval": {
      "$ref": "#/$defs/BillingInterval",
      "description": "Fixed billing interval used by every self-serve price."
    },
    "plans": {
      "description": "Ordered Developer, Team, Business, and Enterprise plans.",
      "items": {
        "$ref": "#/$defs/BillingPlanResponse"
      },
      "type": "array"
    },
    "response_version": {
      "description": "Contract version.",
      "format": "uint8",
      "maximum": 255,
      "minimum": 0,
      "type": "integer"
    }
  },
  "required": [
    "response_version",
    "currency",
    "interval",
    "checkout_available",
    "plans"
  ],
  "type": "object",
  "$defs": {
    "BillingActivation": {
      "description": "How a plan is activated.",
      "oneOf": [
        {
          "const": "included",
          "description": "Active without checkout.",
          "type": "string"
        },
        {
          "const": "checkout",
          "description": "Fixed-price Stripe checkout.",
          "type": "string"
        },
        {
          "const": "quote",
          "description": "Email quote.",
          "type": "string"
        }
      ]
    },
    "BillingInterval": {
      "description": "Fixed billing interval.",
      "oneOf": [
        {
          "const": "month",
          "description": "Calendar or provider-owned monthly period.",
          "type": "string"
        }
      ]
    },
    "BillingPlanLimitsResponse": {
      "description": "Fixed included usage for one plan.",
      "properties": {
        "issue_events": {
          "description": "Included issue/error events per billing period.",
          "format": "uint64",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "log_bytes": {
          "description": "Included normalized log bytes per billing period.",
          "format": "uint64",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "metric_bytes": {
          "description": "Included normalized application-metric bytes per billing period.",
          "format": "uint64",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "retention_days": {
          "description": "Retention in days.",
          "format": "uint16",
          "maximum": 65535,
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "trace_spans": {
          "description": "Included trace spans per billing period.",
          "format": "uint64",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "unlimited_projects": {
          "description": "Projects are unlimited for this plan.",
          "type": "boolean"
        }
      },
      "required": [
        "issue_events",
        "log_bytes",
        "metric_bytes",
        "trace_spans",
        "retention_days",
        "unlimited_projects"
      ],
      "type": "object"
    },
    "BillingPlanResponse": {
      "description": "One fixed plan.",
      "properties": {
        "activation": {
          "$ref": "#/$defs/BillingActivation",
          "description": "How this plan is activated."
        },
        "limits": {
          "$ref": "#/$defs/BillingPlanLimitsResponse",
          "description": "Fixed included usage."
        },
        "monthly_price_cents": {
          "description": "Monthly price in USD cents; absent for quoted Enterprise contracts.",
          "format": "uint32",
          "minimum": 0,
          "type": [
            "integer",
            "null"
          ]
        },
        "quote_email": {
          "description": "Quote mailbox for Enterprise; absent for self-serve plans.",
          "type": [
            "string",
            "null"
          ]
        },
        "tier": {
          "$ref": "#/$defs/BillingTier",
          "description": "Stable plan identifier."
        }
      },
      "required": [
        "tier",
        "monthly_price_cents",
        "activation",
        "quote_email",
        "limits"
      ],
      "type": "object"
    },
    "BillingTier": {
      "description": "Canonical subscription tier.",
      "oneOf": [
        {
          "const": "developer",
          "description": "Free individual plan.",
          "type": "string"
        },
        {
          "const": "team",
          "description": "Fixed $25 monthly plan.",
          "type": "string"
        },
        {
          "const": "business",
          "description": "Fixed $80 monthly plan.",
          "type": "string"
        },
        {
          "const": "enterprise",
          "description": "Quoted contract.",
          "type": "string"
        }
      ]
    }
  }
}