{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/robosystems-ai/json-schema/robosystems-ai-checkout-status-response-schema.json",
  "title": "CheckoutStatusResponse",
  "description": "Status of a checkout session.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/robosystems-ai-billing-api-openapi.yml#/components/schemas/CheckoutStatusResponse",
  "properties": {
    "status": {
      "type": "string",
      "title": "Status",
      "description": "Checkout status: 'pending_payment', 'provisioning', 'active', 'failed', 'canceled'"
    },
    "subscription_id": {
      "type": "string",
      "title": "Subscription Id",
      "description": "Internal subscription ID"
    },
    "resource_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Resource Id",
      "description": "Resource ID (graph_id for both graphs and repositories) once provisioned. For repositories, this is the repository slug (e.g., 'sec')"
    },
    "operation_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Operation Id",
      "description": "Always null. Webhook-driven provisioning passes no operation id (`_trigger_resource_provisioning` calls `run_graph_provisioning` with `operation_id=None`), so there is no SSE stream to follow — poll the status endpoint instead. Retained rather than removed because it is on a published response shape; wiring it is a feature, not a fix."
    },
    "error": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Error",
      "description": "Error message if checkout failed"
    }
  },
  "type": "object",
  "required": [
    "status",
    "subscription_id"
  ]
}