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

# 通过交易取消或退款支付

> 根据特定交易 ID 的状态取消或退款支付。

> [!WARNING]
>
> 请勿在另一笔退款进行中时执行退款。请等待当前操作完成后再开始新的操作。

此服务用于取消或退款现有支付。我们的系统会根据请求中提供的 `transaction_id` 所关联的交易状态，判断需要取消还是退款。这适用于您希望更明确地指定对支付生命周期所执行操作的特定场景。此服务根据交易状态执行以下操作：

* 如果支付尚未被捕获，则**取消**该支付。
* 如果支付已被捕获，则**退款**该支付。

> [!NOTE]
>
> **退款**
>
> 如果您填写了金额字段，将进行部分退款。否则，将创建全额退款。资金将退回到最初扣款的支付方式。
>
> 响应会返回一笔 `REFUND` 交易，并带有其自身的 `status`：退款已批准时为 `SUCCEEDED`，服务提供商确认期间为 `PENDING`。`REFUNDED` 是支付状态，而不是交易状态。全额退款成功后，支付的 `status` 和 `sub_status` 均为 `REFUNDED`。

> [!NOTE]
>
> **使用 Yuno 促销的支付**
>
> 退款按客户实际支付的金额计算，即 `amount.value` 减去 `discount_amount`。全额退款会退还该金额，超过剩余可退款金额的 `amount` 会被拒绝，并返回 `400 INVALID_PARAMETERS`。取消会作废该金额的授权。请参阅[促销](https://docs.y.uno/zh-hans/docs/payment-features/promotions#refunds-captures-and-cancellations)。

> [!NOTE]
>
> **部分批准的支付**
>
> 对于发送时带有 `payment_method.detail.card.partial_approval: true` 且已批准金额低于请求金额的卡支付，退款以 `amount.authorized` 为上限。全额退款会退还 `amount.authorized`，超过其剩余金额的 `amount` 会被拒绝，并返回 `400 INVALID_PARAMETERS`。

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


## OpenAPI

````yaml openapi/zh-hans/payments/cancel-or-refund-payment-with-transaction.json POST /payments/{payment_id}/transactions/{transaction_id}/cancel-or-refund
openapi: 3.1.0
info:
  title: payment-api-refundcancel-payment
  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:
  /payments/{payment_id}/transactions/{transaction_id}/cancel-or-refund:
    post:
      summary: 通过交易取消或退款支付
      operationId: cancel-or-refund-payment-with-transaction
      parameters:
        - name: payment_id
          in: path
          description: 支付的唯一标识符（UUID，36 个字符）。
          schema:
            type: string
          required: true
        - name: transaction_id
          in: path
          description: 交易的唯一标识符（UUID，36 个字符）。
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required: []
              properties:
                description:
                  type: string
                  description: 取消或退款的描述（MAX 255；MIN 3）。
                reason:
                  type: string
                  description: >-
                    指示取消或退款的原因。如果设置，可能的值为
                    `DUPLICATE`、`FRAUDULENT`、`REQUESTED_BY_CUSTOMER` 和
                    `REVERSE`。当交易涉及收款方时，使用 `REVERSE` 可请求自动冲回收款方的资金。
                  enum:
                    - DUPLICATE
                    - FRAUDULENT
                    - REQUESTED_BY_CUSTOMER
                    - REVERSE
                merchant_reference:
                  type: string
                  description: >-
                    由商户定义的支付交易标识。如果未定义 merchant_reference，则该支付的
                    merchant_order_id 将与交易关联（MAX 255；MIN 3）。
                amount:
                  type: object
                  description: 指定退款的金额对象。
                  properties:
                    currency:
                      type: string
                      description: >-
                        用于支付的货币。完整的货币代码列表请参阅[国家参考](/docs/country-reference)（MAX
                        3；MIN 3；ISO 4217）。
                    value:
                      type: number
                      format: float
                      description: >-
                        支付金额（0.0001 的倍数）。对于零小数位币种（例如 KRW、JPY 或
                        CLP），该值必须为整数：请参阅[金额和币种](/zh-hans/docs/basic-concepts/amounts-and-currencies)。
                split_marketplace:
                  type: array
                  description: 拆分 marketplace 对象数组
                  items:
                    properties:
                      recipient_id:
                        type: string
                        description: >-
                          收款方在 Yuno 系统中的唯一标识符。<br/> 创建支付时，您必须提供
                          [`recipient_id`](/zh-hans/reference/recipients-for-marketplace/create-recipient-1)（由
                          Yuno 生成）或 `provider_recipient_id`（外部服务提供商的 ID）。
                      provider_recipient_id:
                        type: string
                        description: >-
                          外部支付服务提供商提供的收款方 ID（如适用）。<br/> 创建支付时，您必须提供
                          `provider_recipient_id` 或
                          [`recipient_id`](/zh-hans/reference/recipients-for-marketplace/create-recipient-1)（由
                          Yuno 生成）。
                      description:
                        type: string
                        description: 拆分的描述。（MAX 255; MIN 3）。
                      type:
                        type: string
                        description: >-
                          拆分的类型。对于 `PURCHASE` 和 `MARKETPLACE`，`recipient_id`
                          为必填项。
                        enum:
                          - PURCHASE
                          - PAYMENTFEE
                          - VAT
                          - COMMISSION
                          - MARKETPLACE
                          - SHIPPING
                      merchant_reference:
                        type: string
                        description: 拆分交易的可选唯一标识符（MAX 255; MIN 3）。
                      recipient_type:
                        type: string
                        description: 服务提供商的收款方类型。
                        enum:
                          - MEAL
                          - FOOD
                          - MULTI_BENEFITS
                          - FLEET
                        example: MEAL
                      amount:
                        type: object
                        description: 定义拆分的金额。
                        required:
                          - value
                          - currency
                        properties:
                          value:
                            type: number
                            description: 拆分金额（0.0001 的倍数）。
                            format: float
                          currency:
                            type: string
                            description: >-
                              用于支付的货币。完整的货币代码列表请参阅[国家参考](/docs/country-reference)（MAX
                              3；MIN 3；ISO 4217）。
                      liability:
                        type: object
                        description: 关于收款方承担费用和拒付责任的可选信息。
                        properties:
                          processing_fee:
                            type: string
                            description: 表示由谁承担交易手续费。
                            enum:
                              - MERCHANT
                              - RECIPIENT
                              - SHARED
                          chargebacks:
                            type: boolean
                            description: 发生拒付时由收款方负责。
                    required:
                      - type
                    type: object
                simplified_mode:
                  type: boolean
                  description: >-
                    指示在首次尝试出现错误/被拒绝后，是否应再次尝试对支付进行退款。默认为
                    `false`。更多信息请访问[指南](transaction-retries)。
                  default: false
                response_additional_data:
                  type: object
                  description: 指定交易响应所需的附加数据
                  properties:
                    receipt:
                      type: boolean
                      description: 指示交易响应是否需要收据
                    receipt_language:
                      type: string
                      description: 指示要生成的收据的语言
                      enum:
                        - ES
                        - EN
                        - PT
                customer_payer:
                  type: object
                  description: 指定支付的客户对象。
                  properties:
                    first_name:
                      type: string
                      description: 客户的名（最大 255；最小 3）。
                    last_name:
                      type: string
                      description: 客户的姓（最大 255；最小 3）。
                    gender:
                      type: string
                      description: >-
                        客户的性别（MAX 2；MIN 1）。<br/>- M=男<br/>- F=女<br/>-
                        NB=非二元性别<br/>- NA=不适用<br/>- NK=未知<br/>- U=未定义。
                      enum:
                        - M
                        - F
                        - NB
                        - NA
                        - NK
                        - U
                    date_of_birth:
                      type: string
                      description: 客户的出生日期，格式为 `YYYY-MM-DD`（长度：10）。
                    email:
                      type: string
                      description: 客户的电子邮件（最大 255；最小 3）。
                    nationality:
                      type: string
                      description: >-
                        客户的国籍（MAX 2；MIN 2；[ISO
                        3166-1](/zh-hans/reference/country-reference)）。
                    document:
                      type: object
                      description: 指定客户的证件对象，包括证件号码和类型。
                      properties:
                        document_number:
                          type: string
                          description: 客户的证件号码（MAX 40；MIN 3）
                        document_type:
                          type: string
                          description: >-
                            客户的证件类型（MAX 6；MIN
                            2）。更多详情请访问[证件类型列表](/zh-hans/reference/country-reference)。
                          enum:
                            - DNI
                            - CI
                            - LC
                            - LE
                            - CUIT
                            - CUIL
                            - PAS
                            - CPF
                            - RG
                            - CNH
                            - CNPJ
                            - RUT
                            - RUN
                            - CC
                            - CE
                            - NIT
                            - DUI
                            - PIC
                            - DPI
                            - IFR
                            - INE
                            - CP
                            - RFC
                            - CURP
                            - CIP
                            - CIC
                            - CUI
                            - RUC
                    phone:
                      type: object
                      description: 指定客户的电话对象。
                      properties:
                        country_code:
                          type: string
                          description: 客户电话的国家/地区区号（MAX 3；MIN 1）。
                        number:
                          type: string
                          description: 客户的电话号码，不含国家/地区区号（最大 32；最小 1）。
                    billing_address:
                      type: object
                      description: 指定客户的账单地址对象。
                      properties:
                        address_line_1:
                          type: string
                          description: 客户的主要账单地址行（最大 255；最小 3）。
                        address_line_2:
                          type: string
                          description: 客户的次要账单地址行（MAX 255；MIN 3）。
                        city:
                          type: string
                          description: 账单地址所在的城市（最大 255；最小 3）。
                        country:
                          type: string
                          description: >-
                            账单地址所属的国家/地区（MAX 2；MIN 2；[ISO
                            3166-1](https://docs.y.uno/zh-hans/reference/customers/the-customer-object#country-code-list-iso-3166-1)）。
                          enum:
                            - AR
                            - BO
                            - BR
                            - CL
                            - CO
                            - CR
                            - EC
                            - SV
                            - GT
                            - HN
                            - MX
                            - NI
                            - PA
                            - PY
                            - PE
                            - US
                            - UY
                        state:
                          type: string
                          description: 账单地址所在的州（最大 255；最小 3）。
                        zip_code:
                          type: string
                          description: 账单地址的邮政编码（最大 10；最小 5）。
                    shipping_address:
                      type: object
                      description: 指定客户的收货地址对象。
                      properties:
                        address_line_1:
                          type: string
                          description: 客户的主要收货地址行（最大 255；最小 3）。
                        address_line_2:
                          type: string
                          description: 客户的次要收货地址行（MAX 255；MIN 3）。
                        city:
                          type: string
                          description: 收货地址所在的城市（最大 255；最小 3）。
                        country:
                          type: string
                          description: >-
                            收货地址所属的国家/地区（MAX 2；MIN 2；[ISO
                            3166-1](https://docs.y.uno/zh-hans/reference/customers/the-customer-object#country-code-list-iso-3166-1)）。
                          enum:
                            - AR
                            - BO
                            - BR
                            - CL
                            - CO
                            - CR
                            - EC
                            - SV
                            - GT
                            - HN
                            - MX
                            - NI
                            - PA
                            - PY
                            - PE
                            - US
                            - UY
                        state:
                          type: string
                          description: 收货地址所在的州（最大 255；最小 3）。
                        zip_code:
                          type: string
                          description: 收货地址的邮政编码（最大 10；最小 5）。
                payment_method:
                  type: object
                  description: 指定支付所用的支付方式对象。
                  properties:
                    detail:
                      type: object
                      description: 指定支付方式详情对象。
                      properties:
                        bank_transfer:
                          type: object
                          description: 指定银行转账支付方式的详细信息。
                          properties:
                            account_type:
                              type: string
                              description: 银行账户类型（MAX 255；MIN 3）
                              enum:
                                - CHECKINGS
                                - SAVINGS
                            bank_name:
                              type: string
                              description: 银行名称（MAX 255；MIN 3）
                            bank_id:
                              type: string
                              description: 银行 ID（MAX 255；MIN 3）
                            beneficiary_name:
                              type: string
                              description: 账户持有人姓名（MAX 255；MIN 3）
                            bank_account:
                              type: string
                              description: 银行账号（MAX 255；MIN 3）
                            beneficiary_document_type:
                              type: string
                              description: 账户持有人的证件类型（MAX 255；MIN 3）
                            beneficiary_document:
                              type: string
                              description: 账户持有人的证件号码（MAX 255；MIN 3）
                            reference:
                              type: string
                              description: 用户的参考代码（MAX 255；MIN 1）
                            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）。
            examples:
              Full Refund:
                value:
                  description: Duplicate
                  reason: REQUESTED_BY_CUSTOMER
                  merchant_reference: AAB01-432245
              Partial Refund:
                value:
                  amount:
                    currency: COP
                    value: 500
                  description: Duplicate
                  reason: REQUESTED_BY_CUSTOMER
                  merchant_reference: AAB01-432245
              Cancel:
                value:
                  description: Duplicate
                  reason: REQUESTED_BY_CUSTOMER
                  merchant_reference: AAB01-432245
      responses:
        '201':
          description: '201'
          content:
            application/json:
              examples:
                Full Refund:
                  value:
                    id: 7fd485f3-bd72-45eb-a3fb-774daa3d79b6
                    type: REFUND
                    status: SUCCEEDED
                    category: CARD
                    amount:
                      captured: 0
                      currency: COP
                      refunded: 0
                      value: 30000
                    merchant_reference: '0000023'
                    created_at: '2024-06-06T14:06:06.284443Z'
                    updated_at: '2024-06-06T14:06:37.984065Z'
                    provider_data:
                      id: YUNO_TEST_PAYMENT_GW
                      transaction_id: ''
                      account_id: 493e9374-510a-4201-9e09-de669d75f256
                      status: ''
                      status_detail: ''
                      response_message: null
                      response_code: SUCCEEDED
                      iso8583_response_code: '00'
                      iso8583_response_message: Approved or completed successfully
                      raw_request:
                        amount:
                          currency: BRL
                          value: 2100
                        reference: '34343434'
                      raw_response: null
                      third_party_transaction_id: null
                      third_party_account_id: null
                    connection_data:
                      id: 58cc35f4-faef-4107-8e09-d18d60121d38
                      name: Connection name
                    response_code: SUCCEEDED
                    response_message: Transaction successful
                    payment:
                      id: c3583c27-0478-4e02-8827-4d8f2121c670
                      account_id: ''
                      description: Test
                      country: CO
                      status: REFUNDED
                      sub_status: REFUNDED
                      merchant_order_id: '0000023'
                      created_at: '2024-06-06T14:06:06.284443Z'
                      updated_at: '2024-06-06T14:06:06.284443Z'
                      amount:
                        captured: 0
                        authorized: 30000
                        currency: COP
                        refunded: 30000
                        value: 30000
                      additional_data:
                        airline:
                          pnr: 1P-2UUGJW
                          legs:
                            - departure_airport: EZE
                              departure_datetime: '2014-05-12 13:05:00'
                              departure_airport_timezone: '-03:00'
                              arrival_airport: AMS
                              arrival_airport_timezone: '+00:00'
                              arrival_datetime: ''
                              carrier_code: KL
                              carrier_name: KLM Royal Dutch Airlines
                              flight_number: '842'
                              fare_basis_code: HL7LNR
                              fare_class_code: FR
                              base_fare: 200
                              base_fare_currency: BRL
                              stopover_code: s
                          passengers:
                            - first_name: string
                              last_name: string
                              middle_name: string
                              type: s
                              date_of_birth: stringstri
                              nationality: st
                              document:
                                document_type: CPF
                                document_number: 351.040.753-97
                              country: st
                              loyalty_number: string
                              loyalty_tier: strin
                              email: null
                              phone: null
                          ticket: null
                          tickets:
                            - ticket_number: '123456'
                              e_ticket: false
                              restricted: false
                              total_fare_amount: 80
                              total_tax_amount: 22
                              total_fee_amount: 14
                              issue: null
                        order:
                          fee_amount: 100
                          shipping_amount: 100
                          tip_amount: null
                          items:
                            - id: 123AD
                              name: Skirt
                              quantity: 1
                              unit_amount: 29800
                              category: Clothes
                              brand: XYZ
                              sku_code: '8765432109'
                              manufacture_part_number: XYZ123456
                        seller_details: null
                    customer_payer:
                      id: f73dd905-a242-477f-8273-539ed8fbad9e
                      merchant_customer_id: c2-2745600
                      first_name: John
                      last_name: Doe
                      gender: M
                      date_of_birth: '1990-02-28'
                      email: johndoe@example.com
                      nationality: US
                      ip_address: null
                      device_fingerprint: null
                      device_fingerprints: []
                      browser_info: null
                      document:
                        document_type: SSN
                        document_number: 123-45-6789
                      phone:
                        number: '5551234567'
                        country_code: '1'
                      billing_address:
                        address_line_1: 123 Main St
                        address_line_2: Apt 4B
                        country: US
                        state: NY
                        city: New York
                        zip_code: '10001'
                        neighborhood: Manhattan
                      shipping_address:
                        address_line_1: 123 Main St
                        address_line_2: Apt 4B
                        country: US
                        state: NY
                        city: New York
                        zip_code: '10001'
                        neighborhood: Manhattan
                      merchant_customer_created_at: '2022-05-09T20:46:54.786342Z'
                    simplified_mode: false
                    receipt: false
                    receipt_url: null
                    receipt_language: null
                    split_marketplace: []
                    metadata: null
                Partial Refund:
                  value:
                    id: e44cdc8e-01e7-4767-a1b6-3a646a609dc5
                    type: REFUND
                    status: SUCCEEDED
                    category: CARD
                    amount:
                      captured: 0
                      currency: COP
                      refunded: 0
                      value: 30000
                    merchant_reference: '0000023'
                    created_at: '2024-06-06T14:07:53.881239Z'
                    updated_at: '2024-06-06T14:08:17.438878Z'
                    provider_data:
                      id: YUNO_TEST_PAYMENT_GW
                      transaction_id: ''
                      account_id: 493e9374-510a-4201-9e09-de669d75f256
                      status: ''
                      sub_status: ''
                      status_detail: ''
                      response_message: null
                      response_code: SUCCEEDED
                      iso8583_response_code: '00'
                      iso8583_response_message: Approved or completed successfully
                      raw_response: null
                      third_party_transaction_id: null
                      third_party_account_id: null
                    connection_data:
                      id: 58cc35f4-faef-4107-8e09-d18d60121d38
                      name: Connection name
                    response_code: SUCCEEDED
                    response_message: Transaction successful
                    payment:
                      id: eee7daeb-5ed7-41bd-8fee-7a440ca2ab86
                      account_id: ''
                      description: Test
                      country: CO
                      status: SUCCEEDED
                      sub_status: PARTIALLY_REFUNDED
                      merchant_order_id: '0000023'
                      created_at: '2024-06-06T14:07:53.881239Z'
                      updated_at: '2024-06-06T14:07:53.881239Z'
                      amount:
                        captured: 0
                        authorized: 30000
                        currency: COP
                        refunded: 1000
                        value: 30000
                      additional_data:
                        airline:
                          pnr: 1P-2UUGJW
                          legs:
                            - departure_airport: EZE
                              departure_datetime: '2014-05-12 13:05:00'
                              departure_airport_timezone: '-03:00'
                              arrival_airport: AMS
                              arrival_airport_timezone: '+00:00'
                              arrival_datetime: ''
                              carrier_code: KL
                              carrier_name: KLM Royal Dutch Airlines
                              flight_number: '842'
                              fare_basis_code: HL7LNR
                              fare_class_code: FR
                              base_fare: 200
                              base_fare_currency: BRL
                              stopover_code: s
                          passengers:
                            - first_name: string
                              last_name: string
                              middle_name: string
                              type: s
                              date_of_birth: stringstri
                              nationality: st
                              document:
                                document_type: CPF
                                document_number: 351.040.753-97
                              country: st
                              loyalty_number: string
                              loyalty_tier: strin
                              email: null
                              phone: null
                          ticket: null
                          tickets:
                            - ticket_number: '123456'
                              e_ticket: false
                              restricted: false
                              total_fare_amount: 80
                              total_tax_amount: 22
                              total_fee_amount: 14
                              issue: null
                        order:
                          fee_amount: 100
                          shipping_amount: 100
                          tip_amount: null
                          items:
                            - id: 123AD
                              name: Skirt
                              quantity: 1
                              unit_amount: 29800
                              category: Clothes
                              brand: XYZ
                              sku_code: '8765432109'
                              manufacture_part_number: XYZ123456
                        seller_details: null
                    customer_payer:
                      id: f73dd905-a242-477f-8273-539ed8fbad9e
                      merchant_customer_id: c2-2745600
                      first_name: John
                      last_name: Doe
                      gender: M
                      date_of_birth: '1990-02-28'
                      email: johndoe@example.com
                      nationality: US
                      ip_address: null
                      device_fingerprint: null
                      device_fingerprints: []
                      browser_info: null
                      document:
                        document_type: SSN
                        document_number: 123-45-6789
                      phone:
                        number: '5551234567'
                        country_code: '1'
                      billing_address:
                        address_line_1: 123 Main St
                        address_line_2: Apt 4B
                        country: US
                        state: NY
                        city: New York
                        zip_code: '10001'
                        neighborhood: Manhattan
                      shipping_address:
                        address_line_1: 123 Main St
                        address_line_2: Apt 4B
                        country: US
                        state: NY
                        city: New York
                        zip_code: '10001'
                        neighborhood: Manhattan
                      merchant_customer_created_at: '2022-05-09T20:46:54.786342Z'
                    simplified_mode: false
                    receipt: false
                    receipt_url: null
                    receipt_language: null
                    split_marketplace: []
                    metadata: null
                Cancel:
                  value:
                    id: 2fbc6db6-718b-4554-b03f-826e552f1b9f
                    type: CANCEL
                    status: SUCCEEDED
                    category: CARD
                    amount:
                      captured: 0
                      currency: COP
                      refunded: 0
                      value: 30000
                    merchant_reference: ''
                    created_at: '2024-06-06T14:05:31.651012Z'
                    updated_at: '2024-06-06T14:05:31.742355Z'
                    provider_data:
                      id: YUNO_TEST_PAYMENT_GW
                      transaction_id: ''
                      account_id: ''
                      status: SUCCEEDED
                      sub_status: ''
                      status_detail: SUCCEEDED
                      response_message: null
                      response_code: SUCCEEDED
                      iso8583_response_code: '00'
                      iso8583_response_message: Approved or completed successfully
                      raw_response: null
                      third_party_transaction_id: null
                      third_party_account_id: null
                    connection_data:
                      id: 58cc35f4-faef-4107-8e09-d18d60121d38
                      name: Connection name
                    response_code: SUCCEEDED
                    response_message: Transaction successful
                    payment:
                      id: cddba02c-e47d-4330-9cac-afcd9c0194b1
                      account_id: ''
                      description: Test
                      country: CO
                      status: CANCELED
                      sub_status: CANCELED
                      merchant_order_id: '0000023'
                      created_at: '2024-06-06T14:04:44.768364Z'
                      updated_at: '2024-06-06T14:05:31.79539Z'
                      amount:
                        captured: 0
                        authorized: 30000
                        currency: COP
                        refunded: 0
                        value: 30000
                    customer_payer:
                      id: f73dd905-a242-477f-8273-539ed8fbad9e
                      merchant_customer_id: c2-2745600
                      first_name: John
                      last_name: Doe
                      gender: M
                      date_of_birth: '1990-02-28'
                      email: johndoe@example.com
                      nationality: US
                      ip_address: null
                      device_fingerprint: null
                      device_fingerprints: []
                      browser_info: null
                      document:
                        document_type: SSN
                        document_number: 123-45-6789
                      phone:
                        number: '5551234567'
                        country_code: '1'
                      billing_address:
                        address_line_1: 123 Main St
                        address_line_2: Apt 4B
                        country: US
                        state: NY
                        city: New York
                        zip_code: '10001'
                        neighborhood: Manhattan
                      shipping_address:
                        address_line_1: 123 Main St
                        address_line_2: Apt 4B
                        country: US
                        state: NY
                        city: New York
                        zip_code: '10001'
                        neighborhood: Manhattan
                      merchant_customer_created_at: '2022-05-09T20:46:54.786342Z'
                    simplified_mode: false
                    receipt: false
                    receipt_url: null
                    receipt_language: null
                    split_marketplace: []
                    metadata: null
              schema:
                oneOf:
                  - title: 全额退款
                    type: object
                    properties:
                      id:
                        type: string
                        example: 7fd485f3-bd72-45eb-a3fb-774daa3d79b6
                      type:
                        type: string
                        example: REFUND
                      status:
                        type: string
                        example: SUCCEEDED
                      category:
                        type: string
                        example: CARD
                      amount:
                        type: object
                        properties:
                          captured:
                            type: integer
                            example: 0
                            default: 0
                          currency:
                            type: string
                            example: COP
                          refunded:
                            type: integer
                            example: 0
                            default: 0
                          value:
                            type: integer
                            example: 30000
                            default: 0
                      merchant_reference:
                        type: string
                        example: '0000023'
                      created_at:
                        type: string
                        example: '2024-06-06T14:06:06.284443Z'
                      updated_at:
                        type: string
                        example: '2024-06-06T14:06:37.984065Z'
                      provider_data:
                        type: object
                        properties:
                          id:
                            type: string
                            example: YUNO_TEST_PAYMENT_GW
                          transaction_id:
                            type: string
                            example: ''
                          account_id:
                            type: string
                            example: 493e9374-510a-4201-9e09-de669d75f256
                          status:
                            type: string
                            example: ''
                          status_detail:
                            type: string
                            example: ''
                          response_message: {}
                          response_code:
                            type: string
                            example: SUCCEEDED
                          iso8583_response_code:
                            type: string
                            example: '00'
                          iso8583_response_message:
                            type: string
                            example: Approved or completed successfully
                          raw_request:
                            type: object
                            description: Yuno 发送给服务提供商的请求的混淆副本。仅对列入允许名单的组织返回。
                          raw_response: {}
                          third_party_transaction_id: {}
                          third_party_account_id: {}
                      connection_data:
                        type: object
                        properties:
                          id:
                            type: string
                            example: 58cc35f4-faef-4107-8e09-d18d60121d38
                          name:
                            type: string
                            example: Connection name
                      response_code:
                        type: string
                        example: SUCCEEDED
                      response_message:
                        type: string
                        example: Transaction successful
                      payment:
                        type: object
                        properties:
                          id:
                            type: string
                            example: c3583c27-0478-4e02-8827-4d8f2121c670
                          account_id:
                            type: string
                            example: ''
                          description:
                            type: string
                            example: Test
                          country:
                            type: string
                            example: CO
                          status:
                            type: string
                            example: REFUNDED
                          sub_status:
                            type: string
                            example: REFUNDED
                          merchant_order_id:
                            type: string
                            example: '0000023'
                          created_at:
                            type: string
                            example: '2024-06-06T14:06:06.284443Z'
                          updated_at:
                            type: string
                            example: '2024-06-06T14:06:06.284443Z'
                          amount:
                            type: object
                            properties:
                              captured:
                                type: integer
                                example: 0
                                default: 0
                              authorized:
                                type: number
                                description: >-
                                  服务提供商已批准的金额（0.0001 的倍数），扣除任何 Yuno 促销（`value`
                                  减去
                                  `discount_amount`），并加上已批准的增量授权。在全额批准时，或服务提供商未返回已批准金额时，它等于该净额。对于发送了
                                  `payment_method.detail.card.partial_approval:
                                  true` 的卡支付，部分批准后支付仍保持全额批准的状态，因此当 `authorized`
                                  小于 `value` 减去 `discount_amount`（无促销时，小于
                                  `value`）时，即为部分批准。对于未获批准的支付，或在引入此字段之前创建的支付，不会返回此字段。
                                example: 30000
                              currency:
                                type: string
                                example: COP
                              refunded:
                                type: integer
                                example: 30000
                                default: 0
                              value:
                                type: integer
                                example: 30000
                                default: 0
                          discount_amount:
                            type: object
                            description: >-
                              应用于支付的 Yuno 促销的总折扣：即
                              `additional_data.order.discounts` 中
                              `YUNO_PROMOTION` 行的总和。未应用促销时不存在。实际扣款金额为
                              `amount.value` 减去此值，见 `transactions.amount`。请参阅
                              [Promotions](/zh-hans/docs/payment-features/promotions)。
                            properties:
                              currency:
                                type: string
                                description: 折扣的货币，与 `amount.currency` 相同。
                              value:
                                type: number
                                description: 折扣。
                          additional_data:
                            type: object
                            properties:
                              airline:
                                type: object
                                properties:
                                  pnr:
                                    type: string
                                    example: 1P-2UUGJW
                                  legs:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        departure_airport:
                                          type: string
                                          example: EZE
                                        departure_datetime:
                                          type: string
                                          example: '2014-05-12 13:05:00'
                                        departure_airport_timezone:
                                          type: string
                                          example: '-03:00'
                                        arrival_airport:
                                          type: string
                                          example: AMS
                                        arrival_airport_timezone:
                                          type: string
                                          example: '+00:00'
                                        arrival_datetime:
                                          type: string
                                          example: ''
                                        carrier_code:
                                          type: string
                                          example: KL
                                        carrier_name:
                                          type: string
                                          example: KLM Royal Dutch Airlines
                                        flight_number:
                                          type: string
                                          example: '842'
                                        fare_basis_code:
                                          type: string
                                          example: HL7LNR
                                        fare_class_code:
                                          type: string
                                          example: FR
                                        base_fare:
                                          type: integer
                                          example: 200
                                          default: 0
                                        base_fare_currency:
                                          type: string
                                          example: BRL
                                        stopover_code:
                                          type: string
                                          example: s
                                  passengers:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        first_name:
                                          type: string
                                          example: string
                                        last_name:
                                          type: string
                                          example: string
                                        middle_name:
                                          type: string
                                          example: string
                                        type:
                                          type: string
                                          example: s
                                        date_of_birth:
                                          type: string
                                          example: stringstri
                                        nationality:
                                          type: string
                                          example: st
                                        document:
                                          type: object
                                          properties:
                                            document_type:
                                              type: string
                                              example: CPF
                                            document_number:
                                              type: string
                                              example: 351.040.753-97
                                        country:
                                          type: string
                                          example: st
                                        loyalty_number:
                                          type: string
                                          example: string
                                        loyalty_tier:
                                          type: string
                                          example: strin
                                        email: {}
                                        phone: {}
                                  ticket: {}
                                  tickets:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        ticket_number:
                                          type: string
                                          example: '123456'
                                        e_ticket:
                                          type: boolean
                                          example: false
                                          default: true
                                        restricted:
                                          type: boolean
                                          example: false
                                          default: true
                                        total_fare_amount:
                                          type: integer
                                          example: 80
                                          default: 0
                                        total_tax_amount:
                                          type: integer
                                          example: 22
                                          default: 0
                                        total_fee_amount:
                                          type: integer
                                          example: 14
                                          default: 0
                                        issue: {}
                              order:
                                type: object
                                properties:
                                  fee_amount:
                                    type: integer
                                    example: 100
                                    default: 0
                                  shipping_amount:
                                    type: integer
                                    example: 100
                                    default: 0
                                  tip_amount: {}
                                  items:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        id:
                                          type: string
                                          example: 123AD
                                        name:
                                          type: string
                                          example: Skirt
                                        quantity:
                                          type: integer
                                          example: 1
                                          default: 0
                                        unit_amount:
                                          type: integer
                                          example: 29800
                                          default: 0
                                        category:
                                          type: string
                                          example: Clothes
                                        brand:
                                          type: string
                                          example: XYZ
                                        sku_code:
                                          type: string
                                          example: '8765432109'
                                        manufacture_part_number:
                                          type: string
                                          example: XYZ123456
                              seller_details: {}
                      customer_payer:
                        type: object
                        properties:
                          id:
                            type: string
                            example: f73dd905-a242-477f-8273-539ed8fbad9e
                          merchant_customer_id:
                            type: string
                            example: c2-2745600
                          first_name:
                            type: string
                            example: John
                          last_name:
                            type: string
                            example: Doe
                          gender:
                            type: string
                            example: M
                          date_of_birth:
                            type: string
                            example: '1990-02-28'
                          email:
                            type: string
                            example: johndoe@example.com
                          nationality:
                            type: string
                            example: US
                          ip_address:
                            nullable: true
                          device_fingerprint:
                            nullable: true
                          device_fingerprints:
                            type: array
                            items: {}
                          browser_info:
                            nullable: true
                          document:
                            type: object
                            properties:
                              document_type:
                                type: string
                                example: SSN
                              document_number:
                                type: string
                                example: 123-45-6789
                          phone:
                            type: object
                            properties:
                              number:
                                type: string
                                example: '5551234567'
                              country_code:
                                type: string
                                example: '1'
                          billing_address:
                            type: object
                            properties:
                              address_line_1:
                                type: string
                                example: 123 Main St
                              address_line_2:
                                type: string
                                example: Apt 4B
                              country:
                                type: string
                                example: US
                              state:
                                type: string
                                example: NY
                              city:
                                type: string
                                example: New York
                              zip_code:
                                type: string
                                example: '10001'
                              neighborhood:
                                type: string
                                example: Manhattan
                          shipping_address:
                            type: object
                            properties:
                              address_line_1:
                                type: string
                                example: 123 Main St
                              address_line_2:
                                type: string
                                example: Apt 4B
                              country:
                                type: string
                                example: US
                              state:
                                type: string
                                example: NY
                              city:
                                type: string
                                example: New York
                              zip_code:
                                type: string
                                example: '10001'
                              neighborhood:
                                type: string
                                example: Manhattan
                          merchant_customer_created_at:
                            type: string
                            example: '2022-05-09T20:46:54.786342Z'
                        description: 客户付款方。
                      simplified_mode:
                        type: boolean
                        example: false
                        description: 简化模式。
                      receipt:
                        type: boolean
                        example: false
                        description: 收据。
                      receipt_url:
                        nullable: true
                        description: 收据 URL。
                      receipt_language:
                        nullable: true
                        description: 收据语言。
                      split_marketplace:
                        type: array
                        items: {}
                        description: 拆分 marketplace。
                      metadata:
                        nullable: true
                        description: 元数据。
                  - title: 部分退款
                    type: object
                    properties:
                      id:
                        type: string
                        example: e44cdc8e-01e7-4767-a1b6-3a646a609dc5
                      type:
                        type: string
                        example: REFUND
                      status:
                        type: string
                        example: SUCCEEDED
                      category:
                        type: string
                        example: CARD
                      amount:
                        type: object
                        properties:
                          captured:
                            type: integer
                            example: 0
                            default: 0
                          currency:
                            type: string
                            example: COP
                          refunded:
                            type: integer
                            example: 0
                            default: 0
                          value:
                            type: integer
                            example: 30000
                            default: 0
                      merchant_reference:
                        type: string
                        example: '0000023'
                      created_at:
                        type: string
                        example: '2024-06-06T14:07:53.881239Z'
                      updated_at:
                        type: string
                        example: '2024-06-06T14:08:17.438878Z'
                      provider_data:
                        type: object
                        properties:
                          id:
                            type: string
                            example: YUNO_TEST_PAYMENT_GW
                          transaction_id:
                            type: string
                            example: ''
                          account_id:
                            type: string
                            example: 493e9374-510a-4201-9e09-de669d75f256
                          status:
                            type: string
                            example: ''
                          sub_status:
                            type: string
                            example: ''
                          status_detail:
                            type: string
                            example: ''
                          response_message: {}
                          response_code:
                            type: string
                            example: SUCCEEDED
                          iso8583_response_code:
                            type: string
                            example: '00'
                          iso8583_response_message:
                            type: string
                            example: Approved or completed successfully
                          raw_request:
                            type: object
                            description: Yuno 发送给服务提供商的请求的混淆副本。仅对列入允许名单的组织返回。
                          raw_response: {}
                          third_party_transaction_id: {}
                          third_party_account_id: {}
                      connection_data:
                        type: object
                        properties:
                          id:
                            type: string
                            example: 58cc35f4-faef-4107-8e09-d18d60121d38
                          name:
                            type: string
                            example: Connection name
                      response_code:
                        type: string
                        example: SUCCEEDED
                      response_message:
                        type: string
                        example: Transaction successful
                      payment:
                        type: object
                        properties:
                          id:
                            type: string
                            example: eee7daeb-5ed7-41bd-8fee-7a440ca2ab86
                          account_id:
                            type: string
                            example: ''
                          description:
                            type: string
                            example: Test
                          country:
                            type: string
                            example: CO
                          status:
                            type: string
                            example: SUCCEEDED
                          sub_status:
                            type: string
                            example: PARTIALLY_REFUNDED
                          merchant_order_id:
                            type: string
                            example: '0000023'
                          created_at:
                            type: string
                            example: '2024-06-06T14:07:53.881239Z'
                          updated_at:
                            type: string
                            example: '2024-06-06T14:07:53.881239Z'
                          amount:
                            type: object
                            properties:
                              captured:
                                type: integer
                                example: 0
                                default: 0
                              authorized:
                                type: number
                                description: >-
                                  服务提供商已批准的金额（0.0001 的倍数），扣除任何 Yuno 促销（`value`
                                  减去
                                  `discount_amount`），并加上已批准的增量授权。在全额批准时，或服务提供商未返回已批准金额时，它等于该净额。对于发送了
                                  `payment_method.detail.card.partial_approval:
                                  true` 的卡支付，部分批准后支付仍保持全额批准的状态，因此当 `authorized`
                                  小于 `value` 减去 `discount_amount`（无促销时，小于
                                  `value`）时，即为部分批准。对于未获批准的支付，或在引入此字段之前创建的支付，不会返回此字段。
                                example: 30000
                              currency:
                                type: string
                                example: COP
                              refunded:
                                type: integer
                                example: 1000
                                default: 0
                              value:
                                type: integer
                                example: 30000
                                default: 0
                          discount_amount:
                            type: object
                            description: >-
                              应用于支付的 Yuno 促销的总折扣：即
                              `additional_data.order.discounts` 中
                              `YUNO_PROMOTION` 行的总和。未应用促销时不存在。实际扣款金额为
                              `amount.value` 减去此值，见 `transactions.amount`。请参阅
                              [Promotions](/zh-hans/docs/payment-features/promotions)。
                            properties:
                              currency:
                                type: string
                                description: 折扣的货币，与 `amount.currency` 相同。
                              value:
                                type: number
                                description: 折扣。
                          additional_data:
                            type: object
                            properties:
                              airline:
                                type: object
                                properties:
                                  pnr:
                                    type: string
                                    example: 1P-2UUGJW
                                  legs:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        departure_airport:
                                          type: string
                                          example: EZE
                                        departure_datetime:
                                          type: string
                                          example: '2014-05-12 13:05:00'
                                        departure_airport_timezone:
                                          type: string
                                          example: '-03:00'
                                        arrival_airport:
                                          type: string
                                          example: AMS
                                        arrival_airport_timezone:
                                          type: string
                                          example: '+00:00'
                                        arrival_datetime:
                                          type: string
                                          example: ''
                                        carrier_code:
                                          type: string
                                          example: KL
                                        carrier_name:
                                          type: string
                                          example: KLM Royal Dutch Airlines
                                        flight_number:
                                          type: string
                                          example: '842'
                                        fare_basis_code:
                                          type: string
                                          example: HL7LNR
                                        fare_class_code:
                                          type: string
                                          example: FR
                                        base_fare:
                                          type: integer
                                          example: 200
                                          default: 0
                                        base_fare_currency:
                                          type: string
                                          example: BRL
                                        stopover_code:
                                          type: string
                                          example: s
                                  passengers:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        first_name:
                                          type: string
                                          example: string
                                        last_name:
                                          type: string
                                          example: string
                                        middle_name:
                                          type: string
                                          example: string
                                        type:
                                          type: string
                                          example: s
                                        date_of_birth:
                                          type: string
                                          example: stringstri
                                        nationality:
                                          type: string
                                          example: st
                                        document:
                                          type: object
                                          properties:
                                            document_type:
                                              type: string
                                              example: CPF
                                            document_number:
                                              type: string
                                              example: 351.040.753-97
                                        country:
                                          type: string
                                          example: st
                                        loyalty_number:
                                          type: string
                                          example: string
                                        loyalty_tier:
                                          type: string
                                          example: strin
                                        email: {}
                                        phone: {}
                                  ticket: {}
                                  tickets:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        ticket_number:
                                          type: string
                                          example: '123456'
                                        e_ticket:
                                          type: boolean
                                          example: false
                                          default: true
                                        restricted:
                                          type: boolean
                                          example: false
                                          default: true
                                        total_fare_amount:
                                          type: integer
                                          example: 80
                                          default: 0
                                        total_tax_amount:
                                          type: integer
                                          example: 22
                                          default: 0
                                        total_fee_amount:
                                          type: integer
                                          example: 14
                                          default: 0
                                        issue: {}
                              order:
                                type: object
                                properties:
                                  fee_amount:
                                    type: integer
                                    example: 100
                                    default: 0
                                  shipping_amount:
                                    type: integer
                                    example: 100
                                    default: 0
                                  tip_amount: {}
                                  items:
                                    type: array
                                    items:
                                      type: object
                                      properties:
                                        id:
                                          type: string
                                          example: 123AD
                                        name:
                                          type: string
                                          example: Skirt
                                        quantity:
                                          type: integer
                                          example: 1
                                          default: 0
                                        unit_amount:
                                          type: integer
                                          example: 29800
                                          default: 0
                                        category:
                                          type: string
                                          example: Clothes
                                        brand:
                                          type: string
                                          example: XYZ
                                        sku_code:
                                          type: string
                                          example: '8765432109'
                                        manufacture_part_number:
                                          type: string
                                          example: XYZ123456
                              seller_details: {}
                      customer_payer:
                        type: object
                        properties:
                          id:
                            type: string
                            example: f73dd905-a242-477f-8273-539ed8fbad9e
                          merchant_customer_id:
                            type: string
                            example: c2-2745600
                          first_name:
                            type: string
                            example: John
                          last_name:
                            type: string
                            example: Doe
                          gender:
                            type: string
                            example: M
                          date_of_birth:
                            type: string
                            example: '1990-02-28'
                          email:
                            type: string
                            example: johndoe@example.com
                          nationality:
                            type: string
                            example: US
                          ip_address:
                            nullable: true
                          device_fingerprint:
                            nullable: true
                          device_fingerprints:
                            type: array
                            items: {}
                          browser_info:
                            nullable: true
                          document:
                            type: object
                            properties:
                              document_type:
                                type: string
                                example: SSN
                              document_number:
                                type: string
                                example: 123-45-6789
                          phone:
                            type: object
                            properties:
                              number:
                                type: string
                                example: '5551234567'
                              country_code:
                                type: string
                                example: '1'
                          billing_address:
                            type: object
                            properties:
                              address_line_1:
                                type: string
                                example: 123 Main St
                              address_line_2:
                                type: string
                                example: Apt 4B
                              country:
                                type: string
                                example: US
                              state:
                                type: string
                                example: NY
                              city:
                                type: string
                                example: New York
                              zip_code:
                                type: string
                                example: '10001'
                              neighborhood:
                                type: string
                                example: Manhattan
                          shipping_address:
                            type: object
                            properties:
                              address_line_1:
                                type: string
                                example: 123 Main St
                              address_line_2:
                                type: string
                                example: Apt 4B
                              country:
                                type: string
                                example: US
                              state:
                                type: string
                                example: NY
                              city:
                                type: string
                                example: New York
                              zip_code:
                                type: string
                                example: '10001'
                              neighborhood:
                                type: string
                                example: Manhattan
                          merchant_customer_created_at:
                            type: string
                            example: '2022-05-09T20:46:54.786342Z'
                        description: 客户付款方。
                      simplified_mode:
                        type: boolean
                        example: false
                        description: 简化模式。
                      receipt:
                        type: boolean
                        example: false
                        description: 收据。
                      receipt_url:
                        nullable: true
                        description: 收据 URL。
                      receipt_language:
                        nullable: true
                        description: 收据语言。
                      split_marketplace:
                        type: array
                        items: {}
                        description: 拆分 marketplace。
                      metadata:
                        nullable: true
                        description: 元数据。
                  - title: 取消
                    type: object
                    properties:
                      id:
                        type: string
                        example: 2fbc6db6-718b-4554-b03f-826e552f1b9f
                      type:
                        type: string
                        example: CANCEL
                      status:
                        type: string
                        example: SUCCEEDED
                      category:
                        type: string
                        example: CARD
                      amount:
                        type: object
                        properties:
                          captured:
                            type: integer
                            example: 0
                            default: 0
                          currency:
                            type: string
                            example: COP
                          refunded:
                            type: integer
                            example: 0
                            default: 0
                          value:
                            type: integer
                            example: 30000
                            default: 0
                      merchant_reference:
                        type: string
                        example: ''
                      created_at:
                        type: string
                        example: '2024-06-06T14:05:31.651012Z'
                      updated_at:
                        type: string
                        example: '2024-06-06T14:05:31.742355Z'
                      provider_data:
                        type: object
                        properties:
                          id:
                            type: string
                            example: YUNO_TEST_PAYMENT_GW
                          transaction_id:
                            type: string
                            example: ''
                          account_id:
                            type: string
                            example: ''
                          status:
                            type: string
                            example: SUCCEEDED
                          sub_status:
                            type: string
                            example: ''
                          status_detail:
                            type: string
                            example: SUCCEEDED
                          response_message: {}
                          response_code:
                            type: string
                            example: SUCCEEDED
                          iso8583_response_code:
                            type: string
                            example: '00'
                          iso8583_response_message:
                            type: string
                            example: Approved or completed successfully
                          raw_request:
                            type: object
                            description: Yuno 发送给服务提供商的请求的混淆副本。仅对列入允许名单的组织返回。
                          raw_response: {}
                          third_party_transaction_id: {}
                          third_party_account_id: {}
                      connection_data:
                        type: object
                        properties:
                          id:
                            type: string
                            example: 58cc35f4-faef-4107-8e09-d18d60121d38
                          name:
                            type: string
                            example: Connection name
                      response_code:
                        type: string
                        example: SUCCEEDED
                      response_message:
                        type: string
                        example: Transaction successful
                      payment:
                        type: object
                        properties:
                          id:
                            type: string
                            example: cddba02c-e47d-4330-9cac-afcd9c0194b1
                          account_id:
                            type: string
                            example: ''
                          description:
                            type: string
                            example: Test
                          country:
                            type: string
                            example: CO
                          status:
                            type: string
                            example: CANCELED
                          sub_status:
                            type: string
                            example: CANCELED
                          merchant_order_id:
                            type: string
                            example: '0000023'
                          created_at:
                            type: string
                            example: '2024-06-06T14:04:44.768364Z'
                          updated_at:
                            type: string
                            example: '2024-06-06T14:05:31.79539Z'
                          amount:
                            type: object
                            properties:
                              captured:
                                type: integer
                                example: 0
                                default: 0
                              authorized:
                                type: number
                                description: >-
                                  服务提供商已批准的金额（0.0001 的倍数），扣除任何 Yuno 促销（`value`
                                  减去
                                  `discount_amount`），并加上已批准的增量授权。在全额批准时，或服务提供商未返回已批准金额时，它等于该净额。对于发送了
                                  `payment_method.detail.card.partial_approval:
                                  true` 的卡支付，部分批准后支付仍保持全额批准的状态，因此当 `authorized`
                                  小于 `value` 减去 `discount_amount`（无促销时，小于
                                  `value`）时，即为部分批准。对于未获批准的支付，或在引入此字段之前创建的支付，不会返回此字段。
                                example: 30000
                              currency:
                                type: string
                                example: COP
                              refunded:
                                type: integer
                                example: 0
                                default: 0
                              value:
                                type: integer
                                example: 30000
                                default: 0
                          discount_amount:
                            type: object
                            description: >-
                              应用于支付的 Yuno 促销的总折扣：即
                              `additional_data.order.discounts` 中
                              `YUNO_PROMOTION` 行的总和。未应用促销时不存在。实际扣款金额为
                              `amount.value` 减去此值，见 `transactions.amount`。请参阅
                              [Promotions](/zh-hans/docs/payment-features/promotions)。
                            properties:
                              currency:
                                type: string
                                description: 折扣的货币，与 `amount.currency` 相同。
                              value:
                                type: number
                                description: 折扣。
                      customer_payer:
                        type: object
                        properties:
                          id:
                            type: string
                            example: f73dd905-a242-477f-8273-539ed8fbad9e
                          merchant_customer_id:
                            type: string
                            example: c2-2745600
                          first_name:
                            type: string
                            example: John
                          last_name:
                            type: string
                            example: Doe
                          gender:
                            type: string
                            example: M
                          date_of_birth:
                            type: string
                            example: '1990-02-28'
                          email:
                            type: string
                            example: johndoe@example.com
                          nationality:
                            type: string
                            example: US
                          ip_address:
                            nullable: true
                          device_fingerprint:
                            nullable: true
                          device_fingerprints:
                            type: array
                            items: {}
                          browser_info:
                            nullable: true
                          document:
                            type: object
                            properties:
                              document_type:
                                type: string
                                example: SSN
                              document_number:
                                type: string
                                example: 123-45-6789
                          phone:
                            type: object
                            properties:
                              number:
                                type: string
                                example: '5551234567'
                              country_code:
                                type: string
                                example: '1'
                          billing_address:
                            type: object
                            properties:
                              address_line_1:
                                type: string
                                example: 123 Main St
                              address_line_2:
                                type: string
                                example: Apt 4B
                              country:
                                type: string
                                example: US
                              state:
                                type: string
                                example: NY
                              city:
                                type: string
                                example: New York
                              zip_code:
                                type: string
                                example: '10001'
                              neighborhood:
                                type: string
                                example: Manhattan
                          shipping_address:
                            type: object
                            properties:
                              address_line_1:
                                type: string
                                example: 123 Main St
                              address_line_2:
                                type: string
                                example: Apt 4B
                              country:
                                type: string
                                example: US
                              state:
                                type: string
                                example: NY
                              city:
                                type: string
                                example: New York
                              zip_code:
                                type: string
                                example: '10001'
                              neighborhood:
                                type: string
                                example: Manhattan
                          merchant_customer_created_at:
                            type: string
                            example: '2022-05-09T20:46:54.786342Z'
                        description: 客户付款方。
                      simplified_mode:
                        type: boolean
                        example: false
                        description: 简化模式。
                      receipt:
                        type: boolean
                        example: false
                        description: 收据。
                      receipt_url:
                        nullable: true
                        description: 收据 URL。
                      receipt_language:
                        nullable: true
                        description: 收据语言。
                      split_marketplace:
                        type: array
                        items: {}
                        description: 拆分 marketplace。
                      metadata:
                        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:
                Forbidden:
                  value:
                    code: AUTHORIZATION_REQUIRED
                    messages:
                      - The merchant has no authorization to use this API.
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: AUTHORIZATION_REQUIRED
                  messages:
                    type: array
                    items:
                      type: string
                      example: The merchant has no authorization to use this API.
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      x-default: <Your public-api-key>
      name: public-api-key
    sec1:
      type: apiKey
      in: header
      x-default: <Your private-secret-key>
      name: private-secret-key
    sec2:
      type: apiKey
      in: header
      x-default: <Your X-Idempotency-Key>
      name: X-Idempotency-Key

````

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