{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://ucp.dev/2026-04-08/schemas/shopping/checkout.json",
  "name": "dev.ucp.shopping.checkout",
  "title": "Checkout",
  "description": "Base checkout schema. Extensions compose onto this using allOf.",
  "type": "object",
  "required": [
    "ucp",
    "id",
    "line_items",
    "status",
    "currency",
    "totals",
    "links"
  ],
  "additionalProperties": true,
  "properties": {
    "ucp": {
      "$ref": "https://ucp.dev/2026-04-08/schemas/ucp.json#/$defs/response_checkout_schema",
      "ucp_request": "omit"
    },
    "id": {
      "type": "string",
      "description": "Unique identifier of the checkout session.",
      "ucp_request": "omit"
    },
    "line_items": {
      "type": "array",
      "items": {
        "$ref": "https://ucp.dev/2026-04-08/schemas/shopping/types/line_item.json"
      },
      "description": "List of line items being checked out.",
      "ucp_request": {
        "create": "required",
        "update": "required",
        "complete": "omit"
      }
    },
    "buyer": {
      "$ref": "https://ucp.dev/2026-04-08/schemas/shopping/types/buyer.json",
      "description": "Representation of the buyer.",
      "ucp_request": {
        "create": "optional",
        "update": "optional",
        "complete": "omit"
      }
    },
    "context": {
      "$ref": "https://ucp.dev/2026-04-08/schemas/shopping/types/context.json",
      "ucp_request": {
        "create": "optional",
        "update": "optional",
        "complete": "omit"
      }
    },
    "signals": {
      "$ref": "https://ucp.dev/2026-04-08/schemas/shopping/types/signals.json",
      "ucp_request": "optional"
    },
    "status": {
      "type": "string",
      "enum": [
        "incomplete",
        "requires_escalation",
        "ready_for_complete",
        "complete_in_progress",
        "completed",
        "canceled"
      ],
      "description": "Checkout state indicating the current phase and required action. See Checkout Status lifecycle documentation for state transition details.",
      "ucp_request": "omit"
    },
    "currency": {
      "type": "string",
      "description": "ISO 4217 currency code reflecting the merchant's market determination. Derived from address, context, and geo IP—buyers provide signals, merchants determine currency.",
      "ucp_request": "omit"
    },
    "totals": {
      "$ref": "https://ucp.dev/2026-04-08/schemas/shopping/types/totals.json",
      "description": "Different cart totals.",
      "ucp_request": "omit"
    },
    "messages": {
      "type": "array",
      "items": {
        "$ref": "https://ucp.dev/2026-04-08/schemas/shopping/types/message.json"
      },
      "description": "List of messages with error and info about the checkout session state.",
      "ucp_request": "omit"
    },
    "links": {
      "type": "array",
      "items": {
        "$ref": "https://ucp.dev/2026-04-08/schemas/shopping/types/link.json"
      },
      "description": "Links to be displayed by the platform (Privacy Policy, TOS). Mandatory for legal compliance.",
      "ucp_request": "omit"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "description": "RFC 3339 expiry timestamp. Default TTL is 6 hours from creation if not sent.",
      "ucp_request": "omit"
    },
    "continue_url": {
      "type": "string",
      "format": "uri",
      "description": "URL for checkout handoff and session recovery. MUST be provided when status is requires_escalation. See specification for format and availability requirements.",
      "ucp_request": "omit"
    },
    "payment": {
      "$ref": "https://ucp.dev/2026-04-08/schemas/shopping/payment.json",
      "ucp_request": {
        "create": "optional",
        "update": "optional",
        "complete": "required"
      }
    },
    "order": {
      "$ref": "https://ucp.dev/2026-04-08/schemas/shopping/types/order_confirmation.json",
      "description": "Details about an order created for this checkout session.",
      "ucp_request": "omit"
    }
  },
  "version": "2026-04-08"
}