> ## Documentation Index
> Fetch the complete documentation index at: https://docs.y.uno/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Test in the sandbox first: base URL https://api-sandbox.y.uno (Test Mode in the Dashboard). Production is https://api.y.uno (Live Mode).
> Every API request needs the public-api-key and private-secret-key headers. Get them in the Dashboard at https://dashboard.y.uno/developers (Developers > Credentials); sandbox and production keys are different.
> Send an X-Idempotency-Key (a UUID) when creating payments, refunds and cancels, so retries do not create duplicates.
> Start with the Quickstart (https://docs.y.uno/docs/quickstart.md) and the agent guide (https://docs.y.uno/agents.md). To search these docs from a coding agent, connect the docs MCP server at https://docs.y.uno/mcp.

# 列出 Checkout

> 列出账户的自定义 checkout（仅摘要）：ID、名称、状态，以及哪一个是默认 checkout

> [!NOTE]
>
> 此 API 处于 **Beta** 阶段。endpoint 和 schema 可能会在不另行通知的情况下变更。

结果先列出默认 checkout，再按最近更新时间排序，并包含 `ARCHIVED` 状态的 checkout。每个条目的 `id` 即 `checkout_code`，供[获取](https://docs.y.uno/zh-hans/reference/checkout-builder/fetch-checkout-configuration.md)和[发布](https://docs.y.uno/zh-hans/reference/checkout-builder/publish-checkout-configuration.md) endpoint 使用。

分页需主动启用：不发送 `page` 或 `size` 时，响应是包含所有匹配 checkout 的纯数组；发送其中任意一个参数，响应会改为分页信封结构（`data` + `pagination`，其中 `total` 为筛选后的总数）。


## OpenAPI

````yaml openapi/zh-hans/checkout-builder/list-checkouts.json GET /checkouts
openapi: 3.1.0
info:
  title: checkout-builder
  version: 1.0.0
servers:
  - url: https://api-sandbox.y.uno/v1
    description: Sandbox
  - url: https://api.y.uno/v1
    description: Production (US)
security:
  - publicApiKey: []
    privateSecretKey: []
    accountCode: []
paths:
  /checkouts:
    get:
      summary: 列出 Checkout
      description: >-
        以摘要形式（不含配置和样式）列出账户的自定义 checkout，默认 checkout 排在最前，其余按最近更新时间排序。包括 ARCHIVED
        的 checkout。所有过滤条件均为可选，且可组合使用（AND 关系）。不带 page 或 size 时，响应是包含所有匹配 checkout
        的纯数组；发送其中任意一个则会切换为分页信封结构。
      operationId: list-checkouts
      parameters:
        - name: name
          in: query
          description: 对 checkout 名称的不区分大小写的包含过滤。LIKE 元字符（% 和 _）按字面匹配。
          schema:
            type: string
          required: false
        - name: id
          in: query
          description: 对 checkout 标识符的不区分大小写的包含过滤。
          schema:
            type: string
          required: false
        - name: status
          in: query
          description: >-
            按状态过滤。接受一个或多个值（OR
            关系）：重复该参数，或发送以逗号分隔的列表（status=PUBLISHED,ARCHIVED）。无效值会以 400
            被驳回。未提供时：返回所有状态。
          schema:
            type: string
            enum:
              - PUBLISHED
              - NOT_PUBLISHED
              - ARCHIVED
          required: false
        - name: created_after
          in: query
          description: created_at 的包含下界（ISO-8601 时刻，例如 2026-05-01T00:00:00Z）。
          schema:
            type: string
            format: date-time
          required: false
        - name: created_before
          in: query
          description: created_at 的包含上界（ISO-8601 时刻）。
          schema:
            type: string
            format: date-time
          required: false
        - name: updated_after
          in: query
          description: updated_at 的包含下界（ISO-8601 时刻）。
          schema:
            type: string
            format: date-time
          required: false
        - name: updated_before
          in: query
          description: updated_at 的包含上界（ISO-8601 时刻）。
          schema:
            type: string
            format: date-time
          required: false
        - name: page
          in: query
          description: 页码（从 1 开始）。可选分页：发送 page 或 size 会将响应切换为分页信封结构。默认为 1。非数字值会以 400 被驳回。
          schema:
            type: integer
            minimum: 1
            default: 1
          required: false
        - name: size
          in: query
          description: >-
            每页条数。可选分页：发送 page 或 size 会将响应切换为分页信封结构。默认为 25，上限为 100。非数字值会以 400
            被驳回。
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 25
          required: false
      responses:
        '200':
          description: >-
            账户的 checkout。未提供 page 和 size 时为纯数组；提供其中任意一个时为分页信封结构（data +
            pagination）。两种形式下，每一项都包含相同的 7 个字段。pagination.total 是过滤后的总数，而非当前页的行数。
          content:
            application/json:
              schema:
                oneOf:
                  - type: array
                    items:
                      $ref: '#/components/schemas/CheckoutSummary'
                    description: 包含所有匹配 checkout 的纯数组（未提供 page 和 size）。
                    title: 不分页
                  - type: object
                    description: 分页信封结构（提供了 page 或 size）。
                    properties:
                      data:
                        type: array
                        items:
                          $ref: '#/components/schemas/CheckoutSummary'
                      pagination:
                        type: object
                        properties:
                          page:
                            type: integer
                            description: 当前页（从 1 开始）。
                          size:
                            type: integer
                            description: 每页条数。
                          total:
                            type: integer
                            description: 过滤后的总数，而非当前页的行数。
                    title: 分页
              examples:
                Without pagination:
                  value:
                    - id: 2a8d6472-3117-4e85-8b28-d51ba3abab77
                      name: Default
                      description: Default
                      status: PUBLISHED
                      is_default: true
                      created_at: '2026-05-02T18:11:04.120Z'
                      updated_at: '2026-07-01T09:30:12.001Z'
                    - id: 0b28ff66-15f1-44c1-8d1e-bd1fefbc0a19
                      name: Promo Checkout
                      description: Seasonal promo
                      status: ARCHIVED
                      is_default: false
                      created_at: '2026-04-11T10:02:33.000Z'
                      updated_at: '2026-06-20T15:45:00.000Z'
                With pagination:
                  value:
                    data:
                      - id: 2a8d6472-3117-4e85-8b28-d51ba3abab77
                        name: Default
                        description: Default
                        status: PUBLISHED
                        is_default: true
                        created_at: '2026-05-02T18:11:04.120Z'
                        updated_at: '2026-07-01T09:30:12.001Z'
                    pagination:
                      page: 1
                      size: 25
                      total: 3
        '400':
          description: page/size 的值无效，或 status 的值无效。
          content:
            application/json:
              examples:
                Invalid pagination:
                  value:
                    code: ILLEGAL_ARGUMENT
                    messages:
                      - page must be a positive integer
        '401':
          description: 缺少凭证或凭证无效，或账户不在 beta 允许列表中。
components:
  schemas:
    CheckoutSummary:
      type: object
      properties:
        id:
          type: string
          description: Checkout 标识符（UUID）。在获取和发布 endpoint 中将其用作 checkout_code。
        name:
          type: string
          description: Checkout 名称。
        description:
          type: string
          description: Checkout 描述。
        status:
          type: string
          enum:
            - PUBLISHED
            - NOT_PUBLISHED
            - ARCHIVED
          description: Checkout 状态。
        is_default:
          type: boolean
          description: 是否为账户的默认 checkout。
        created_at:
          type: string
          format: date-time
          description: 创建时间戳（ISO-8601）。
        updated_at:
          type: string
          format: date-time
          description: 最后更新时间戳（ISO-8601）。
  securitySchemes:
    publicApiKey:
      type: apiKey
      in: header
      name: PUBLIC-API-KEY
      description: 商户公钥 API 密钥。可在 Yuno Dashboard → Settings → API Keys 中找到。
    privateSecretKey:
      type: apiKey
      in: header
      name: PRIVATE-SECRET-KEY
      description: 商户私有密钥，与公钥配对使用。切勿嵌入客户端代码。
    accountCode:
      type: apiKey
      in: header
      name: X-Account-Code
      description: 请求所属商户账户范围的 UUID。租户仅通过此标头解析。

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.