{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/u-cash/json-schema/u-cash-checkout-session-schema.json",
  "title": "CheckoutSession",
  "description": "UCP buyer checkout (multi-item, mixed-currency). The merchant is resolved from the host or ?cloud=, NOT X-Api-Key.",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/agents-u.cash-openapi.json#/components/schemas/CheckoutSession",
  "type": "object",
  "required": [
    "line_items"
  ],
  "properties": {
    "line_items": {
      "type": "array",
      "description": "one entry per item",
      "items": {
        "type": "object",
        "properties": {
          "item": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "resource res_id or checkout slug"
              }
            }
          },
          "quantity": {
            "type": "integer",
            "minimum": 1,
            "default": 1
          }
        }
      }
    },
    "currency": {
      "type": "string",
      "description": "cart currency for mixed-currency carts (default: the shared item currency, else the merchant default)"
    },
    "buyer": {
      "type": "object"
    },
    "context": {
      "type": "object"
    }
  }
}