{
  "openapi": "3.1.0",
  "info": {
    "title": "Cyber Private Eye API",
    "version": "1.0.0",
    "description": "Confidential cyber investigation inquiry and payment API. Payments are processed via Stripe Checkout; inquiry and contact submissions are stored in PocketBase.",
    "contact": { "email": "cases@cyberprivateeye.com" }
  },
  "servers": [
    { "url": "https://cyberprivateeye.com/hcgi/api", "description": "Production API" }
  ],
  "paths": {
    "/health": {
      "get": {
        "summary": "Service health check",
        "responses": { "200": { "description": "Service is healthy" } }
      }
    },
    "/stripe/status": {
      "get": {
        "summary": "Report whether Stripe payments are configured",
        "responses": {
          "200": {
            "description": "Configuration status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": { "configured": { "type": "boolean" } }
                }
              }
            }
          }
        }
      }
    },
    "/stripe/checkout": {
      "post": {
        "summary": "Create a Stripe Checkout Session for a service tier",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tier": { "type": "string", "enum": ["Trace", "Dossier", "Deep Sweep"] }
                },
                "required": ["tier"]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Checkout session URL",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": { "url": { "type": "string", "format": "uri" } }
                }
              }
            }
          }
        }
      }
    }
  }
}
