{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/toughtongueai-com/json-schema/toughtongueai-com-checkout-session-request-schema.json",
  "title": "CheckoutSessionRequest",
  "description": "Schema for creating a checkout session through the API",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/toughtongueai-com-openapi.json#/components/schemas/CheckoutSessionRequest",
  "properties": {
    "product_id": {
      "type": "string",
      "title": "Product Id"
    },
    "product_type": {
      "$ref": "#/$defs/ProductType",
      "description": "Type of product: 'scenario' or 'collection'",
      "default": "scenario"
    },
    "email": {
      "type": "string",
      "title": "Email",
      "description": "Email of the user (required)"
    },
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Name"
    },
    "success_url": {
      "type": "string",
      "title": "Success Url"
    },
    "cancel_url": {
      "type": "string",
      "title": "Cancel Url"
    },
    "price_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Price Id",
      "description": "Optional Stripe price ID to override default price"
    }
  },
  "type": "object",
  "required": [
    "product_id",
    "email",
    "success_url",
    "cancel_url"
  ],
  "$defs": {
    "ProductType": {
      "type": "string",
      "enum": [
        "scenario",
        "collection"
      ],
      "title": "ProductType"
    }
  }
}