> ## 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.

# 检索已注册的支付方式

> 检索客户已注册的支付方式列表

获取用户已注册的支付方式列表。

> [!NOTE]
>
> 通过 Apple Pay 或 Google Pay CIT（`vault_on_success: true`）存储的支付工具有意不包含在此列表中。`vaulted_token` 仅在 CIT 支付响应中返回，因此请在您这一端保存它。已存储的钱包令牌仍可通过[按 ID 检索已注册的支付方式](https://docs.y.uno/zh-hans/reference/payment-methods-direct-workflow/retrieve-enrolled-payment-method-by-id-api.md)解析。请参阅[存储凭证](https://docs.y.uno/zh-hans/docs/payment-features/stored-credentials.md#wallet-originated-tokens-apple-pay-and-google-pay)。

> [!NOTE]
>
> 此 endpoint 的范围为组织级：无论您从哪个账户调用，它都会返回该客户已注册的支付方式，而不仅是用于注册这些支付方式的账户。原因以及当您的组织运营多家需要单独客户记录的公司时应如何处理，请参阅[账户](https://docs.y.uno/zh-hans/docs/using-yuno/organization/accounts.md#customers-and-payment-methods-are-organization-scoped)。


## OpenAPI

````yaml openapi/zh-hans/payment-methods-direct-workflow/retrieve-enrolled-payment-methods-api.json GET /customers/{customer_id}/payment-methods
openapi: 3.1.0
info:
  title: customer-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:
  /customers/{customer_id}/payment-methods:
    get:
      summary: 检索已注册的支付方式
      operationId: retrieve-enrolled-payment-methods-api
      parameters:
        - name: customer_id
          in: path
          description: >-
            客户的唯一标识符，使用[创建客户](https://docs.y.uno/zh-hans/reference/customers/create-customer)
            endpoint 创建（MAX 64；MIN 36）。
          schema:
            type: string
          required: true
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value:
                    payment_methods:
                      - idempotency_key: null
                        name: VISA ****1111
                        description: VISA ****1111
                        icon: https://icons.prod.y.uno/visa_logosimbolo.png
                        type: CARD
                        category: CARD
                        country: US
                        status: ENROLLED
                        sub_status: null
                        vaulted_token: 46adcbc0-aa26-4867-a4e7-28a5ad9100ae
                        metadata:
                          - key: on_behalf_of
                            value: acct_1A2b3C4d5E6f7G8h
                          - key: order_ref
                            value: ABC-123
                        callback_url: null
                        action: null
                        redirect_url: null
                        created_at: '2023-08-05T14:22:06.766268Z'
                        updated_at: '2023-08-05T14:22:06.766268Z'
                        card_data:
                          iin: '41111111'
                          lfd: '1111'
                          expiration_month: 3
                          expiration_year: 27
                          number_length: 16
                          security_code_length: 3
                          brand: VISA
                          issuer: null
                          issuer_name: JPMORGAN_CHASE_BANK_NA
                          issuer_code: US_JPMORGAN_CHASE_BANK_NA
                          category: null
                          type: CREDIT
                        last_successfully_used: false
                        last_successfully_used_at: ''
                      - idempotency_key: null
                        name: VISA ****1111
                        description: VISA ****1111
                        icon: https://icons.prod.y.uno/visa_logosimbolo.png
                        type: CARD
                        category: CARD
                        country: US
                        status: ENROLLED
                        sub_status: null
                        vaulted_token: 7ced7717-f860-4705-a376-58a714953de9
                        callback_url: null
                        action: null
                        redirect_url: null
                        created_at: '2023-08-05T14:45:24.112621Z'
                        updated_at: '2023-08-05T14:45:24.112621Z'
                        card_data:
                          iin: '41111111'
                          lfd: '1111'
                          expiration_month: 3
                          expiration_year: 27
                          number_length: 16
                          security_code_length: 3
                          brand: VISA
                          issuer: null
                          issuer_name: JPMORGAN_CHASE_BANK_NA
                          issuer_code: US_JPMORGAN_CHASE_BANK_NA
                          category: null
                          type: CREDIT
                        last_successfully_used: false
                        last_successfully_used_at: ''
              schema:
                type: object
                properties:
                  payment_methods:
                    type: array
                    items:
                      type: object
                      properties:
                        idempotency_key: {}
                        name:
                          type: string
                          example: VISA ****1111
                        description:
                          type: string
                          example: VISA ****1111
                        icon:
                          type: string
                          example: https://icons.prod.y.uno/visa_logosimbolo.png
                        type:
                          type: string
                          example: CARD
                        category:
                          type: string
                          example: CARD
                        country:
                          type: string
                          example: US
                        status:
                          type: string
                          example: ENROLLED
                        sub_status: {}
                        vaulted_token:
                          type: string
                          example: 46adcbc0-aa26-4867-a4e7-28a5ad9100ae
                        metadata:
                          type: array
                        callback_url: {}
                        action: {}
                        redirect_url: {}
                        created_at:
                          type: string
                          example: '2023-08-05T14:22:06.766268Z'
                        updated_at:
                          type: string
                          example: '2023-08-05T14:22:06.766268Z'
                        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: 27
                              default: 0
                            number_length:
                              type: integer
                              example: 16
                              default: 0
                            security_code_length:
                              type: integer
                              example: 3
                              default: 0
                            security_code_expires_in:
                              type: integer
                              example: 842
                              description: >-
                                已存储的安全码对 PCI 转发代理仍可用的剩余秒数。该时间窗口关闭后返回
                                -1；如果卡不带安全码，则完全省略该字段。仅对启用了 PCI 转发代理的组织返回。
                            brand:
                              type: string
                              example: VISA
                            issuer: {}
                            issuer_name:
                              type: string
                              example: JPMORGAN_CHASE_BANK_NA
                            issuer_code:
                              type: string
                              example: US_JPMORGAN_CHASE_BANK_NA
                            category: {}
                            type:
                              type: string
                              example: CREDIT
                        last_successfully_used:
                          type: boolean
                          example: false
                          default: true
                        last_successfully_used_at:
                          type: string
                          example: ''
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Bad Request:
                  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:
                Result:
                  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.