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

# Confirm a PaymentIntent

> 确认 PaymentIntent 以进行处理



## OpenAPI

````yaml /zh/global-acquiring/v1.6/payment.yaml post /v2/payment_intents/{id}/confirm
openapi: 3.0.2
info:
  title: Payment API
  version: 0.0.1
  x-source-en-commit: 821171b
  x-source-en-path: global-acquiring/v1.6/payment.yaml
  description: >
    UQPAY Payment API 让你接受付款、管理交易，并处理退款与出款。


    ## 功能概览

    - 使用卡、数字钱包和本地支付方式创建并确认 PaymentIntent

    - 处理全额和部分退款

    - 管理客户与已保存的支付方式

    - 创建出款与银行账户记录

    - 查询 PaymentAttempt、余额与交易历史


    ## 身份认证

    所有请求都需要携带有效的鉴权 Token，Token 通过 [Access
    Token](/zh/account-center/v1.6/api-reference/access-token) 接口获取。请在
    `x-auth-token` 请求头中携带该 Token。


    ## 幂等性

    POST 请求支持 `x-idempotency-key` 请求头，可在不重复创建资源的前提下安全重试。
  contact:
    name: UQPAY Support Team
    url: https://www.uqpay.com/support
    email: support@uqpay.com
  license:
    name: Proprietary
    url: https://www.uqpay.com/legal/api-terms
  termsOfService: https://www.uqpay.com/legal/terms
servers:
  - url: https://api-sandbox.uqpaytech.com/api
    description: 沙盒环境基础 URL。
  - url: https://api.uqpay.com/api
    description: 生产环境基础 URL。
security:
  - XAuthToken: []
tags:
  - name: Customers
    description: 创建和管理客户档案。客户对象保存支付方式和账单信息，可在多笔支付中复用。
  - name: Payment Intents
    description: >-
      PaymentIntent 引导你完成向客户收款的整个流程。建议你的系统中每个订单或客户会话只创建一个 PaymentIntent。之后可以引用该
      PaymentIntent，查看某次会话的 PaymentAttempt 历史。
  - name: Payment Attempts
    description: >-
      每当客户使用所选 PaymentMethod 付款时，都会创建一个 PaymentAttempt 对象。通过该 API
      可以了解客户是如何为订单付款的。
  - name: Payment Refunds
    description: >
      你可以创建多笔部分退款，直至累计达到原交易金额。每笔退款都会生成唯一记录，并自动校验可用余额。

      PaymentIntent 引导你完成向客户收款的整个流程。建议你的系统中每个订单或客户会话只创建一个 PaymentIntent。之后可以引用该
      PaymentIntent，查看某次会话的 PaymentAttempt 历史。
  - name: Payment Balances
    description: |
      支付余额管理让你查询不同币种的账户余额。你可以查询单个币种的余额，也可以分页查询所有币种的余额。
  - name: Payment Payouts
    description: |
      出款管理让你创建和管理用于资金划转的出款单。你可以创建出款、查询单笔出款，也可以分页并按条件筛选列出所有出款。
  - name: Terminal Management
    description: 用于 POS 设备注册和密钥管理的终端管理 API。
  - name: Bank Accounts
    description: |
      用于结算账户的银行账户管理 API。可创建、更新、查询和列出用于接收结算款项的银行账户。
paths:
  /v2/payment_intents/{id}/confirm:
    post:
      tags:
        - Payment Intents
      summary: Confirm a PaymentIntent
      description: 确认 PaymentIntent 以进行处理
      operationId: confirm-payment-intent
      parameters:
        - $ref: '#/components/parameters/PaymentIntentId'
        - $ref: '#/components/parameters/XOnBehalfOf'
        - $ref: '#/components/parameters/XIdempotencyKey'
        - $ref: '#/components/parameters/XClientID'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PaymentIntentConfirmRequest'
      responses:
        '200':
          description: 成功确认 PaymentIntent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentIntentCreateResponse'
