> ## 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 可用的支付方式

> 检索与现有结账会话关联的可用支付方式

此请求使用首次创建会话时生成的唯一标识符来检索结账会话。


## OpenAPI

````yaml openapi/zh-hans/checkout-sessions/retrieve-payment-methods-for-checkout.json GET /checkout/sessions/{checkout_session}/payment-methods
openapi: 3.1.0
info:
  title: checkout-api
  version: 1.0.2
servers:
  - url: https://api-sandbox.y.uno/v1
    description: Sandbox
  - url: https://api.y.uno/v1
    description: Production (US)
security:
  - sec0: []
    sec1: []
paths:
  /checkout/sessions/{checkout_session}/payment-methods:
    get:
      summary: 检索 Checkout 可用的支付方式
      operationId: retrieve-payment-methods-for-checkout
      parameters:
        - name: checkout_session
          in: path
          description: 结账会话的唯一标识符（UUID，36 个字符）。
          schema:
            type: string
          required: true
        - name: category
          in: query
          description: 可选的类别过滤。
          schema:
            type: string
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    - name: VISA ****1111
                      vaulted_token: de00c1bd-624b-4e7b-ae28-47d86c94b15f
                      description: VISA ****1111
                      type: CARD
                      category: CARD
                      icon: https://icons.prod.y.uno/visa_logosimbolo.png
                      last_successfully_used: false
                      last_successfully_used_at: ''
                      checkout:
                        session: d313047b-4f96-44ef-bbad-caf1d7ba4c2b
                        sdk_required_action: false
                        conditions:
                          enabled: true
                          rules: null
                      card_data:
                        iin: '41111111'
                        lfd: '1111'
                        expiration_month: 3
                        expiration_year: 26
                        number_length: 16
                        security_code_length: 3
                        brand: VISA
                        issuer: JPMORGAN CHASE BANK N A
                        issuer_code: null
                        category: CREDIT
                        type: CREDIT
                      preferred: false
                    - name: Card
                      vaulted_token: null
                      description: Card
                      type: CARD
                      category: CARD
                      icon: https://icons.prod.y.uno/card_logosimbolo.png
                      last_successfully_used: null
                      last_successfully_used_at: null
                      checkout:
                        session: d313047b-4f96-44ef-bbad-caf1d7ba4c2b
                        sdk_required_action: true
                        conditions:
                          enabled: true
                          rules: null
                      preferred: false
                    - name: Bank Transfer
                      vaulted_token: null
                      description: Bank Transfer
                      type: BANK_TRANSFER
                      category: BANK_TRANSFER
                      icon: https://icons.prod.y.uno/banktransfer_logosimbolo.png
                      last_successfully_used: null
                      last_successfully_used_at: null
                      checkout:
                        session: d313047b-4f96-44ef-bbad-caf1d7ba4c2b
                        sdk_required_action: true
                        conditions:
                          enabled: false
                          rules:
                            - condition: INCLUDE
                              condition_group_code: 2b273309-2c63-4ef8-b5f8-2953abf7ad4a
                              condition_name: Country-US
                              type: COUNTRY
                              values:
                                countries:
                                  - US
                                currency: null
                                max: null
                                metadata: null
                                min: null
                      preferred: false
              schema:
                type: array
                items:
                  type: object
                  properties:
                    name:
                      type: string
                      example: VISA ****1111
                    vaulted_token:
                      type: string
                      example: de00c1bd-624b-4e7b-ae28-47d86c94b15f
                    description:
                      type: string
                      example: VISA ****1111
                    type:
                      type: string
                      example: CARD
                    category:
                      type: string
                      example: CARD
                    icon:
                      type: string
                      example: https://icons.prod.y.uno/visa_logosimbolo.png
                    last_successfully_used:
                      type: boolean
                      example: false
                      default: true
                    last_successfully_used_at:
                      type: string
                      example: ''
                    checkout:
                      type: object
                      properties:
                        session:
                          type: string
                          example: d313047b-4f96-44ef-bbad-caf1d7ba4c2b
                        sdk_required_action:
                          type: boolean
                          example: false
                          default: true
                        conditions:
                          type: object
                          properties:
                            enabled:
                              type: boolean
                              example: true
                              default: true
                            rules:
                              type: array
                              description: >-
                                应用于该支付方式的条件规则列表（INCLUDE/EXCLUDE）。每条规则包含一个类型（例如
                                METADATA、AMOUNT、COUNTRY）和若干值。
                              items:
                                type: object
                                properties:
                                  condition:
                                    type: string
                                    description: INCLUDE 或 EXCLUDE
                                    example: INCLUDE
                                  condition_group_code:
                                    type: string
                                    description: 条件组的 UUID
                                    example: 2b273309-2c63-4ef8-b5f8-2953abf7ad4a
                                  condition_name:
                                    type: string
                                    description: 条件的可读名称
                                    example: Country-US
                                  type:
                                    type: string
                                    description: 规则类型：METADATA、AMOUNT、COUNTRY 等。
                                    example: COUNTRY
                                  values:
                                    type: object
                                    description: >-
                                      规则使用的值。结构取决于规则类型：`currency`、`max` 和 `min`
                                      为字符串（可为 null）；`countries` 为字符串数组（例如
                                      ["AF"]）；`metadata` 为包含 `key` 和 `value`
                                      的对象数组（例如 [{"key": "test", "value":
                                      "test"}]）。
                                    properties:
                                      countries:
                                        type: array
                                        description: >-
                                          国家/地区代码数组（例如 ["AF"]、["US"]）。规则未使用时为
                                          null。
                                        items:
                                          type: string
                                        nullable: true
                                        example:
                                          - AF
                                      currency:
                                        type: string
                                        description: 规则类型为 AMOUNT 时的币种代码。否则为 null。
                                        nullable: true
                                        example: null
                                      max:
                                        type: string
                                        description: 适用时的最大值。否则为 null。
                                        nullable: true
                                        example: null
                                      metadata:
                                        type: array
                                        description: >-
                                          键值对象数组（例如 [{"key": "test", "value":
                                          "test"}]）。规则未使用时为 null。
                                        nullable: true
                                        items:
                                          type: object
                                          properties:
                                            key:
                                              type: string
                                            value:
                                              type: string
                                      min:
                                        type: string
                                        description: 适用时的最小值。否则为 null。
                                        nullable: true
                                        example: null
                    card_data:
                      type: object
                      properties:
                        iin:
                          type: string
                          example: '41111111'
                        lfd:
                          type: string
                          example: '1111'
                        expiration_month:
                          type: integer
                          example: 3
                          default: 0
                        expiration_year:
                          type: integer
                          example: 26
                          default: 0
                        number_length:
                          type: integer
                          example: 16
                          default: 0
                        security_code_length:
                          type: integer
                          example: 3
                          default: 0
                        brand:
                          type: string
                          example: VISA
                        issuer:
                          type: string
                          example: JPMORGAN CHASE BANK N A
                        issuer_code: {}
                        category:
                          type: string
                          example: CREDIT
                        type:
                          type: string
                          example: CREDIT
                    preferred:
                      type: boolean
                      example: false
                      default: true
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value:
                    code: INVALID_REQUEST
                    messages:
                      - Invalid request
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_REQUEST
                  messages:
                    type: array
                    items:
                      type: string
                      example: Invalid request
        '401':
          description: '401'
          content:
            application/json:
              examples:
                Unauthorized:
                  value:
                    code: INVALID_CREDENTIALS
                    messages:
                      - Invalid credentials
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: INVALID_CREDENTIALS
                  messages:
                    type: array
                    items:
                      type: string
                      example: Invalid credentials
        '403':
          description: '403'
          content:
            application/json:
              examples:
                Forbidden:
                  value:
                    code: AUTHORIZATION_REQUIRED
                    messages:
                      - The merchant has no authorization to use this API.
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: AUTHORIZATION_REQUIRED
                  messages:
                    type: array
                    items:
                      type: string
                      example: The merchant has no authorization to use this API.
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: public-api-key
      x-default: <Your public-api-key>
    sec1:
      type: apiKey
      in: header
      name: private-secret-key
      x-default: <Your private-secret-key>

````

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