> ## 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 code 检索结账会话的配置

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

> [!NOTE]
>
> `styling.payment_link_styles.panel.left.logo` 以嵌入式 base64 data URI（例如 `data:image/jpeg;base64,...`）返回商户 logo，而不是 URL。


## OpenAPI

````yaml openapi/zh-hans/checkout-builder/fetch-checkout-configuration.json GET /checkouts/{checkout_code}
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/{checkout_code}:
    get:
      summary: 获取 Checkout 配置
      description: 返回给定代码对应的完整自定义 checkout：配置和样式合并在一个响应中。checkout 标识符以顶层 `id` 的形式返回。
      operationId: get-checkout-configuration
      parameters:
        - name: checkout_code
          in: path
          description: 要检索的 checkout 的唯一标识符（UUID，36 个字符）。非 UUID 的值会在处理前以 400 被驳回。
          schema:
            type: string
          required: true
      responses:
        '200':
          description: 自定义 checkout，包含合并后的配置和样式。
          content:
            application/json:
              examples:
                Success:
                  value:
                    id: 8005ca91-dcfb-4428-b9f6-49c6e3446474
                    name: Main Checkout
                    description: ''
                    status: PUBLISHED
                    is_default: true
                    created_at: '2026-01-01T00:00:00Z'
                    updated_at: '2026-05-18T13:06:08Z'
                    config:
                      payment_methods:
                        - payment_method_type: CARD
                          name: Card
                          description: Card
                          icon: https://sdk.prod.y.uno/brands/card_logosimbolo.png
                          category: CARD
                          short_name: Card
                          hint: ''
                          order_to_show: 1
                          is_active: true
                          type: PAYMENT_METHOD
                          has_enrollment: true
                          conditions_quantity: 1
                          active_enrollment_type: BOTH
                      general_settings:
                        country_documents:
                          - country_code: AR
                            documents:
                              - DNI
                              - CUIT
                      feature_flags:
                        custom_required_fields: true
                        custom_logo_icon: true
                    styling:
                      styles:
                        global:
                          accent_color: '#282A30'
                          primary_background_color: '#FFFFFF'
                          primary_text_color: '#282A30'
                          primary_button_text_color: '#FFFFFF'
                          secondary_background_color: '#ECEFF2'
                          secondary_text_color: '#84807F'
                          secondary_button_background_color: '#FFFFFF'
                          secondary_button_text_color: '#282A30'
                          font_family: Inter
                        header:
                          logo_border_size: 0
                          logo_border_color: '#282A30'
                          logo_corner_radius: 8
                          font_size: 18
                          font_weight: 700
                        button:
                          corner_radius: 8
                          border_size: 0
                          primary_border_color: '#282A30'
                          secondary_border_color: '#282A30'
                          font_size: 18
                          font_weight: 400
                      settings:
                        sdk_type:
                          web: SEAMLESS
                          mobile: SEAMLESS
                        card:
                          save_on_success: true
                          visualization_mode: ONE_STEP
                          enable_ocr: false
                          credit_card_only_processing: false
                          default_network: DOM
                        web_sdk:
                          render_mode: MODAL
                          hide_pay_button: false
                        payment_method_list:
                          unfolded_display: false
                          preselected_payment_method: false
                          condensed_checkout_view: false
                          edit_payment_method_list: false
                        ui:
                          dark_mode: false
                          show_secure_payment_tag: true
                        payment_link:
                          show_result_screen: false
                      external_fonts:
                        - family_name: Inter
                          files:
                            - weight: 400
                              url: >-
                                https://staging.y.uno/sdk-static-bundles-ms/v1/static/fonts/Inter-Regular.ttf
                      payment_link_styles:
                        panel:
                          left:
                            background:
                              color: '#ECEFF2'
                            logo: data:image/jpeg;base64,...
                        checkbox:
                          color: '#282A30'
                        border:
                          color: '#282A30'
                        radio_button:
                          color: '#282A30'
                        button:
                          text:
                            color: '#876E6E'
                          background:
                            color: '#282A30'
                        published_at: '2026-05-14T19:34:06Z'
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Checkout UUID（即 checkout_code）。
                    example: 8005ca91-dcfb-4428-b9f6-49c6e3446474
                  name:
                    type: string
                    description: Checkout 名称。
                    example: Main Checkout
                  description:
                    type: string
                    description: Checkout 描述。
                  status:
                    type: string
                    description: Checkout 状态。
                    example: PUBLISHED
                  is_default:
                    type: boolean
                    description: 是否为账户的默认 checkout。
                    example: true
                  created_at:
                    type: string
                    description: 创建时间戳（ISO 8601）。
                  updated_at:
                    type: string
                    description: 最后更新时间戳（ISO 8601）。
                  config:
                    type: object
                    description: Checkout 配置。
                    properties:
                      payment_methods:
                        type: array
                        description: >-
                          为此 checkout 配置的支付方式。顺序由 `order_to_show`
                          决定（值越小越靠前）。返回账户可用的完整支付方式目录，而不仅仅是此 checkout 中已启用的支付方式。按
                          `is_active: true` 过滤即可仅获取已启用的支付方式。
                        items:
                          type: object
                      general_settings:
                        type: object
                        description: 常规 checkout 设置，包括各国家/地区接受的证件类型（`country_documents`）。
                      feature_flags:
                        type: object
                        description: >-
                          此 checkout 的功能开关，包括 `custom_required_fields` 和
                          `custom_logo_icon`。
                  styling:
                    type: object
                    description: >-
                      Checkout 样式和 SDK
                      设置：`styles`、`settings`、`external_fonts`、`payment_link_styles`。
        '400':
          description: '`checkout_code` 不是有效的 UUID。'
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_PARAMETERS
                  messages:
                    type: array
                    items:
                      type: string
        '401':
          description: 未通过身份验证，或账户不在 beta 允许列表中。
          content:
            application/json:
              examples:
                Unauthorized:
                  value:
                    code: NOT_AUTHENTICATED
                    messages:
                      - Not authenticated
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: NOT_AUTHENTICATED
                  messages:
                    type: array
                    items:
                      type: string
        '404':
          description: 在此账户下未找到该 checkout。
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  messages:
                    type: array
                    items:
                      type: string
      deprecated: false
components:
  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.