{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/twtapi-com/json-schema/twtapi-com-create-checkout-request-schema.json",
  "title": "CreateCheckoutRequest",
  "description": "为已存在的 pending 订单发起支付（生成渠道支付页/会话）。\n\nsource / page_slug / entry_path 是前端埋点：记录用户从哪个入口下单，\n带长度上限是为了防止有人塞超长字符串撑爆日志与统计表。",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/twtapi-com-openapi.json#/components/schemas/CreateCheckoutRequest",
  "properties": {
    "order_no": {
      "type": "string",
      "title": "Order No"
    },
    "payment_method": {
      "type": "string",
      "title": "Payment Method",
      "default": "credit_card"
    },
    "lang": {
      "type": "string",
      "title": "Lang",
      "default": "en"
    },
    "source": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 80
        },
        {
          "type": "null"
        }
      ],
      "title": "Source"
    },
    "page_slug": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 160
        },
        {
          "type": "null"
        }
      ],
      "title": "Page Slug"
    },
    "entry_path": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 300
        },
        {
          "type": "null"
        }
      ],
      "title": "Entry Path"
    }
  },
  "type": "object",
  "required": [
    "order_no"
  ]
}