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

# 注册支付方式

> 注册客户的支付方式，并返回供将来使用的存储令牌

此请求用于为客户注册支付方式。客户选择要注册的支付方式后，您可以利用 Yuno 提供的信息，通过所创建的支付方式对象保存这些信息，供将来购买使用。

请查看 [Yuno 中可用的支付方式](https://docs.y.uno/zh-hans/reference/payment-type-list.md)。您需要在 Yuno Dashboard 中为每种支付方式设置凭证，才能使用它们。

请注意，此请求需要 `X-Idempotency-Key`。更多信息请查看[身份验证](https://docs.y.uno/zh-hans/reference/getting-started/authentication.md#idempotency)页面。

> [!NOTE]
>
> **Webhook**
>
> 我们建议监听 [Webhook](https://docs.y.uno/zh-hans/docs/webhooks/configure-webhooks.md)，以便及时了解您客户已注册支付方式的状态。

如果客户多次注册同一张卡，Yuno 每次都会创建新的注册，并返回不同的 `vaulted_token`。请使用注册响应中的卡片 `fingerprint` 在您这一端检测重复项（对于某些服务提供商，fingerprint 可能为 `null`）。请参阅[卡片 Fingerprint](https://docs.y.uno/zh-hans/docs/security-and-compliance/fingerprint.md)。

> [!WARNING]
>
> **仅适用于通过 PCI 认证的商户。**


## OpenAPI

````yaml openapi/zh-hans/payment-methods-direct-workflow/enroll-payment-method-api.json POST /customers/{customer_id}/payment-methods
openapi: 3.1.0
info:
  title: customer-api-register-payment-method
  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: []
    sec2: []
paths:
  /customers/{customer_id}/payment-methods:
    post:
      summary: 注册支付方式
      operationId: enroll-payment-method-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
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - account_id
                - country
                - type
              properties:
                account_id:
                  type: string
                  description: >-
                    账户的唯一标识符。您可以在 [Yuno 的 Dashboard](https://dashboard.y.uno/)
                    中找到该信息（MAX 64；MIN 36）。
                country:
                  type: string
                  description: >-
                    交易的国家/地区代码（MAX 2；MIN 2；[ISO
                    3166-1](/zh-hans/reference/country-reference)）。
                  enum:
                    - AR
                    - BO
                    - BR
                    - CL
                    - CO
                    - CR
                    - EC
                    - SV
                    - GT
                    - HN
                    - MX
                    - NI
                    - PA
                    - PY
                    - PE
                    - US
                    - UY
                type:
                  type: string
                  description: >-
                    支付方式类型（MAX 255；MIN
                    3；[支付类型](/zh-hans/reference/payment-type-list)）。
                  enum:
                    - CARD
                    - ACH_ENROLLMENT
                    - NU_PAY_ENROLLMENT
                    - SEPA_ENROLLMENT
                workflow:
                  type: string
                  description: >-
                    支付工作流指示集成使用的是 Yuno 的 SDK，还是点对点（back to back）连接。由于您使用的是
                    Direct 工作流，该值必须为 `DIRECT`。
                  default: DIRECT
                  enum:
                    - DIRECT
                callback_url:
                  type: string
                  description: 在服务提供商环境中完成注册后，用于将客户返回的 URL。仅在集成替代支付方式时需要（MAX 255；MIN 3）。
                metadata:
                  type: array
                  description: >-
                    注册的可选自定义键值标签（例如 on_behalf_of、order_ref）。对 Yuno
                    不透明：它会与已注册的支付方式一起存储，在您检索时返回，并包含在 `enrollment.enroll` webhook
                    中，同时随注册一起发送到服务提供商集成，方式与支付 `metadata` 在扣款时传递给服务提供商的方式相同。保留的
                    `gateway_options` 条目除外：它会被存储和返回，但不会随注册一起转发。最多 120
                    项，所有键和值合计最多 75000 个字符。
                  items:
                    properties:
                      key:
                        type: string
                        description: >-
                          元数据键（MAX 48. Value: MIN:1, MAX:48）。**[Case
                          Sensitive]**
                      value:
                        type: string
                        description: >-
                          元数据键值（MAX 512. Value: MIN:1, MAX:512）。**[Case
                          Sensitive]**
                    required:
                      - key
                      - value
                    type: object
                token:
                  type: string
                  format: uuid
                  description: 用于引用正在注册的支付方式的预生成令牌。
                parent_type:
                  type: string
                  description: 父支付方式的类型，在注册令牌化或衍生方式时使用（例如 `CARD`）。
                account_updater:
                  type: boolean
                  description: >-
                    卡账户更新器（Card Account Updater）的单卡控制。设置为 `false`
                    时，该卡将被排除在卡账户更新器之外，不会收到自动的卡信息更新。省略时，该卡遵循您账户的账户更新器配置。在注册时适用。
                card_data:
                  type: object
                  description: 指定卡的详细信息。仅适用于 `DIRECT` 工作流集成。
                  required:
                    - number
                    - expiration_month
                    - expiration_year
                  properties:
                    number:
                      type: string
                      description: 卡号，不含任何分隔符（MAX 19；MIN 8），仅适用于通过 PCI 认证的商户。
                    expiration_month:
                      type: integer
                      description: 卡的有效期月份，格式为 MM（MAX 2；MIN 2），仅适用于通过 PCI 认证的商户。
                      format: int32
                    expiration_year:
                      type: integer
                      description: 卡的有效期年份，格式为 YYYY（MAX 4；MIN 4），仅适用于通过 PCI 认证的商户。
                      format: int32
                    security_code:
                      type: string
                      description: 卡的安全码（MAX 4；MIN 3），仅适用于通过 PCI 认证的商户。
                    holder_name:
                      type: string
                      description: 持卡人姓名全称，与卡面一致（MAX 26；MIN 2），仅适用于通过 PCI 认证的商户。
                    brand:
                      type: string
                      description: 卡品牌（例如 `VISA`、`MASTERCARD`、`AMEX`）。
                    scheme:
                      type: string
                      description: 用于处理交易的卡组织（已验证的卡组织）。
                    soft_descriptor:
                      type: string
                      description: 显示在持卡人银行对账单上的账单描述。
                    card_pin:
                      type: string
                      description: 卡 PIN，适用于需要 PIN 的支付方式。
                    authentication_method:
                      type: string
                      description: Click-to-Pay 的认证方式。
                      enum:
                        - FIDO2
                        - OWN_CREDENTIALS
                        - FEDERATED_ID
                customer_payer:
                  type: object
                  description: 与支付方式关联的客户/付款方信息。
                  properties:
                    code:
                      type: string
                      description: Yuno 客户标识符（客户代码）。MIN 3 / MAX 255。
                    organization_customer_external_id:
                      type: string
                      description: 客户在商户自身系统中的标识符，范围限于该组织。MIN 3 / MAX 255。
                    email:
                      type: string
                      description: 客户的电子邮箱地址。
                    ip_address:
                      type: string
                      description: 客户在注册时的 IP 地址。服务提供商要求提供该信息，用于在线 ACH 授权。
                    browser_info:
                      type: object
                      description: 浏览器元数据。服务提供商要求提供该信息，用于在线 ACH 授权。
                      properties:
                        user_agent:
                          type: string
                          description: 客户浏览器的完整 user-agent 字符串。
                payment_method:
                  type: object
                  description: 用于非卡类方式（例如银行转账/ACH）和 vault 选项的支付方式封装。
                  properties:
                    type:
                      type: string
                      description: >-
                        已注册工具的方式类型标签（例如 `ACH_ENROLLMENT`）。注册类型由顶层的 `type`
                        决定，该字段仅供参考。
                    vault_on_success:
                      type: boolean
                      description: 为 `true` 时，支付方式会在注册成功后存入 vault（保存）。
                    network_token:
                      type: boolean
                      description: >-
                        可选。仅限
                        `CARD`。对[网络令牌](/zh-hans/docs/security-and-compliance/network-tokens#choose-per-card)的单卡控制。`false`：Yuno
                        不为该卡配置网络令牌，包括未使用 CVV 注册的卡。`true` 或省略：Yuno
                        照常配置。要求您的组织已针对该卡的卡组织开通网络令牌；未开通时不会配置令牌，且注册不会失败。
                    vault_only:
                      type: boolean
                      description: >-
                        为 `true` 时，Yuno 会存储
                        `payment_method.detail.bank_transfer`
                        中的银行详细信息，并立即将支付方式注册为
                        `ENROLLED`，注册和取消注册时均不与服务提供商交互。仅适用于银行转账注册。
                    detail:
                      type: object
                      description: 正在注册的工具的特定方式详细信息。
                      properties:
                        bank_transfer:
                          type: object
                          required:
                            - beneficiary_name
                            - routing_number
                          properties:
                            account_type:
                              type: string
                              description: 银行账户类型。
                              enum:
                                - CHECKINGS
                                - SAVINGS
                            account_holder_type:
                              type: string
                              description: >-
                                账户持有人类型（例如
                                `INDIVIDUAL`、`ENTITY`）。该值会被接受并存储，但不会转发给 ACH
                                的服务提供商，也不会控制 ACH 注册中个人与公司的处理方式。
                              enum:
                                - INDIVIDUAL
                                - ENTITY
                            bank_id:
                              type: string
                              description: 银行标识符。MIN 3 / MAX 255。
                            bank_name:
                              type: string
                              description: 银行名称。MIN 3 / MAX 255。
                            bank_account:
                              type: string
                              description: 银行账号。MIN 3 / MAX 255。
                            beneficiary_name:
                              type: string
                              description: 账户受益人的姓名。MIN 3 / MAX 255。
                            branch:
                              type: string
                              description: 银行分行代码。MIN 1 / MAX 8。
                            branch_digit:
                              type: string
                              description: 分行校验位。MIN 1 / MAX 2。
                            routing_number:
                              type: string
                              description: 银行路由号码。MIN 3 / MAX 255。
                            code:
                              type: string
                              description: 银行代码。MIN 1 / MAX 8。
                            reference:
                              type: string
                              description: 与银行账户关联的参考信息。MIN 1 / MAX 255。
                            bank_account_mask_number:
                              type: string
                              description: 与银行转账关联的掩码银行账号（例如 ****6789）。这是账户数据，不是授权书数据。
                            mandate:
                              type: object
                              description: 直接借记授权书详情，适用于使用授权书的银行转账方式（例如 ACH、SEPA、BACS、PAD）。
                              properties:
                                id:
                                  type: string
                                  description: 授权书标识符，由支付服务提供商提供。
                                info:
                                  type: string
                                  description: Free-text mandate information.
                                received_status:
                                  type: string
                                  description: 表示是否已收到授权书的服务提供商状态。按支付服务提供商提供的原样转发。
                                existing_status:
                                  type: string
                                  description: 现有授权书的服务提供商状态。按支付服务提供商提供的原样转发。
                                created_at:
                                  type: string
                                  format: date-time
                                  description: 授权书的创建日期和时间（ISO 8601）。
                                updated_at:
                                  type: string
                                  format: date-time
                                  description: 授权书的最后更新日期和时间（ISO 8601）。
                                creditor_id:
                                  type: string
                                  description: >-
                                    直接借记授权的债权人标识符（例如显示在付款方银行对账单上的 SEPA
                                    债权人标识符）。MIN 1 / MAX 128。
                provider_data:
                  type: object
                  description: >-
                    用于令牌迁移或服务提供商令牌注册的服务提供商数据。当 `token_source` 为
                    `PROVIDER_API`、`MIGRATION_FILE` 或 `PROVIDER_TOKEN`
                    时发送该对象。使用前必须与您在 Yuno 的商务顾问协商一致。
                  required:
                    - id
                  properties:
                    id:
                      type: string
                      description: 支付服务提供商的唯一标识符。
                    token_source:
                      type: string
                      description: >-
                        所提供令牌的来源。注意：仅当顶层 `type` 为 `CARD` 时才支持 `PROVIDER_TOKEN`。与
                        `ACH_ENROLLMENT` 一起使用会返回错误。
                      enum:
                        - PROVIDER_API
                        - MIGRATION_FILE
                        - PROVIDER_TOKEN
                    payment_method_token:
                      type: string
                      description: 服务提供商的支付方式令牌。当 `token_source` 为 `PROVIDER_TOKEN` 时必填。
                    connection_id:
                      type: string
                      format: uuid
                      description: >-
                        服务提供商连接的标识符。当 `token_source` 为 `PROVIDER_API` 或
                        `PROVIDER_TOKEN` 时必填。
                verify:
                  type: object
                  description: 指示是否通过验证交易来验证该支付。您需要在 CARD 路由中定义服务提供商。默认为 false。
                  required:
                    - vault_on_success
                  properties:
                    vault_on_success:
                      type: boolean
                      description: 指示是否通过验证交易来验证该支付。您需要在 CARD 路由中定义服务提供商。默认为 false。
                    currency:
                      type: string
                      description: >-
                        卡验证的货币。完整的货币代码列表请参阅[国家参考](/zh-hans/reference/country-reference)（MAX
                        3；MIN 3；ISO 4217）。
                    external_subscription:
                      type: object
                      description: >-
                        将卡验证关联到在外部账单平台中管理的订阅。该对象会在注册响应中回显，并保存在验证支付上（响应中的
                        `verify.payment.id`），之后可通过检索支付和支付 webhook 进行关联；支付方式检索
                        endpoint 和注册 webhook 不会返回它。要求 `vault_on_success` 为
                        `true`，否则发送该对象会返回 `INVALID_PARAMETERS`。
                      properties:
                        id:
                          type: string
                          description: 您系统中该订阅的标识符。
                        customer_id:
                          type: string
                          description: 您系统中该订阅的客户的标识符。
                    metadata:
                      type: array
                      description: >-
                        验证的可选自定义键值标签（例如
                        order_ref、invoice）。它们会附加到验证所创建的内部验证支付上，并与支付 `metadata`
                        一样可在下游使用（支付数据、服务提供商网关请求、路由），同时与已注册支付方式的验证设置一起存储。最多 120
                        项。
                      items:
                        properties:
                          key:
                            type: string
                            description: >-
                              元数据键（MAX 48. Value: MIN:1, MAX:48）。**[Case
                              Sensitive]**
                          value:
                            type: string
                            description: >-
                              元数据键值（MAX 512. Value: MIN:1, MAX:512）。**[Case
                              Sensitive]**
                        required:
                          - key
                          - value
                        type: object
                recurring_payment:
                  type: object
                  description: 与已注册方式关联的定期/订阅账单元数据。
                  properties:
                    regular_billing:
                      type: object
                      properties:
                        label:
                          type: string
                          description: 定期账单计划的显示标签。
                        amount:
                          type: object
                          properties:
                            currency:
                              type: string
                              description: 账单货币，ISO 4217 格式（3 个字母）。
                            value:
                              type: number
                              description: 每个周期的账单金额。范围 0 至 9999999999。
                        interval_unit:
                          type: string
                          description: 账单周期单位。
                          enum:
                            - DAY
                            - WEEK
                            - MONTH
                            - YEAR
                        interval_count:
                          type: integer
                          description: >-
                            两次扣款之间的周期单位数量（例如当 `interval_unit` 为 `MONTH` 时，`1`
                            表示每月一次）。
            examples:
              Card Direct:
                value:
                  account_id: dbf0c133-86bc-4be0-94a5-ca2ff6778451
                  country: CO
                  type: CARD
                  workflow: DIRECT
                  card_data:
                    number: '4111111111111111'
                    holder_name: JOHN DOE
                    expiration_month: 12
                    expiration_year: 26
                    security_code: '212'
                    brand: VISA
                  customer_payer:
                    code: '12345'
                    organization_customer_external_id: ext-12345
                  verify:
                    vault_on_success: true
                    currency: COP
              ACH Enrollment:
                value:
                  account_id: dbf0c133-86bc-4be0-94a5-ca2ff6778451
                  country: US
                  type: ACH_ENROLLMENT
                  workflow: DIRECT
                  metadata:
                    - key: on_behalf_of
                      value: acct_1A2b3C4d5E6f7G8h
                    - key: order_ref
                      value: ABC-123
                  customer_payer:
                    code: <customer_code>
                    email: john@example.com
                    ip_address: 203.0.113.5
                    browser_info:
                      user_agent: >-
                        Mozilla/5.0 (Macintosh; Intel Mac OS X 14_0)
                        AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0
                        Safari/537.36
                  payment_method:
                    vault_on_success: true
                    detail:
                      bank_transfer:
                        bank_account: '000123456789'
                        routing_number: '110000000'
                        beneficiary_name: John Doe
                        account_type: CHECKINGS
                        bank_account_mask_number: '****6789'
                        mandate:
                          id: MND-123
                          info: free text mandate info
                          received_status: RECEIVED
                          existing_status: ACTIVE
                          created_at: '2026-07-09T00:00:00Z'
                          updated_at: '2026-07-09T00:00:00Z'
              SEPA mandate import (vault-only):
                value:
                  account_id: dbf0c133-86bc-4be0-94a5-ca2ff6778451
                  country: DE
                  type: SEPA_ENROLLMENT
                  payment_method:
                    vault_only: true
                    detail:
                      bank_transfer:
                        bank_account: DE89370400440532013000
                        bank_account_mask_number: '****3000'
                        beneficiary_name: Max Mustermann
                        account_holder_type: INDIVIDUAL
                        mandate:
                          id: MNDT-2019-000123
                          info: SEPA Core Direct Debit mandate
                          creditor_id: DE98ZZZ09999999999
                          received_status: RECEIVED
                          existing_status: ACTIVE
                          created_at: '2019-05-04T00:00:00Z'
                  customer_payer:
                    first_name: Max
                    last_name: Mustermann
                    email: max@example.com
              Token migration process:
                value:
                  account_id: dbf0c133-86bc-4be0-94a5-ca2ff6778451
                  country: MX
                  type: CARD
                  workflow: DIRECT
                  provider_data:
                    id: DLOCAL
                    token_source: PROVIDER_TOKEN
                    payment_method_token: tok_provider_abc123
                    connection_id: b1a2c3d4-e5f6-7890-abcd-ef1234567890
                  verify:
                    vault_on_success: true
              Card Enrollment With Verification:
                value:
                  account_id: dbf0c133-86bc-4be0-94a5-ca2ff6778451
                  country: US
                  type: CARD
                  workflow: DIRECT
                  card_data:
                    holder_name: John Doe
                    expiration_month: 3
                    expiration_year: 30
                    number: '4111111111111111'
                    security_code: '123'
                  verify:
                    vault_on_success: true
                    currency: USD
                    metadata:
                      - key: order_ref
                        value: ABC-123
              Provider token enrollment:
                summary: Enroll a provider-issued token (PROVIDER_TOKEN flow)
                value:
                  account_id: fe14c7c6-c75e-43b7-bdbe-4c87ad52c482
                  country: CO
                  type: CARD
                  card_data:
                    brand: VISA
                    lfd: '4242'
                  provider_data:
                    id: ADYEN
                    token_source: PROVIDER_TOKEN
                    payment_method_token: tok_provider_xyz
                    connection_id: f00d04b4-584f-4790-b51d-ceede8fd8f0f
      responses:
        '201':
          description: '201'
          content:
            application/json:
              examples:
                ACH Enrollment:
                  value:
                    type: ACH_ENROLLMENT
                    status: READY_TO_ENROLL
                    action: REDIRECT_URL
                    redirect_url: >-
                      https://payments.stripe.com/microdeposit/pacreq_test_placeholder
                    metadata:
                      - key: on_behalf_of
                        value: acct_1A2b3C4d5E6f7G8h
                      - key: order_ref
                        value: ABC-123
                Result:
                  value:
                    idempotency_key: 2ca58c6d-8794-4c8f-a2f6-bba4b7498b74
                    name: VISA ****1111
                    description: VISA ****1111
                    type: CARD
                    category: CARD
                    country: US
                    status: ENROLLED
                    sub_status: null
                    vaulted_token: cbdcc878-ceb4-4dd8-b0f0-49d444855de0
                    callback_url: www.example.com
                    action: null
                    created_at: '2024-06-06T13:32:49.715656Z'
                    updated_at: '2024-06-06T13:32:49.715656Z'
                    card_data:
                      iin: '41111111'
                      lfd: '1111'
                      holder_name: JOHN DOE
                      expiration_month: 3
                      expiration_year: 26
                      number_length: 16
                      security_code_length: 3
                      brand: VISA
                      issuer: JPMORGAN CHASE BANK N A
                      issuer_code: null
                      country_code: US
                      category: CREDIT
                      type: CREDIT
                      fingerprint: 55a7fe38-cdc3-45dc-8c5f-820751799c76
                    last_successfully_used: null
                    last_successfully_used_at: null
                    preferred: null
                    verify:
                      vault_on_success: false
                      payment: null
                    parent_type: null
                    redirect_url: null
                With Verify:
                  value:
                    idempotency_key: 2ca58c6d-8794-4c8f-a2f6-bba4b7498b74
                    name: VISA ****0000
                    description: VISA ****0000
                    type: CARD
                    category: CARD
                    country: US
                    status: ENROLLED
                    sub_status: null
                    vaulted_token: 9c298b36-b005-42ed-92e1-808b2a785e5f
                    callback_url: null
                    action: null
                    created_at: '2023-09-04T16:37:55.314018Z'
                    updated_at: '2023-09-04T16:37:55.314019Z'
                    card_data:
                      iin: '49880800'
                      lfd: '0000'
                      holder_name: JOHN DOE
                      expiration_month: 3
                      expiration_year: 30
                      number_length: 16
                      security_code_length: 3
                      brand: VISA
                      issuer: JPMORGAN CHASE BANK N A
                      issuer_code: null
                      country_code: US
                      category: BUSINESS ENHANCED
                      type: CREDIT
                      fingerprint: 55a7fe38-cdc3-45dc-8c5f-820751799c76
                    last_successfully_used: null
                    last_successfully_used_at: null
                    preferred: null
                    verify:
                      vault_on_success: true
                      currency: USD
                      payment:
                        id: 2ff3872a-9b62-412f-be3e-69689b184e5f
                        account_id: ad59c347-407c-4f11-841b-f3ac260cd018
                        description: VERIFY CARD
                        country: US
                        status: SUCCEEDED
                        sub_status: VERIFIED
                        merchant_order_id: VERIFY_CARD_9c298b36-b005-42ed-92e1-808b2a785e5f
                        created_at: '2023-09-04T16:37:55.352948Z'
                        updated_at: '2023-09-04T16:37:56.429675Z'
                        amount:
                          currency: USD
                          value: 0
                          refunded: 0
                          captured: 0
                        metadata:
                          - key: order_ref
                            value: ABC-123
                        transactions:
                          - id: 1e501f45-583b-4187-b42e-8c3e620d1ef5
                            type: VERIFY
                            status: SUCCEEDED
                            response_code: SUCCEEDED
                            response_message: Transaction successful
                            category: CARD
                            merchant_reference: VERIFY_CARD_9c298b36-b005-42ed-92e1-808b2a785e5f
                            provider_data:
                              id: ADYEN
                              transaction_id: SKCN8ZR5S8NKGK82
                              account_id: ''
                              status: Cancelled
                              sub_status: ''
                              status_detail: ''
                              response_message: ''
                              raw_response:
                                additionalData:
                                  threeds2.cardEnrolled: 'false'
                                merchantReference: >-
                                  VERIFY_CARD_9c298b36-b005-42ed-92e1-808b2a785e5f
                                refusalReason: FRAUD-CANCELLED
                                refusalReasonCode: '22'
                                resultCode: Cancelled
                              third_party_transaction_id: null
                            created_at: '2023-09-04T16:37:55.482510Z'
                            updated_at: '2023-09-04T16:37:56.348742Z'
                    parent_type: null
                    redirect_url: null
              schema:
                oneOf:
                  - type: object
                    properties:
                      idempotency_key:
                        type: string
                        example: 2ca58c6d-8794-4c8f-a2f6-bba4b7498b74
                      name:
                        type: string
                        example: VISA ****1111
                      description:
                        type: string
                        example: VISA ****1111
                      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: cbdcc878-ceb4-4dd8-b0f0-49d444855de0
                      metadata:
                        type: array
                      callback_url:
                        type: string
                        example: www.example.com
                      action:
                        type: string
                      redirect_url:
                        type: string
                        example: null
                      parent_type:
                        type: string
                        example: CARD
                      created_at:
                        type: string
                        example: '2024-06-06T13:32:49.715656Z'
                      updated_at:
                        type: string
                        example: '2024-06-06T13:32:49.715656Z'
                      card_data:
                        type: object
                        properties:
                          iin:
                            type: string
                            example: '41111111'
                          lfd:
                            type: string
                            example: '1111'
                          holder_name:
                            type: string
                            description: 支付服务提供商返回的持卡人姓名全称。
                            example: JOHN DOE
                          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: {}
                          country_code:
                            type: string
                            description: 卡发卡国家/地区的 ISO 3166-1 alpha-2 国家/地区代码。
                            example: US
                          category:
                            type: string
                            example: CREDIT
                          type:
                            type: string
                            example: CREDIT
                          fingerprint:
                            type: string
                            example: 55a7fe38-cdc3-45dc-8c5f-820751799c76
                      last_successfully_used: {}
                      last_successfully_used_at: {}
                      preferred: {}
                      verify:
                        type: object
                        properties:
                          vault_on_success:
                            type: boolean
                            example: false
                            default: true
                          payment: {}
                      provider_data:
                        type: object
                        description: 来自服务提供商的附加数据
                        properties:
                          raw_request:
                            type: object
                            description: Yuno 发送给服务提供商的请求的混淆副本。仅对列入允许名单的组织返回。
                          raw_response:
                            type: object
                  - title: 带验证
                    type: object
                    properties:
                      idempotency_key:
                        type: string
                        example: 2ca58c6d-8794-4c8f-a2f6-bba4b7498b74
                      name:
                        type: string
                        example: VISA ****0000
                      description:
                        type: string
                        example: VISA ****0000
                      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: 9c298b36-b005-42ed-92e1-808b2a785e5f
                      metadata:
                        type: array
                      callback_url: {}
                      action:
                        type: string
                      redirect_url:
                        type: string
                        example: null
                      created_at:
                        type: string
                        example: '2023-09-04T16:37:55.314018Z'
                      updated_at:
                        type: string
                        example: '2023-09-04T16:37:55.314019Z'
                      card_data:
                        type: object
                        properties:
                          iin:
                            type: string
                            example: '49880800'
                          lfd:
                            type: string
                            example: '0000'
                          holder_name:
                            type: string
                            description: 支付服务提供商返回的持卡人姓名全称。
                            example: JOHN DOE
                          expiration_month:
                            type: integer
                            example: 3
                            default: 0
                          expiration_year:
                            type: integer
                            example: 30
                            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: {}
                          country_code:
                            type: string
                            description: 卡发卡国家/地区的 ISO 3166-1 alpha-2 国家/地区代码。
                            example: US
                          category:
                            type: string
                            example: BUSINESS ENHANCED
                          type:
                            type: string
                            example: CREDIT
                          fingerprint:
                            type: string
                            example: 55a7fe38-cdc3-45dc-8c5f-820751799c76
                      last_successfully_used: {}
                      last_successfully_used_at: {}
                      preferred: {}
                      verify:
                        type: object
                        properties:
                          vault_on_success:
                            type: boolean
                            example: true
                            default: true
                          currency:
                            type: string
                            example: USD
                          payment:
                            type: object
                            properties:
                              id:
                                type: string
                                example: 2ff3872a-9b62-412f-be3e-69689b184e5f
                              account_id:
                                type: string
                                example: ad59c347-407c-4f11-841b-f3ac260cd018
                              description:
                                type: string
                                example: VERIFY CARD
                              country:
                                type: string
                                example: US
                              status:
                                type: string
                                example: SUCCEEDED
                              sub_status:
                                type: string
                                example: VERIFIED
                              merchant_order_id:
                                type: string
                                example: >-
                                  VERIFY_CARD_9c298b36-b005-42ed-92e1-808b2a785e5f
                              created_at:
                                type: string
                                example: '2023-09-04T16:37:55.352948Z'
                              updated_at:
                                type: string
                                example: '2023-09-04T16:37:56.429675Z'
                              amount:
                                type: object
                                properties:
                                  currency:
                                    type: string
                                    example: USD
                                  value:
                                    type: integer
                                    example: 0
                                    default: 0
                                  refunded:
                                    type: integer
                                    example: 0
                                    default: 0
                                  captured:
                                    type: integer
                                    example: 0
                                    default: 0
                              transactions:
                                type: array
                                items:
                                  type: object
                                  properties:
                                    id:
                                      type: string
                                      example: 1e501f45-583b-4187-b42e-8c3e620d1ef5
                                    type:
                                      type: string
                                      example: VERIFY
                                    status:
                                      type: string
                                      example: SUCCEEDED
                                    response_code:
                                      type: string
                                      example: SUCCEEDED
                                    response_message:
                                      type: string
                                      example: Transaction successful
                                    category:
                                      type: string
                                      example: CARD
                                    merchant_reference:
                                      type: string
                                      example: >-
                                        VERIFY_CARD_9c298b36-b005-42ed-92e1-808b2a785e5f
                                    provider_data:
                                      type: object
                                      properties:
                                        id:
                                          type: string
                                          example: ADYEN
                                        transaction_id:
                                          type: string
                                          example: SKCN8ZR5S8NKGK82
                                        account_id:
                                          type: string
                                          example: ''
                                        status:
                                          type: string
                                          example: Cancelled
                                        sub_status:
                                          type: string
                                          example: ''
                                        status_detail:
                                          type: string
                                          example: ''
                                        response_message:
                                          type: string
                                          example: ''
                                        raw_response:
                                          type: object
                                          properties:
                                            additionalData:
                                              type: object
                                              properties:
                                                threeds2.cardEnrolled:
                                                  type: string
                                                  example: 'false'
                                            merchantReference:
                                              type: string
                                              example: >-
                                                VERIFY_CARD_9c298b36-b005-42ed-92e1-808b2a785e5f
                                            refusalReason:
                                              type: string
                                              example: FRAUD-CANCELLED
                                            refusalReasonCode:
                                              type: string
                                              example: '22'
                                            resultCode:
                                              type: string
                                              example: Cancelled
                                        raw_request:
                                          type: object
                                          description: Yuno 发送给服务提供商的请求的混淆副本。仅对列入允许名单的组织返回。
                                        third_party_transaction_id: {}
                                    created_at:
                                      type: string
                                      example: '2023-09-04T16:37:55.482510Z'
                                    updated_at:
                                      type: string
                                      example: '2023-09-04T16:37:56.348742Z'
                              metadata:
                                type: array
                                description: 在 `verify.metadata` 中发送的自定义键值标签，由内部验证支付回显。
                                items:
                                  type: object
                                  properties:
                                    key:
                                      type: string
                                      example: order_ref
                                    value:
                                      type: string
                                      example: ABC-123
                      provider_data:
                        type: object
                        description: 来自服务提供商的附加数据
                        properties:
                          raw_request:
                            type: object
                            description: Yuno 发送给服务提供商的请求的混淆副本。仅对列入允许名单的组织返回。
                          raw_response:
                            type: object
                      parent_type:
                        nullable: true
                        description: 父类型。
        '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:
                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:
                Result:
                  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
      x-default: <Your private-secret-key>
      name: private-secret-key
    sec2:
      type: apiKey
      in: header
      name: X-Idempotency-Key
      x-default: <Your X-Idempotency-Key>

````

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