components:
  parameters:
    PaymentIntentId:
      name: id
      in: path
      required: true
      description: PaymentIntent 的唯一 ID。
      schema:
        type: string
        example: PI1925112193204883441
    XOnBehalfOf:
      in: header
      name: x-on-behalf-of
      schema:
        type: string
      required: false
      description: >
        指定代表哪个子账户发起该请求。应设置为 `account_id`，可通过 [List Connected
        Accounts](/zh/account-center/v1.6/api-reference/list-connected-accounts)
        获取。若省略或为空，则使用主账户执行请求。

        更多信息见 [Connected
        Accounts](/zh/account-center/v1.6/guide/connected-accounts)。
      example: 18523f72-f4de-4f9c-bb8e-ec7d1c4f32be
    XIdempotencyKey:
      in: header
      name: x-idempotency-key
      schema:
        type: string
        format: uuid
      required: true
      description: 用于保持操作幂等性的唯一标识符（UUID），确保同一操作重复执行不会产生意外影响或重复结果。它有助于在网络错误、重试或故障时保持数据一致性。
      example: 2adesf8e-9d63-44bc-b975-9b6ae3440dde
    XClientID:
      in: header
      name: x-client-id
      schema:
        type: string
      required: true
      description: UQPAY 生成的 API 客户端 ID
      example: Up1HIsjiETgON9PMGPXLy7
  schemas:
    PaymentIntentConfirmRequest:
      type: object
      properties:
        payment_method:
          $ref: '#/components/schemas/PaymentMethod'
        ip_address:
          $ref: '#/components/schemas/IpAddress'
        browser_info:
          $ref: '#/components/schemas/BrowserInfo'
        return_url:
          $ref: '#/components/schemas/ReturnUrl'
    PaymentIntentCreateResponse:
      type: object
      required:
        - payment_intent_id
        - amount
        - currency
        - intent_status
      properties:
        payment_intent_id:
          type: string
          example: b1c2d3e4-f5a6-b7c8-d9e0-f1a2b3c4d5e6
          description: PaymentIntent 的唯一标识
          maxLength: 36
        amount:
          $ref: '#/components/schemas/Amount'
          example: '10.12'
          description: 支付金额。即你希望向客户收取的订单金额。
        currency:
          $ref: '#/components/schemas/Currency'
          example: SGD
        description:
          type: string
          description: 创建 PaymentIntent 时的描述符。
          maxLength: 255
        available_payment_method_types:
          type: array
          nullable: true
          description: 该 PaymentIntent 可用的支付方式类型。
          items:
            type: string
        captured_amount:
          $ref: '#/components/schemas/Amount'
          example: '10.12'
          description: 从该 PaymentIntent 已请款的金额。
        customer:
          $ref: '#/components/schemas/CustomerResponse'
          description: >-
            与该 PaymentIntent 关联的客户快照。在创建时提供了 `customer` 或 `customer_id`
            时返回。客户的唯一标识在顶层以 `customer_id` 暴露；该对象内部不包含 `id` 字段。
        customer_id:
          type: string
          description: 与该 PaymentIntent 关联的客户 ID。访客结账时为空。
          example: cus_asyknf3wlfxhs1s6plamk80i8v
          maxLength: 36
        cancel_time:
          $ref: '#/components/schemas/DateTime'
          description: >-
            该 PaymentIntent 最近一次被取消的时间。仅当 PaymentIntent 成功取消（即状态为
            `CANCELLED`）时存在。
        cancellation_reason:
          type: string
          description: 取消该 PaymentIntent 的原因。
          example: Order cancelled
        client_secret:
          $ref: '#/components/schemas/ClientSecret'
          example: eyJhbGciOiJI***********ujNdZ1DF9CqWEfF1jphxI
        merchant_order_id:
          $ref: '#/components/schemas/MerchantOrderId'
          example: 1bf70d90-9ed0-48ce-9370-9bd7ef6ab9ee
        metadata:
          $ref: '#/components/schemas/Metadata'
        next_action:
          $ref: '#/components/schemas/NextAction'
        return_url:
          type: string
          description: 支付认证完成后用于跳转客户的网页 URL 或应用 scheme URI。
          example: https://127.0.0.1:8080/api/v1/callback
        create_time:
          $ref: '#/components/schemas/DateTime'
          description: 该 PaymentIntent 的创建时间。
        complete_time:
          $ref: '#/components/schemas/DateTime'
          description: 该 PaymentIntent 达到最终状态的时间。
        update_time:
          $ref: '#/components/schemas/DateTime'
          description: 该 PaymentIntent 最近一次更新或操作的时间。
        latest_payment_attempt:
          $ref: '#/components/schemas/PaymentAttemptResponse'
          description: 该 PaymentIntent 下创建的最新 PaymentAttempt。
        intent_status:
          $ref: '#/components/schemas/PaymentIntentStatus'
    PaymentMethod:
      type: object
      properties:
        type:
          type: string
      description: 用于确认 PaymentIntent 的支付方式详情。设置 `payment_method` 后，PaymentIntent 将自动确认。
      discriminator:
        propertyName: type
        mapping:
          card:
            $ref: '#/components/schemas/CardPaymentMethod'
          card_present:
            $ref: '#/components/schemas/CardPresentMethod'
          applepay:
            $ref: '#/components/schemas/ApplePayPaymentMethod'
          googlepay:
            $ref: '#/components/schemas/GooglePayPaymentMethod'
          alipaycn:
            $ref: '#/components/schemas/AlipayCNPaymentMethod'
          alipayhk:
            $ref: '#/components/schemas/AlipayHkPaymentMethod'
          unionpay:
            $ref: '#/components/schemas/UnionPayPaymentMethod'
          wechatpay:
            $ref: '#/components/schemas/WeChatPayPaymentMethod'
          grabpay:
            $ref: '#/components/schemas/GrabPayPaymentMethod'
          crypto:
            $ref: '#/components/schemas/CryptoPaymentMethod'
          paynow:
            $ref: '#/components/schemas/PayNowPaymentMethod'
          truemoney:
            $ref: '#/components/schemas/TruemoneyPaymentMethod'
          tng:
            $ref: '#/components/schemas/TngPaymentMethod'
          gcash:
            $ref: '#/components/schemas/GCashPaymentMethod'
          dana:
            $ref: '#/components/schemas/DanaPaymentMethod'
          kakaopay:
            $ref: '#/components/schemas/KakaopayPaymentMethod'
          toss:
            $ref: '#/components/schemas/TossPaymentMethod'
          naverpay:
            $ref: '#/components/schemas/NaverpayPaymentMethod'
      oneOf:
        - $ref: '#/components/schemas/CardPaymentMethod'
        - $ref: '#/components/schemas/CardPresentMethod'
        - $ref: '#/components/schemas/ApplePayPaymentMethod'
        - $ref: '#/components/schemas/GooglePayPaymentMethod'
        - $ref: '#/components/schemas/AlipayCNPaymentMethod'
        - $ref: '#/components/schemas/AlipayHkPaymentMethod'
        - $ref: '#/components/schemas/UnionPayPaymentMethod'
        - $ref: '#/components/schemas/WeChatPayPaymentMethod'
        - $ref: '#/components/schemas/GrabPayPaymentMethod'
        - $ref: '#/components/schemas/CryptoPaymentMethod'
        - $ref: '#/components/schemas/PayNowPaymentMethod'
        - $ref: '#/components/schemas/TruemoneyPaymentMethod'
        - $ref: '#/components/schemas/TngPaymentMethod'
        - $ref: '#/components/schemas/GCashPaymentMethod'
        - $ref: '#/components/schemas/DanaPaymentMethod'
        - $ref: '#/components/schemas/KakaopayPaymentMethod'
        - $ref: '#/components/schemas/TossPaymentMethod'
        - $ref: '#/components/schemas/NaverpayPaymentMethod'
    IpAddress:
      type: string
      maxLength: 45
      description: |
        设备的 IPv4 或 IPv6 地址。

        当 `payment_method.card.three_ds_action=enforce_3ds` 时必填。
        否则可选。
      example: 212.121.222.123
    BrowserInfo:
      type: object
      description: |
        为风险与欺诈防控收集的浏览器信息。
        当 `three_ds_action=enforce_3ds` 时必填
      required:
        - accept_header
        - browser
        - language
        - screen_color_depth
        - screen_height
        - screen_width
      properties:
        accept_header:
          type: string
          maxLength: 256
          description: 浏览器 accept header
          example: '*/*'
        browser:
          type: object
          description: 浏览器相关信息
          required:
            - user_agent
          properties:
            java_enabled:
              type: boolean
              description: 浏览器是否启用 Java
            javascript_enabled:
              type: boolean
              description: 浏览器是否启用 JavaScript
            user_agent:
              type: string
              maxLength: 256
              description: 浏览器 user agent 字符串
              example: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)
        device_id:
          type: string
          maxLength: 36
          description: 唯一设备标识
          example: 00000000-000000000000000
        language:
          type: string
          maxLength: 8
          pattern: ^[a-zA-Z]{2}(-[a-zA-Z]{2})?$
          description: ISO 语言代码（如 EN）或语言-地区（如 en-US）
          example: en-US
        location:
          type: object
          description: 设备地理位置（如可用）
          properties:
            lat:
              type: string
              maxLength: 12
              pattern: ^-?\d{1,3}\.\d+$
              description: 纬度坐标
              example: '-37.81892'
            lon:
              type: string
              maxLength: 12
              pattern: ^-?\d{1,3}\.\d+$
              description: 经度坐标
              example: '144.95913'
        mobile:
          type: object
          description: 移动设备专属信息。当交易从移动客户端发起时必须提供该对象。对于基于网页的集成，该对象应设为 null。
          properties:
            device_model:
              type: string
              maxLength: 46
              description: 移动设备型号名称
              example: Apple IPHONE 7
            os_type:
              type: string
              enum:
                - IOS
                - ANDROID
              description: 移动操作系统
            os_version:
              type: string
              maxLength: 32
              description: 操作系统版本
              example: IOS 14.5
        screen_color_depth:
          type: integer
          minimum: 1
          maximum: 48
          description: 屏幕色深（比特）
          example: 24
        screen_height:
          type: integer
          minimum: 1
          maximum: 9999
          description: 屏幕高度（像素）
          example: 1080
        screen_width:
          type: integer
          minimum: 1
          maximum: 9999
          description: 屏幕宽度（像素）
          example: 1920
        timezone:
          type: string
          maxLength: 8
          description: 相对 UTC 的时区偏移（如 -2 或 8）
          example: '-2'
    ReturnUrl:
      type: string
      maxLength: 1024
      description: 支付认证完成后用于跳转客户的网页 URL 或应用 scheme URI。
    Amount:
      type: string
    Currency:
      type: string
      description: 三位币种代码
    CustomerResponse:
      type: object
      properties:
        id:
          type: string
          description: 客户的唯一 ID
          example: cus_hkduz3gvz1feg25e87fjcahsxq
        external_customer_id:
          type: string
          description: 客户在你自有系统中的标识，若在创建时提供则会原样返回。
          example: CUS_1715740800123
          maxLength: 128
        first_name:
          type: string
          description: 客户的名字
          example: John
          maxLength: 64
        last_name:
          type: string
          description: 客户的姓氏
          example: Doe
          maxLength: 64
        email:
          type: string
          format: email
          description: 客户的电子邮箱地址
          example: john.doe@example.com
          maxLength: 254
        phone_number:
          type: string
          description: 客户的电话号码
          example: +1 123456789
          maxLength: 32
        address:
          $ref: '#/components/schemas/Address'
        metadata:
          $ref: '#/components/schemas/Metadata'
        create_time:
          $ref: '#/components/schemas/DateTime'
          description: 该客户的创建时间。
          example: '2025-03-21T17:17:32+08:00'
        update_time:
          $ref: '#/components/schemas/DateTime'
          description: 该客户最近一次更新或操作的时间。
          example: '2025-03-21T17:17:32+08:00'
    DateTime:
      type: string
      format: date/time
      example: '2024-03-01T00:00:00+08:00'
    ClientSecret:
      type: string
      description: >-
        用于浏览器或 App 的 PaymentIntent client secret。由 PaymentIntent 创建接口或查询接口返回。返回的
        client_secret 有效期为 60 分钟。
    MerchantOrderId:
      type: string
      maxLength: 36
      description: 商户系统中为该 PaymentIntent 创建的商户参考 ID
    Metadata:
      additionalProperties:
        maxLength: 512
        type: string
      example:
        key1: value1
        key2: value2
      description: 任意键值对象。最大长度 = 512 字节。必须是合法的 JSON 数据。
      type: object
    NextAction:
      type: object
      description: 若存在，该属性会告诉你：为了让客户使用所提供的来源完成支付，你需要采取哪些操作。
      required:
        - type
      properties:
        type:
          type: string
          description: |
            继续支付所需的操作类型。
            - `redirect_to_url`：将客户跳转到某个 URL 进行认证（如 3DS 验证或钱包登录）。
            - `display_qr_code`：展示二维码，供客户用其支付 App 扫描。
            - `display_bank_details`：展示银行账户信息，供客户完成手动银行转账。
            - `redirect_iframe`：将返回的 iframe HTML 嵌入你的页面，以展示内嵌认证界面。
          enum:
            - redirect_to_url
            - display_qr_code
            - display_bank_details
            - redirect_iframe
        redirect_to_url:
          type: object
          description: 包含通过将客户跳转到另一个页面或应用来认证支付的指示信息。
          properties:
            url:
              type: string
              format: uri
              description: 你必须将客户跳转到的 URL，用于认证支付。
              example: https://example.checkout-page.com
            return_url:
              type: string
              format: uri
              description: 如果客户在认证过程中未退出浏览器，认证完成后将被跳转到此指定 URL。
              example: https://example.payment-result-page.com
        redirect_iframe:
          type: object
          description: 包含使用 iframe 嵌入方式认证支付的指示信息。客户端需要将返回的 iframe 脚本内容嵌入页面，以完成支付认证流程。
          properties:
            iframe:
              type: string
              format: html
              description: 完整的 iframe HTML 脚本内容，包含认证页面的嵌入代码。客户端必须将该脚本直接嵌入页面，以展示认证界面。
        display_qr_code:
          type: object
          description: 包含二维码信息的字段。
          properties:
            qr_code_url:
              type: string
              description: 托管的微信支付说明页 URL，客户可在该页查看微信支付二维码。
              example: >-
                https://sg-acquiring-bucket-sandbox.s3.ap-southeast-1.amazonaws.com/payment/20250829/qrcode_PA1961262701099356160?X-Amz-Algorithm=AWS4-HMAC-SHA256\u0026X-Amz-Credential=ASIAY******f987429
            expires_at:
              type: string
              format: date-time
              description: 二维码过期的时间（unix 时间戳）。
        display_bank_details:
          type: object
          description: 包含客户完成支付所需的银行转账信息。
          properties:
            bank_name:
              type: string
              description: 账户的开户行名称。
            account_number:
              type: string
              description: 账号。
              example: GB71950018692652646598
            routing_number:
              type: string
              description: 路由号（routing number）。
              example: '012345678'
    PaymentAttemptResponse:
      type: object
      required:
        - attempt_id
        - amount
        - currency
      properties:
        attempt_id:
          type: string
          description: 该 PaymentAttempt 的唯一标识。
          example: 24fc62b4-90d1-42e3-96ab-dd54ccc648b3
        amount:
          $ref: '#/components/schemas/Amount'
          example: '9.98'
          description: 该 PaymentAttempt 的金额。
        currency:
          $ref: '#/components/schemas/Currency'
          example: SGD
        captured_amount:
          $ref: '#/components/schemas/Amount'
          description: 已请款金额。
          example: '0.00'
        refunded_amount:
          $ref: '#/components/schemas/Amount'
          description: 已退款金额。
          example: '0.00'
        create_time:
          $ref: '#/components/schemas/DateTime'
          description: 该 PaymentAttempt 的创建时间。
          example: '2025-03-21T17:17:32+08:00'
        update_time:
          $ref: '#/components/schemas/DateTime'
          description: 该 PaymentAttempt 最近一次更新或操作的时间。
          example: '2025-03-21T17:17:32+08:00'
        complete_time:
          $ref: '#/components/schemas/DateTime'
          description: 该 PaymentAttempt 的完成时间。
        cancellation_reason:
          type: string
          description: 取消该 PaymentIntent 的原因。
          example: Order cancelled
        auth_code:
          type: string
          description: 授权成功后由发卡行返回的授权码。
          example: A12B3C
        arn:
          type: string
          description: 收单参考号（ARN）。一个 23 位标识，用于跨机构对账和拒付追踪。
          example: '74537604221222132710572'
        rrn:
          type: string
          description: 检索参考号（RRN）。一个 12 位标识，用于交易查询和客服查询。
          example: '123456789012'
        advice_code:
          type: string
          description: |
            发卡行建议码，指示拒绝后的推荐操作。帮助商户实施智能重试策略。

            - `01`：新的尝试可能成功。建议重试。
            - `02`：请勿重试。请尝试其他支付方式。
            - `03`：请勿重试。持卡人应联系其发卡行。
            - `21`：取消所有待处理的授权。卡片可能已泄露。
            - `85`：请勿重试。发卡行不会批准此类交易。
          enum:
            - '01'
            - '02'
            - '03'
            - '21'
            - '85'
          example: '01'
        authentication_data:
          type: object
          description: 该 PaymentAttempt 的认证与验证数据。
          properties:
            cvv_result:
              type: string
              description: |
                由发卡行返回的 CVV/CVC 验证结果。

                - `M`：匹配。
                - `N`：不匹配。
                - `P`：未处理。
                - `U`：不支持。
              enum:
                - M
                - 'N'
                - P
                - U
            avs_result:
              type: string
              description: 地址验证系统（AVS）结果。指示所提供的账单地址是否与发卡行的记录匹配。
              example: 'Y'
            three_ds:
              $ref: '#/components/schemas/CardThreeDSResponse'
        payment_method:
          $ref: '#/components/schemas/PaymentMethodResponse'
          description: 该 PaymentAttempt 所使用的支付方式详情。
        failure_code:
          $ref: '#/components/schemas/FailureCode'
        attempt_status:
          type: string
          description: |
            该 PaymentAttempt 的状态。
            - `INITIATED`：已根据初始请求创建 PaymentAttempt。
            - `AUTHENTICATION_REDIRECTED`：等待客户完成身份验证，例如 3D Secure 或扫描二维码。
            - `PENDING_AUTHORIZATION`：已收到授权请求，正在等待支付渠道的最终决定。
            - `AUTHORIZED`：授权已成功完成。将根据配置自动或手动请款。
            - `CAPTURE_REQUESTED`：请款请求已成功提交，支付视为完成。
            - `SETTLED`：资金已从支付渠道结算并由 UQPAY 收到。
            - `SUCCEEDED`：UQPAY 已将资金结算至你的钱包。
            - `CANCELLED`：PaymentAttempt 已取消。若有已授权资金，将退回给客户。
            - `EXPIRED`：PaymentAttempt 未在允许的时间窗口内完成，已过期。
            - `FAILED`：PaymentAttempt 已失败。请创建新的 PaymentAttempt 重试。
          example: INITIATED
          enum:
            - INITIATED
            - AUTHENTICATION_REDIRECTED
            - PENDING_AUTHORIZATION
            - AUTHORIZED
            - CAPTURE_REQUESTED
            - SETTLED
            - SUCCEEDED
            - CANCELLED
            - EXPIRED
            - FAILED
    PaymentIntentStatus:
      type: string
      description: >
        该 PaymentIntent 的状态。


        - `REQUIRES_PAYMENT_METHOD`：PaymentIntent 正在等待确认请求。

        - `REQUIRES_CUSTOMER_ACTION`：PaymentIntent 正在等待客户进一步的认证操作，例如 3DS
        验证和扫描二维码。请查看 `next_action`。

        - `REQUIRES_CAPTURE`：PaymentIntent 正在等待你请款以完成支付。

        - `PENDING`：PaymentIntent 正在等待支付渠道返回最终结果，无需进一步操作。

        - `SUCCEEDED`：PaymentIntent 已成功，支付完成。

        - `CANCELLED`：PaymentIntent 已按你的请求取消，支付已关闭。

        - `FAILED`：PaymentIntent 已失败。
      enum:
        - REQUIRES_PAYMENT_METHOD
        - REQUIRES_CUSTOMER_ACTION
        - REQUIRES_CAPTURE
        - PENDING
        - SUCCEEDED
        - CANCELLED
        - FAILED
    CardPaymentMethod:
      title: card
      type: object
      required:
        - type
        - card
      properties:
        type:
          type: string
          enum:
            - card
        card:
          type: object
          required:
            - card_name
            - card_number
            - expiry_month
            - expiry_year
            - cvc
            - network
            - billing
            - three_ds_action
            - authorization_type
          properties:
            card_name:
              type: string
              description: 持卡人姓名。最大长度为 128。
            card_number:
              type: string
              description: 卡号。
            expiry_month:
              type: string
              description: 表示卡片到期月份的两位数字。
            expiry_year:
              type: string
              description: 表示卡片到期年份的四位数字。
            cvc:
              type: string
              description: 该卡的 CVC 码对所有交易均为必填，但由商户发起或涉及网络令牌化的交易除外。
            network:
              type: string
              description: 卡组织。所列卡组织为该字段的可接受取值。可用性在账户层级评估。
              enum:
                - visa
                - mastercard
                - unionpay
            billing:
              $ref: '#/components/schemas/CardBilling'
            auto_capture:
              type: boolean
              default: false
              description: 指定支付授权后是否自动请款。如果你希望稍后再请款，请设为 `false`。
            authorization_type:
              type: string
              description: >-
                卡支付的授权类型。可选 `authorization`（默认）和 `pre_authorization`。使用
                `pre_authorization` 可冻结资金超过 7 天，仅 Visa 和 Mastercard 支持。预授权时
                `auto_capture` 必须为 `false`。
              enum:
                - authorization
                - pre_authorization
            three_ds_action:
              type: string
              description: |
                控制此支付的 3D Secure 行为：
                - `enforce_3ds`：始终触发 3DS 认证，无论发卡行的风险评估结果如何。
                - `skip_3ds`：跳过 3DS 认证。拒付责任仍由商户承担。
              enum:
                - enforce_3ds
                - skip_3ds
            three_ds:
              $ref: '#/components/schemas/CardThreeDS'
    CardPresentMethod:
      title: card_present
      type: object
      required:
        - type
        - card_present
      properties:
        type:
          type: string
          enum:
            - card_present
        card_present:
          type: object
          required:
            - card_number
            - expiry_month
            - expiry_year
            - pan_entry_mode
          properties:
            card_number:
              type: string
              description: 卡号。
            expiry_month:
              type: string
              description: 月份（MM）
            expiry_year:
              type: string
              description: 年份（YYYY）
            cardholder_verification_method:
              type: string
              description: |
                在销售点用于验证持卡人身份的方式。
                - `online_pin`：持卡人输入 PIN，由发卡行在线验证。
                - `manual_signature`：持卡人提供手写签名。
                - `skipped`：未执行持卡人验证（例如低于限额的非接触支付）。
              enum:
                - online_pin
                - manual_signature
                - skipped
            encrypted_pin:
              type: string
              description: 加密的个人识别码（PIN）。
            pan_entry_mode:
              type: string
              enum:
                - manual_entry
                - chip
                - magstripe
                - contactless_chip
                - contactless_magstripe
              description: |
                终端读取卡片信息的方式：
                - `manual_entry`：手动键入 POS 终端
                - `chip`：通过直接接触芯片卡读取
                - `magstripe`：通过直接接触磁条卡读取
                - `contactless_chip`：通过非接触接口使用芯片数据读取
                - `contactless_magstripe`：通过非接触接口使用磁条数据（MSD）读取
            fallback:
              type: boolean
              default: false
              description: >
                默认为 false。在以下情况设为 true：

                - 芯片卡在支持芯片的终端上无法使用芯片或磁条数据完成交易，转而使用手动录入方式

                - 芯片卡在支持芯片的终端上无法使用芯片数据完成交易，转而使用 `contact_magnetic_stripe_card`
                录入方式
            fallback_reason:
              type: string
              enum:
                - chip_read_failure
              description: |
                当 fallback 为 true 时适用的回退原因。
                当满足以下所有条件时设为 `chip_read_failure`：
                - 交易在支持芯片的终端上发起
                - `pan_entry_mode` 为 `magstripe`
                - 该终端发起的上一笔交易为芯片读取失败
            emv_tags:
              type: string
              description: |
                从芯片卡读取的标签-长度-值（TLV）编码数据。
            track1:
              type: string
              description: 从磁条卡读取的 Track 1 数据
            track2:
              type: string
              description: |
                从磁条卡读取的 Track 2，或为从芯片卡获取的
                Track 2 等效数据。
                当 pan_entry_mode 不为 `manual_entry` 时，Track 2 为必填。
            terminal_info:
              type: object
              properties:
                terminal_id:
                  type: string
                  maxLength: 8
                  description: 最多 8 位的字母数字 ID，用于在用户 POS 系统的受卡方位置标识终端。
                mobile_device:
                  type: boolean
                  default: false
                  description: 指示该 POS 终端是否为移动 POS 设备。
                system_trace_audit_number:
                  type: string
                  maxLength: 6
                  minLength: 6
                  pattern: ^[0-9]{6}$
                  description: 系统跟踪审计号（STAN）。一个 6 位数字序列，唯一标识终端处理的每笔交易。对交易对账和争议处理至关重要。
                use_embedded_reader:
                  type: boolean
                  default: true
                  description: 指示读卡器是否内嵌于移动 POS 设备中。
    ApplePayPaymentMethod:
      title: applepay
      type: object
      required:
        - type
        - applepay
      properties:
        type:
          type: string
          enum:
            - applepay
        applepay:
          type: object
          required:
            - flow
            - network
            - token_type
            - auth_method
            - network_token
          description: Apple Pay 支付信息。当 `type` 设为 `applepay` 时必填。
          properties:
            flow:
              type: string
              description: |
                指定收银流程类型：
                - `redirect`：基于跳转的在线支付
                - `mobile_web`：移动浏览器（H5）支付
                - `mobile_app`：原生应用支付
                - `contactless`：线下 NFC 非接触支付
              enum:
                - redirect
                - mobile_web
                - mobile_app
                - contactless
            os_type:
              type: string
              description: 当 `flow` 为 `mobile_web` 或 `mobile_app` 时必填。Apple Pay 固定为 `ios`。
              enum:
                - ios
            is_present:
              type: boolean
              description: 客户在支付时是否在场。线下（非接触）支付设为 `true`，在线支付设为 `false`。
              default: false
            network:
              type: string
              description: 卡组织（小写）。
              enum:
                - visa
                - mastercard
                - amex
                - discover
                - jcb
            card_type:
              type: string
              description: 卡的类型。
              enum:
                - debit
                - credit
            token_type:
              type: string
              description: |
                Token 数据格式：
                - `decrypted`：商户已解密 Apple Pay Token，并提供结构化的 DPAN + Cryptogram 数据
                - `encrypted`：原始加密的 Apple Pay Token（保留供将来使用）
              enum:
                - decrypted
                - encrypted
            auth_method:
              type: string
              description: |
                Apple Pay 使用的认证方式：
                - `cryptogram_3ds`：Token 包含密文（cryptogram），已应用 3DS，无需额外 3DS。
                - `pan_only`：Token 仅包含 PAN 数据。可能触发额外的 3DS 验证。
              enum:
                - cryptogram_3ds
                - pan_only
            network_token:
              type: object
              required:
                - number
                - expiry_month
                - expiry_year
                - cryptogram
              description: 解密后的网络令牌（Network Token）数据。当 `token_type` 为 `decrypted` 时必填。
              properties:
                number:
                  type: string
                  description: 设备主账号（DPAN），12-52 个字符。
                  minLength: 12
                  maxLength: 52
                  example: '4176660000000027'
                expiry_month:
                  type: string
                  description: 两位到期月份（01-12）。
                  minLength: 2
                  maxLength: 2
                  example: '12'
                expiry_year:
                  type: string
                  description: 四位到期年份。
                  minLength: 4
                  maxLength: 4
                  example: '2027'
                cryptogram:
                  type: string
                  description: >-
                    在线支付密文（Online Payment Cryptogram，Base64 编码）。仅当 `auth_method`
                    为 `cryptogram_3ds` 时必填。
                  example: AgAAAAAABk4DWZ4C28yUQAAAAAA=
                eci:
                  type: string
                  description: >-
                    电子商务指示符（ECI）。仅当 `auth_method` 为 `cryptogram_3ds`
                    时必填。典型值：`07`。
                  example: '07'
            billing_contact:
              type: object
              description: 来自 Apple Pay 的账单联系人信息。
              properties:
                first_name:
                  type: string
                  description: 名（first name）。
                last_name:
                  type: string
                  description: 姓（last name）。
                email:
                  type: string
                  format: email
                  description: 电子邮箱地址。
                phone:
                  type: string
                  description: 电话号码。
                address:
                  type: object
                  description: 账单地址。
                  properties:
                    street:
                      type: string
                      description: 街道地址。
                    city:
                      type: string
                      description: 城市。
                    state:
                      type: string
                      description: 州或省。
                    postal_code:
                      type: string
                      description: 邮政编码。
                    country_code:
                      type: string
                      description: 国家代码（ISO 3166-1 alpha-2）。
    GooglePayPaymentMethod:
      title: googlepay
      type: object
      required:
        - type
        - googlepay
      properties:
        type:
          type: string
          enum:
            - googlepay
        googlepay:
          type: object
          required:
            - flow
            - network
            - token_type
            - auth_method
            - network_token
          description: Google Pay 支付信息。当 `type` 设为 `googlepay` 时必填。
          properties:
            flow:
              type: string
              description: |
                指定收银流程类型：
                - `redirect`：基于跳转的在线支付
                - `mobile_web`：移动浏览器（H5）支付
                - `mobile_app`：原生应用支付
                - `contactless`：线下 NFC 非接触支付
              enum:
                - redirect
                - mobile_web
                - mobile_app
                - contactless
            os_type:
              type: string
              description: >-
                当 `flow` 为 `mobile_web` 或 `mobile_app` 时必填。取 `ios` 或 `android`
                之一。
              enum:
                - ios
                - android
            is_present:
              type: boolean
              description: 客户在支付时是否在场。线下（非接触）支付设为 `true`，在线支付设为 `false`。
              default: false
            network:
              type: string
              description: 卡组织（小写）。
              enum:
                - visa
                - mastercard
                - amex
                - discover
                - jcb
            card_type:
              type: string
              description: 卡的类型。
              enum:
                - debit
                - credit
            token_type:
              type: string
              description: >
                Token 数据格式：

                - `decrypted`：商户已解密 Google Pay Token，并提供结构化的 DPAN + Cryptogram
                数据

                - `encrypted`：原始加密的 Google Pay Token（保留供将来使用）
              enum:
                - decrypted
                - encrypted
            auth_method:
              type: string
              description: |
                Google Pay 使用的认证方式：
                - `cryptogram_3ds`：Token 包含密文（cryptogram），已应用 3DS，无需额外 3DS。
                - `pan_only`：Token 仅包含 PAN 数据。可能触发额外的 3DS 验证。
              enum:
                - cryptogram_3ds
                - pan_only
            network_token:
              type: object
              required:
                - number
                - expiry_month
                - expiry_year
              description: 解密后的网络令牌（Network Token）数据。当 `token_type` 为 `decrypted` 时必填。
              properties:
                number:
                  type: string
                  description: 设备主账号（DPAN），12-52 个字符。
                  minLength: 12
                  maxLength: 52
                  example: '4176660000000027'
                expiry_month:
                  type: string
                  description: 两位到期月份（01-12）。
                  minLength: 2
                  maxLength: 2
                  example: '12'
                expiry_year:
                  type: string
                  description: 四位到期年份。
                  minLength: 4
                  maxLength: 4
                  example: '2027'
                cryptogram:
                  type: string
                  description: >-
                    在线支付密文（Online Payment Cryptogram，Base64 编码）。仅当 `auth_method`
                    为 `cryptogram_3ds` 时必填。
                  example: AgAAAAAABk4DWZ4C28yUQAAAAAA=
                eci:
                  type: string
                  description: >-
                    电子商务指示符（ECI）。仅当 `auth_method` 为 `cryptogram_3ds`
                    时必填。典型值：`05`。
                  example: '05'
            billing_address:
              type: object
              description: 来自 Google Pay 的账单地址信息。
              properties:
                first_name:
                  type: string
                  description: 名。
                last_name:
                  type: string
                  description: 姓。
                email:
                  type: string
                  format: email
                  description: 电子邮箱地址。
                phone:
                  type: string
                  description: 电话号码。
                address1:
                  type: string
                  description: 地址行 1。
                address2:
                  type: string
                  description: 地址行 2。
                locality:
                  type: string
                  description: 城市或地区。
                administrative_area:
                  type: string
                  description: 州、省或行政区。
                postal_code:
                  type: string
                  description: 邮政编码。
                country_code:
                  type: string
                  description: 国家代码（ISO 3166-1 alpha-2）。
    AlipayCNPaymentMethod:
      title: alipaycn
      type: object
      required:
        - type
        - alipaycn
      properties:
        type:
          type: string
          enum:
            - alipaycn
        alipaycn:
          type: object
          required:
            - flow
          description: AlipayCN 支付信息。当 `type` 设为 `alipaycn` 时必填。
          properties:
            flow:
              type: string
              description: 要使用的具体支付流程。
              enum:
                - qrcode
            os_type:
              type: string
              description: 当 flow 为 `mobile_web` 或 `mobile_app` 时必填。取 `ios` 或 `android` 之一。
              enum:
                - ios
                - android
            is_present:
              type: boolean
              description: 客户在支付时是否在场。
              default: false
            payment_code:
              type: string
              description: 客户出示支付码（由电子钱包等支付应用生成）供商户扫描。
    AlipayHkPaymentMethod:
      title: alipayhk
      type: object
      required:
        - type
        - alipayhk
      properties:
        type:
          type: string
          enum:
            - alipayhk
        alipayhk:
          type: object
          required:
            - flow
          description: AlipayHK 支付信息。当 `type` 设为 `alipayhk` 时必填。
          properties:
            flow:
              type: string
              description: 要使用的具体支付流程。
              enum:
                - qrcode
            os_type:
              type: string
              description: 当 flow 为 `mobile_web` 或 `mobile_app` 时必填。取 `ios` 或 `android` 之一。
              enum:
                - ios
                - android
            payment_code:
              type: string
              description: 客户出示支付码（由电子钱包等支付应用生成）供商户扫描。
            is_present:
              type: boolean
              description: 客户在支付时是否在场。
              default: false
    UnionPayPaymentMethod:
      title: unionpay
      type: object
      required:
        - type
        - unionpay
      properties:
        type:
          type: string
          enum:
            - unionpay
        unionpay:
          type: object
          required:
            - flow
          description: UnionPay 支付信息。当 `type` 设为 `unionpay` 时必填。
          properties:
            flow:
              type: string
              description: |
                UnionPay 的收银流程：
                - `qrcode`：商户出示二维码供客户使用 UnionPay 应用扫描。
                - `securepay`：服务器到服务器的安全支付（基于跳转的在线收银）。
              enum:
                - qrcode
                - securepay
            os_type:
              type: string
              description: 当 flow 为 `mobile_app` 时必填。取 `ios` 或 `android` 之一。
              enum:
                - ios
                - android
            is_present:
              type: boolean
              description: 客户在支付时是否在场。
              default: false
            payment_code:
              type: string
              description: 客户出示支付码（由电子钱包等支付应用生成）供商户扫描。
    WeChatPayPaymentMethod:
      title: wechatpay
      type: object
      required:
        - type
        - wechatpay
      properties:
        type:
          type: string
          enum:
            - wechatpay
        wechatpay:
          type: object
          required:
            - flow
          description: WeChat Pay 支付信息。当 `type` 设为 `wechatpay` 时必填。
          properties:
            flow:
              type: string
              description: |
                WeChat Pay 的收银流程：
                - `qrcode`：商户出示二维码供客户扫描。
                - `mini_program`：在微信小程序内支付。
                - `mobile_app`：通过微信 SDK 从原生移动应用发起支付。
                - `mobile_web`：从移动浏览器（H5）发起支付，跳转至微信。
                - `official_account`：在微信公众号内支付（JSAPI）。
              enum:
                - qrcode
                - mini_program
                - mobile_app
                - mobile_web
                - official_account
            os_type:
              type: string
              description: 当 flow 为 `mobile_web` 或 `mobile_app` 时必填。取 `ios` 或 `android` 之一。
              enum:
                - ios
                - android
            payment_code:
              type: string
              description: 客户出示支付码（由电子钱包等支付应用生成）供商户扫描。
            is_present:
              type: boolean
              description: 客户在支付时是否在场。
              default: false
            open_id:
              type: string
              description: 当 `flow` 为 `mini_program`、`mobile_app` 或 `official_account` 时必填。
    GrabPayPaymentMethod:
      title: grabpay
      type: object
      required:
        - type
        - grabpay
      properties:
        type:
          type: string
          enum:
            - grabpay
        grabpay:
          type: object
          required:
            - flow
          description: GrabPay 支付信息。当 `type` 设为 `grabpay` 时必填。
          properties:
            flow:
              type: string
              description: 指定收银流程类型。
              enum:
                - qrcode
            os_type:
              type: string
              description: 当 flow 为 `mobile_web` 时必填。
              enum:
                - ios
                - android
            is_present:
              type: boolean
              description: 客户在支付时是否在场。
              default: false
            payment_code:
              type: string
              description: 客户出示支付码（由电子钱包等支付应用生成）供商户扫描。
            shopper_name:
              type: string
              description: 购物者的姓名。
    CryptoPaymentMethod:
      title: crypto
      type: object
      required:
        - type
        - crypto
      properties:
        type:
          type: string
          enum:
            - crypto
        crypto:
          type: object
          required:
            - flow
            - is_present
          description: >
            加密货币支付信息。当 `type` 设为 `crypto` 时必填。


            **重要：** 币种必须为 `USD`。


            **法律声明：**

            本 API Reference 由 UQPAY 集团成员 UQPAY PTY LTD（UQPAY
            Australia）签发并发布。作为唯一发布主体，UQPAY Australia
            对本文档的内容、版本及维护承担全部且独有的责任。除非另有明确说明，UQPAY
            集团内的其他任何主体均不视为发布方，也不对本文档所含信息承担责任。
          properties:
            flow:
              type: string
              description: |
                要使用的具体支付流程：
                - `redirect`：将客户跳转至加密货币支付网关
                - `qrcode`：生成二维码用于直接的链上支付
              enum:
                - redirect
                - qrcode
            network:
              type: string
              description: |
                交易使用的区块链网络。当 `flow` 为 `qrcode` 时必填。
                - `ETH`：Ethereum 网络
                - `TRON`：TRON 网络
              enum:
                - ETH
                - TRON
            is_present:
              type: boolean
              description: 客户在支付时是否在场。加密货币支付必须为 `false`。
              enum:
                - false
            payer_info:
              type: object
              description: |
                为满足虚拟资产转移的 AML/CTF 旅行规则而收集的付款人合规信息。

                **条件性必填：** 当订单金额达到 UQPAY 为该商户配置的合规阈值时必填；否则可完全省略该对象。
              required:
                - name
                - identifier
              properties:
                name:
                  type: string
                  description: 付款人的法定全名（个人或实体）。
                  minLength: 1
                  maxLength: 100
                  example: John Smith
                email:
                  type: string
                  format: email
                  description: 付款人的电子邮箱地址。提供时将按标准邮箱格式校验。
                  minLength: 5
                  maxLength: 100
                  example: john@example.com
                identifier:
                  type: object
                  description: >
                    付款人的唯一标识。必须且仅提供一个标识，通过 `type` 字段选择。`value` 的结构随 `type`
                    不同而变化。
                  required:
                    - type
                    - value
                  properties:
                    type:
                      type: string
                      description: |
                        所提供标识的类别：
                        - `document_number`：政府签发的身份证件
                        - `birth_info`：出生日期和出生地
                        - `address`：结构化的居住或营业地址
                      enum:
                        - document_number
                        - birth_info
                        - address
                    value:
                      description: 标识载荷。其结构取决于 `type`。
                      oneOf:
                        - title: DocumentNumber
                          type: object
                          description: 当 `type` 为 `document_number` 时使用。
                          required:
                            - doc_type
                            - number
                          properties:
                            doc_type:
                              type: string
                              description: 政府签发证件的类型。
                              enum:
                                - passport
                                - national_id
                                - drivers_license
                            number:
                              type: string
                              description: 证件上印制的证件号码。
                              example: A1234567
                        - title: BirthInfo
                          type: object
                          description: 当 `type` 为 `birth_info` 时使用。
                          required:
                            - date
                            - city
                            - country
                          properties:
                            date:
                              type: string
                              format: date
                              description: 出生日期，格式为 `YYYY-MM-DD`。
                              example: '1990-01-01'
                            city:
                              type: string
                              description: 出生城市。
                              minLength: 2
                              maxLength: 100
                              example: Sydney
                            country:
                              type: string
                              description: 出生国家，采用 ISO 3166-1 alpha-3 代码。
                              example: AUS
                        - title: Address
                          type: object
                          description: 当 `type` 为 `address` 时使用。表示结构化的居住或营业地址。
                          required:
                            - street
                            - city
                            - state
                            - postcode
                            - country
                          properties:
                            street:
                              type: string
                              description: 街道地址行。
                              example: 123 George St
                            city:
                              type: string
                              description: 城市名称。
                              example: Sydney
                            state:
                              type: string
                              description: 州、省或地区。
                              example: NSW
                            postcode:
                              type: string
                              description: 邮政编码。
                              example: '2000'
                            country:
                              type: string
                              description: 国家，采用 ISO 3166-1 alpha-3 代码。若付款人未指定，默认为 `AUS`。
                              example: AUS
    PayNowPaymentMethod:
      title: paynow
      type: object
      required:
        - type
        - paynow
      properties:
        type:
          type: string
          enum:
            - paynow
        paynow:
          type: object
          required:
            - flow
          description: PayNow 支付信息。当 `type` 设为 `paynow` 时必填。
          properties:
            flow:
              type: string
              description: 收银流程。仅支持 `qrcode`（商户出示二维码）。
              enum:
                - qrcode
            is_present:
              type: boolean
              description: 客户在支付时是否在场。
              default: false
    TruemoneyPaymentMethod:
      title: truemoney
      type: object
      required:
        - type
        - truemoney
      properties:
        type:
          type: string
          enum:
            - truemoney
        truemoney:
          type: object
          required:
            - flow
          description: Truemoney 支付信息。当 `type` 设为 `truemoney` 时必填。
          properties:
            flow:
              type: string
              description: 要使用的具体支付流程。
              enum:
                - qrcode
            os_type:
              type: string
              description: 当 flow 为 `mobile_web` 或 `mobile_app` 时必填。取 `ios` 或 `android` 之一。
              enum:
                - ios
                - android
            payment_code:
              type: string
              description: 客户出示支付码（由电子钱包等支付应用生成）供商户扫描。
            is_present:
              type: boolean
              description: 客户在支付时是否在场。
              default: false
    TngPaymentMethod:
      title: tng
      type: object
      required:
        - type
        - tng
      properties:
        type:
          type: string
          enum:
            - tng
        tng:
          type: object
          required:
            - flow
          description: Touch'n Go 支付信息。当 `type` 设为 `tng` 时必填。
          properties:
            flow:
              type: string
              description: 要使用的具体支付流程。
              enum:
                - qrcode
            os_type:
              type: string
              description: 当 flow 为 `mobile_web` 或 `mobile_app` 时必填。取 `ios` 或 `android` 之一。
              enum:
                - ios
                - android
            payment_code:
              type: string
              description: 客户出示支付码（由电子钱包等支付应用生成）供商户扫描。
            is_present:
              type: boolean
              description: 客户在支付时是否在场。
              default: false
    GCashPaymentMethod:
      title: gcash
      type: object
      required:
        - type
        - gcash
      properties:
        type:
          type: string
          enum:
            - gcash
        gcash:
          type: object
          required:
            - flow
          description: GCash 支付信息。当 `type` 设为 `gcash` 时必填。
          properties:
            flow:
              type: string
              description: 要使用的具体支付流程。
              enum:
                - qrcode
            os_type:
              type: string
              description: 当 flow 为 `mobile_web` 或 `mobile_app` 时必填。取 `ios` 或 `android` 之一。
              enum:
                - ios
                - android
            payment_code:
              type: string
              description: 客户出示支付码（由电子钱包等支付应用生成）供商户扫描。
            is_present:
              type: boolean
              description: 客户在支付时是否在场。
              default: false
    DanaPaymentMethod:
      title: dana
      type: object
      required:
        - type
        - dana
      properties:
        type:
          type: string
          enum:
            - dana
        dana:
          type: object
          required:
            - flow
          description: Dana 支付信息。当 `type` 设为 `dana` 时必填。
          properties:
            flow:
              type: string
              description: 要使用的具体支付流程。
              enum:
                - qrcode
            os_type:
              type: string
              description: 当 flow 为 `mobile_web` 或 `mobile_app` 时必填。取 `ios` 或 `android` 之一。
              enum:
                - ios
                - android
            payment_code:
              type: string
              description: 客户出示支付码（由电子钱包等支付应用生成）供商户扫描。
            is_present:
              type: boolean
              description: 客户在支付时是否在场。
              default: false
    KakaopayPaymentMethod:
      title: kakaopay
      type: object
      required:
        - type
        - kakaopay
      properties:
        type:
          type: string
          enum:
            - kakaopay
        kakaopay:
          type: object
          required:
            - flow
          description: KakaoPay 支付信息。当 `type` 设为 `kakaopay` 时必填。
          properties:
            flow:
              type: string
              description: 要使用的具体支付流程。
              enum:
                - qrcode
            os_type:
              type: string
              description: 当 flow 为 `mobile_web` 或 `mobile_app` 时必填。取 `ios` 或 `android` 之一。
              enum:
                - ios
                - android
            payment_code:
              type: string
              description: 客户出示支付码（由电子钱包等支付应用生成）供商户扫描。
            is_present:
              type: boolean
              description: 客户在支付时是否在场。
              default: false
    TossPaymentMethod:
      title: toss
      type: object
      required:
        - type
        - toss
      properties:
        type:
          type: string
          enum:
            - toss
        toss:
          type: object
          required:
            - flow
          description: Toss Pay 支付信息。当 `type` 设为 `toss` 时必填。
          properties:
            flow:
              type: string
              description: 要使用的具体支付流程。
              enum:
                - qrcode
            os_type:
              type: string
              description: 当 flow 为 `mobile_web` 或 `mobile_app` 时必填。取 `ios` 或 `android` 之一。
              enum:
                - ios
                - android
            payment_code:
              type: string
              description: 客户出示支付码（由电子钱包等支付应用生成）供商户扫描。
            is_present:
              type: boolean
              description: 客户在支付时是否在场。
              default: false
    NaverpayPaymentMethod:
      title: naverpay
      type: object
      required:
        - type
        - naverpay
      properties:
        type:
          type: string
          enum:
            - naverpay
        naverpay:
          type: object
          required:
            - flow
          description: Naver Pay 支付信息。当 `type` 设为 `naverpay` 时必填。
          properties:
            flow:
              type: string
              description: 要使用的具体支付流程。
              enum:
                - qrcode
            os_type:
              type: string
              description: 当 flow 为 `mobile_web` 或 `mobile_app` 时必填。取 `ios` 或 `android` 之一。
              enum:
                - ios
                - android
            payment_code:
              type: string
              description: 客户出示支付码（由电子钱包等支付应用生成）供商户扫描。
            is_present:
              type: boolean
              description: 客户在支付时是否在场。
              default: false
    Address:
      type: object
      required:
        - country_code
        - city
        - street
        - postcode
      properties:
        country_code:
          type: string
          description: 两位国家/地区代码，ISO 3166-1 alpha-2 格式。
          minLength: 2
          maxLength: 2
          example: SG
        state:
          type: string
          description: |
            地址所在的州或省，最多 100 个字符。

            - 当 `country_code` 为 "US" 或 "CA" 时必填。
          maxLength: 100
          example: ''
        city:
          type: string
          description: 地址所在的城市，最多 100 个字符。
          maxLength: 100
          example: Singapore
        street:
          type: string
          description: 地址所在的街道，最多 100 个字符。
          maxLength: 100
          example: '444 Orchard Rd, Midpoint Orchard, Singapore '
        postcode:
          type: string
          description: 地址的邮政编码，最多 10 个字符。
          maxLength: 10
          example: '924011'
    CardThreeDSResponse:
      type: object
      properties:
        three_ds_version:
          type: string
          description: 用于认证的 3D Secure 协议版本。
          example: 2.2.0
        eci:
          type: string
          description: 电子商务指示符（ECI）。一个两位数代码，表示交易的安全级别及责任转移结果。
          example: '05'
        cavv:
          type: string
          description: 持卡人认证验证值（CAVV）。由发卡行的访问控制服务器（ACS）生成的加密值，用于确认认证成功。
          example: AAABCZIhcQAAAABZlyFxAAAAAAA=
        three_ds_authentication_status:
          type: string
          description: |
            3DS 认证的结果。

            - `Y`：认证成功。
            - `A`：已尝试认证。责任转移已授予，但未完成完整认证。
            - `N`：认证失败或被拒绝。
            - `U`：因技术或其他问题无法执行认证。
            - `R`：认证被发卡行拒绝。
            - `C`：需要质询。需进行额外的验证步骤。
          example: 'Y'
          enum:
            - 'Y'
            - A
            - 'N'
            - U
            - R
            - C
        three_ds_cancellation_reason:
          type: string
          description: 3DS 认证流程被取消的原因（如适用）。
          example: '01'
    PaymentMethodResponse:
      type: object
      properties:
        type:
          type: string
      description: 用于确认 PaymentIntent 的支付方式详情。设置 `payment_method` 后，PaymentIntent 将自动确认。
      discriminator:
        propertyName: type
        mapping:
          card:
            $ref: '#/components/schemas/CardPaymentMethodResponse'
          applepay:
            $ref: '#/components/schemas/ApplePayPaymentMethodResponse'
          googlepay:
            $ref: '#/components/schemas/GooglePayPaymentMethodResponse'
          alipaycn:
            $ref: '#/components/schemas/AlipayCNPaymentMethodResponse'
          alipayhk:
            $ref: '#/components/schemas/AlipayHkPaymentMethodResponse'
          unionpay:
            $ref: '#/components/schemas/UnionPayPaymentMethodResponse'
          wechatpay:
            $ref: '#/components/schemas/WeChatPayPaymentMethodResponse'
          grabpay:
            $ref: '#/components/schemas/GrabPayPaymentMethodResponse'
          crypto:
            $ref: '#/components/schemas/CryptoPaymentMethodResponse'
          paynow:
            $ref: '#/components/schemas/PayNowPaymentMethodResponse'
          truemoney:
            $ref: '#/components/schemas/TruemoneyPaymentMethodResponse'
          tng:
            $ref: '#/components/schemas/TngPaymentMethodResponse'
          gcash:
            $ref: '#/components/schemas/GCashPaymentMethodResponse'
          dana:
            $ref: '#/components/schemas/DanaPaymentMethodResponse'
          kakaopay:
            $ref: '#/components/schemas/KakaopayPaymentMethodResponse'
          toss:
            $ref: '#/components/schemas/TossPaymentMethodResponse'
          naverpay:
            $ref: '#/components/schemas/NaverpayPaymentMethodResponse'
      oneOf:
        - $ref: '#/components/schemas/CardPaymentMethodResponse'
        - $ref: '#/components/schemas/ApplePayPaymentMethodResponse'
        - $ref: '#/components/schemas/GooglePayPaymentMethodResponse'
        - $ref: '#/components/schemas/AlipayCNPaymentMethodResponse'
        - $ref: '#/components/schemas/AlipayHkPaymentMethodResponse'
        - $ref: '#/components/schemas/UnionPayPaymentMethodResponse'
        - $ref: '#/components/schemas/WeChatPayPaymentMethodResponse'
        - $ref: '#/components/schemas/GrabPayPaymentMethodResponse'
        - $ref: '#/components/schemas/CryptoPaymentMethodResponse'
        - $ref: '#/components/schemas/PayNowPaymentMethodResponse'
        - $ref: '#/components/schemas/TruemoneyPaymentMethodResponse'
        - $ref: '#/components/schemas/TngPaymentMethodResponse'
        - $ref: '#/components/schemas/GCashPaymentMethodResponse'
        - $ref: '#/components/schemas/DanaPaymentMethodResponse'
        - $ref: '#/components/schemas/KakaopayPaymentMethodResponse'
        - $ref: '#/components/schemas/TossPaymentMethodResponse'
        - $ref: '#/components/schemas/NaverpayPaymentMethodResponse'
    FailureCode:
      type: string
      description: >-
        PaymentAttempt 失败码。可能的取值见 [Error Code
        Reference.payment_error](/zh/global-acquiring/v1.6/guide/error-codes)
        部分。
      example: ''
    CardBilling:
      description: 客户的账单信息。
      type: object
      required:
        - first_name
        - last_name
        - email
        - address
      properties:
        first_name:
          type: string
          description: 客户的名字。最大长度为 128。
          maxLength: 128
          example: John
        last_name:
          type: string
          description: 客户的姓氏。最大长度为 128。
          maxLength: 128
          example: Doe
        email:
          type: string
          description: 客户的电子邮箱地址。
          maxLength: 225
          example: john.doe@example.com
          format: email
        phone_number:
          type: string
          description: 客户的电话号码。
          maxLength: 36
          example: '12025550123'
        address:
          $ref: '#/components/schemas/Address'
    CardThreeDS:
      type: object
      properties:
        return_url:
          type: string
          description: 3DS 回调的返回 URL（在触发 3DS 时使用）。
        acs_response:
          type: string
          description: 3DS ACS 响应（application/x-www-form-urlencoded）。
        device_data_collection_res:
          type: string
          description: 设备数据收集响应。
        ds_transaction_id:
          type: string
          description: 3DS 交易 ID。
    CardPaymentMethodResponse:
      title: card
      type: object
      required:
        - type
        - card
      properties:
        type:
          type: string
          enum:
            - card
        card:
          type: object
          required:
            - card_name
            - card_number
            - network
            - authorization_type
          properties:
            card_name:
              type: string
              description: 持卡人姓名。最大长度为 128。
              example: john doe
            card_number:
              type: string
              description: 脱敏后的卡号。前 6 位（BIN）和后 4 位可见。
              example: 541333******4047
            network:
              type: string
              description: 卡组织。例如 `visa`、`mastercard`、`unionpay`。
              enum:
                - visa
                - mastercard
                - unionpay
            brand:
              type: string
              description: 卡品牌。
              example: visa
            bin:
              type: string
              description: 银行识别码（BIN）。卡号前 6–8 位，用于标识发卡机构。
              example: '541333'
            last4:
              type: string
              description: 卡号的后四位。
              example: '4047'
            card_type:
              type: string
              description: 卡的资金类型。
              enum:
                - credit
                - debit
                - prepaid
            expiry_month:
              type: string
              description: 卡片的两位到期月份。
              example: '12'
            expiry_year:
              type: string
              description: 卡片的四位到期年份。
              example: '2027'
            billing:
              $ref: '#/components/schemas/CardBilling'
            auto_capture:
              type: boolean
              default: true
              description: 指定支付授权后是否自动请款。默认为 `true`。如果你希望稍后再请款，请设为 `false`。
            authorization_type:
              type: string
              description: >-
                卡支付的授权类型。可选 `authorization`（默认）和 `pre_authorization`。使用
                `pre_authorization` 可冻结资金超过 7 天，仅 Visa 和 Mastercard 支持。预授权时
                `auto_capture` 必须为 `false`。
              enum:
                - authorization
                - pre_authorization
    ApplePayPaymentMethodResponse:
      title: applepay
      type: object
      required:
        - type
        - applepay
      properties:
        type:
          type: string
          enum:
            - applepay
        applepay:
          type: object
          description: 响应中返回的 Apple Pay 支付信息。
          properties:
            flow:
              type: string
              description: 本次支付所使用的收银流程。
              enum:
                - redirect
                - mobile_web
                - mobile_app
                - contactless
            os_type:
              type: string
              description: 客户设备的操作系统类型。
              enum:
                - ios
            is_present:
              type: boolean
              description: 是否为线下（offline）支付。
            network:
              type: string
              enum:
                - visa
                - mastercard
                - amex
                - discover
                - jcb
            card_type:
              type: string
              description: 所用卡的类型（例如 credit、debit）。
              enum:
                - debit
                - credit
            token_type:
              type: string
              enum:
                - decrypted
                - encrypted
            auth_method:
              type: string
              enum:
                - cryptogram_3ds
                - pan_only
    GooglePayPaymentMethodResponse:
      title: googlepay
      type: object
      required:
        - type
        - googlepay
      properties:
        type:
          type: string
          enum:
            - googlepay
        googlepay:
          type: object
          description: 响应中返回的 Google Pay 支付信息。
          properties:
            flow:
              type: string
              description: 本次支付所使用的收银流程。
              enum:
                - redirect
                - mobile_web
                - mobile_app
                - contactless
            os_type:
              type: string
              description: 客户设备的操作系统类型。
              enum:
                - ios
                - android
            is_present:
              type: boolean
              description: 是否为线下（offline）支付。
            network:
              type: string
              enum:
                - visa
                - mastercard
                - amex
                - discover
                - jcb
            card_type:
              type: string
              description: 所用卡的类型（例如 credit、debit）。
              enum:
                - debit
                - credit
            token_type:
              type: string
              enum:
                - decrypted
                - encrypted
            auth_method:
              type: string
              enum:
                - cryptogram_3ds
                - pan_only
    AlipayCNPaymentMethodResponse:
      title: alipaycn
      type: object
      required:
        - type
        - alipaycn
      properties:
        type:
          type: string
          enum:
            - alipaycn
        alipaycn:
          type: object
          description: 响应中返回的 AlipayCN 支付信息。
          properties:
            flow:
              type: string
              description: 本次支付所使用的收银流程。
              enum:
                - qrcode
            os_type:
              type: string
              description: 客户设备的操作系统类型。
              enum:
                - ios
                - android
            is_present:
              type: boolean
              description: 是否为线下（offline）支付。
    AlipayHkPaymentMethodResponse:
      title: alipayhk
      type: object
      required:
        - type
        - alipayhk
      properties:
        type:
          type: string
          enum:
            - alipayhk
        alipayhk:
          type: object
          description: 响应中返回的 AlipayHK 支付信息。
          properties:
            flow:
              type: string
              description: 本次支付所使用的收银流程。
              enum:
                - qrcode
            os_type:
              type: string
              description: 客户设备的操作系统类型。
              enum:
                - ios
                - android
            is_present:
              type: boolean
              description: 是否为线下（offline）支付。
    UnionPayPaymentMethodResponse:
      title: unionpay
      type: object
      required:
        - type
        - unionpay
      properties:
        type:
          type: string
          enum:
            - unionpay
        unionpay:
          type: object
          description: 响应中返回的 UnionPay 支付信息。
          properties:
            flow:
              type: string
              description: 本次支付所使用的收银流程。
              enum:
                - qrcode
                - securepay
            os_type:
              type: string
              description: 客户设备的操作系统类型。
              enum:
                - ios
                - android
            is_present:
              type: boolean
              description: 是否为线下（offline）支付。
    WeChatPayPaymentMethodResponse:
      title: wechatpay
      type: object
      required:
        - type
        - wechatpay
      properties:
        type:
          type: string
          enum:
            - wechatpay
        wechatpay:
          type: object
          description: 响应中返回的 WeChat Pay 支付信息。
          properties:
            flow:
              type: string
              description: 本次支付所使用的收银流程。
              enum:
                - qrcode
                - mini_program
                - mobile_app
                - mobile_web
                - official_account
            os_type:
              type: string
              description: 客户设备的操作系统类型。
              enum:
                - ios
                - android
            is_present:
              type: boolean
              description: 是否为线下（offline）支付。
    GrabPayPaymentMethodResponse:
      title: grabpay
      type: object
      required:
        - type
        - grabpay
      properties:
        type:
          type: string
          enum:
            - grabpay
        grabpay:
          type: object
          description: 响应中返回的 GrabPay 支付信息。
          properties:
            flow:
              type: string
              description: 本次支付所使用的收银流程。
              enum:
                - qrcode
            os_type:
              type: string
              description: 客户设备的操作系统类型。
              enum:
                - ios
                - android
            is_present:
              type: boolean
              description: 是否为线下（offline）支付。
            shopper_name:
              type: string
              description: 购物者的姓名。
    CryptoPaymentMethodResponse:
      title: crypto
      type: object
      required:
        - type
        - crypto
      properties:
        type:
          type: string
          enum:
            - crypto
        crypto:
          type: object
          description: 响应中返回的加密货币支付信息。
          properties:
            flow:
              type: string
              description: 本次支付所使用的收银流程。
              enum:
                - redirect
                - qrcode
            network:
              type: string
              enum:
                - ETH
                - TRON
            is_present:
              type: boolean
              description: 是否为线下（offline）支付。
    PayNowPaymentMethodResponse:
      title: paynow
      type: object
      required:
        - type
        - paynow
      properties:
        type:
          type: string
          enum:
            - paynow
        paynow:
          type: object
          description: 响应中返回的 PayNow 支付信息。
          properties:
            flow:
              type: string
              description: 本次支付所使用的收银流程。
              enum:
                - qrcode
            is_present:
              type: boolean
              description: 是否为线下（offline）支付。
    TruemoneyPaymentMethodResponse:
      title: truemoney
      type: object
      required:
        - type
        - truemoney
      properties:
        type:
          type: string
          enum:
            - truemoney
        truemoney:
          type: object
          description: 响应中返回的 Truemoney 支付信息。
          properties:
            flow:
              type: string
              description: 本次支付所使用的收银流程。
              enum:
                - qrcode
            os_type:
              type: string
              description: 客户设备的操作系统类型。
              enum:
                - ios
                - android
            is_present:
              type: boolean
              description: 是否为线下（offline）支付。
    TngPaymentMethodResponse:
      title: tng
      type: object
      required:
        - type
        - tng
      properties:
        type:
          type: string
          enum:
            - tng
        tng:
          type: object
          description: 响应中返回的 Touch'n Go 支付信息。
          properties:
            flow:
              type: string
              description: 本次支付所使用的收银流程。
              enum:
                - qrcode
            os_type:
              type: string
              description: 客户设备的操作系统类型。
              enum:
                - ios
                - android
            is_present:
              type: boolean
              description: 是否为线下（offline）支付。
    GCashPaymentMethodResponse:
      title: gcash
      type: object
      required:
        - type
        - gcash
      properties:
        type:
          type: string
          enum:
            - gcash
        gcash:
          type: object
          description: 响应中返回的 GCash 支付信息。
          properties:
            flow:
              type: string
              description: 本次支付所使用的收银流程。
              enum:
                - qrcode
            os_type:
              type: string
              description: 客户设备的操作系统类型。
              enum:
                - ios
                - android
            is_present:
              type: boolean
              description: 是否为线下（offline）支付。
    DanaPaymentMethodResponse:
      title: dana
      type: object
      required:
        - type
        - dana
      properties:
        type:
          type: string
          enum:
            - dana
        dana:
          type: object
          description: 响应中返回的 Dana 支付信息。
          properties:
            flow:
              type: string
              description: 本次支付所使用的收银流程。
              enum:
                - qrcode
            os_type:
              type: string
              description: 客户设备的操作系统类型。
              enum:
                - ios
                - android
            is_present:
              type: boolean
              description: 是否为线下（offline）支付。
    KakaopayPaymentMethodResponse:
      title: kakaopay
      type: object
      required:
        - type
        - kakaopay
      properties:
        type:
          type: string
          enum:
            - kakaopay
        kakaopay:
          type: object
          description: 响应中返回的 KakaoPay 支付信息。
          properties:
            flow:
              type: string
              description: 本次支付所使用的收银流程。
              enum:
                - qrcode
            os_type:
              type: string
              description: 客户设备的操作系统类型。
              enum:
                - ios
                - android
            is_present:
              type: boolean
              description: 是否为线下（offline）支付。
    TossPaymentMethodResponse:
      title: toss
      type: object
      required:
        - type
        - toss
      properties:
        type:
          type: string
          enum:
            - toss
        toss:
          type: object
          description: 响应中返回的 Toss Pay 支付信息。
          properties:
            flow:
              type: string
              description: 本次支付所使用的收银流程。
              enum:
                - qrcode
            os_type:
              type: string
              description: 客户设备的操作系统类型。
              enum:
                - ios
                - android
            is_present:
              type: boolean
              description: 是否为线下（offline）支付。
    NaverpayPaymentMethodResponse:
      title: naverpay
      type: object
      required:
        - type
        - naverpay
      properties:
        type:
          type: string
          enum:
            - naverpay
        naverpay:
          type: object
          description: 响应中返回的 Naver Pay 支付信息。
          properties:
            flow:
              type: string
              description: 本次支付所使用的收银流程。
              enum:
                - qrcode
            os_type:
              type: string
              description: 客户设备的操作系统类型。
              enum:
                - ios
                - android
            is_present:
              type: boolean
              description: 是否为线下（offline）支付。
  securitySchemes:
    XAuthToken:
      type: apiKey
      in: header
      name: x-auth-token
      description: UQPay 提供的登录 API Token。

````