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

# Cancelar ou reembolsar um pagamento com transação

> Cancela ou reembolsa um pagamento com base no status de um ID de transação específico.

> [!WARNING]
>
> Não execute um reembolso enquanto outro estiver em andamento. Aguarde a conclusão da operação atual antes de iniciar uma nova.

Este serviço permite cancelar ou reembolsar um pagamento existente. Nosso sistema identifica se é necessário um cancelamento ou um reembolso com base no status da transação relacionada ao `transaction_id` informado na requisição. Isso serve para cenários em que você quer ser mais específico sobre as ações realizadas no ciclo de vida dos pagamentos. Este serviço executa as seguintes funções com base no status da transação:

* **Cancela** o pagamento se ele ainda não foi capturado.
* **Reembolsa** o pagamento se ele já foi capturado.

> [!NOTE]
>
> **Reembolsos**
>
> Se você preencher o campo de valor, o reembolso será parcial. Caso contrário, será criado um reembolso total. Os fundos serão reembolsados no meio de pagamento que foi cobrado originalmente.
>
> A resposta retorna uma transação `REFUND` com seu próprio `status`: `SUCCEEDED` quando o reembolso é aprovado, ou `PENDING` enquanto o provedor o confirma. `REFUNDED` é um status de pagamento, não um status de transação. Depois que um reembolso total é bem-sucedido, o `status` e o `sub_status` do pagamento são `REFUNDED`.

> [!NOTE]
>
> **Pagamentos com uma promoção da Yuno**
>
> Um reembolso é calculado sobre o que o cliente pagou, `amount.value` menos `discount_amount`. Um reembolso total devolve esse valor, e um `amount` acima do que resta para reembolsar é rejeitado com `400 INVALID_PARAMETERS`. O cancelamento anula a autorização desse valor. Consulte [Promoções](https://docs.y.uno/docs/payment-features/promotions#refunds-captures-and-cancellations).

> [!NOTE]
>
> **Pagamentos parcialmente aprovados**
>
> Para um pagamento com cartão enviado com `payment_method.detail.card.partial_approval: true` e aprovado por um valor menor que o solicitado, os reembolsos ficam limitados a `amount.authorized`. Um reembolso total devolve `amount.authorized`, e um `amount` acima do que resta dele é rejeitado com `400 INVALID_PARAMETERS`.

Esta requisição exige um `X-Idempotency-Key`. Consulte a página [Autenticação](https://docs.y.uno/pt-br/reference/getting-started/authentication.md#idempotency) para mais informações.


## OpenAPI

````yaml openapi/pt-br/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: Cancelar ou reembolsar um pagamento com transação
      operationId: cancel-or-refund-payment-with-transaction
      parameters:
        - name: payment_id
          in: path
          description: O identificador único do pagamento (UUID, 36 caracteres).
          schema:
            type: string
          required: true
        - name: transaction_id
          in: path
          description: O identificador único da transação (UUID, 36 caracteres).
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required: []
              properties:
                description:
                  type: string
                  description: Descrição do cancelamento ou reembolso. (MAX 255; MIN 3).
                reason:
                  type: string
                  description: >-
                    Indica o motivo do cancelamento ou reembolso. Se definido,
                    os valores possíveis são `DUPLICATE`, `FRAUDULENT`,
                    `REQUESTED_BY_CUSTOMER` e `REVERSE`. Use `REVERSE` para
                    solicitar a reversão automática dos fundos do destinatário
                    quando houver um destinatário envolvido na transação.
                  enum:
                    - DUPLICATE
                    - FRAUDULENT
                    - REQUESTED_BY_CUSTOMER
                    - REVERSE
                merchant_reference:
                  type: string
                  description: >-
                    Identificação da transação de pagamento definida pelo
                    lojista. Se nenhum merchant_reference for definido, o
                    merchant_order_id do pagamento será associado à transação.
                    (MAX 255; MIN 3).
                amount:
                  type: object
                  description: Especifica o objeto de valor para o reembolso.
                  properties:
                    currency:
                      type: string
                      description: >-
                        A moeda usada para fazer o pagamento. Para a lista
                        completa de códigos de moeda, veja a [Referência de
                        países](/docs/country-reference) (MAX 3; MIN 3; ISO
                        4217).
                    value:
                      type: number
                      format: float
                      description: >-
                        O valor do pagamento (múltiplo de 0.0001). Para uma
                        moeda sem casas decimais (por exemplo, KRW, JPY ou CLP),
                        o valor deve ser um número inteiro: consulte [Valores e
                        moedas](/pt-br/docs/basic-concepts/amounts-and-currencies).
                split_marketplace:
                  type: array
                  description: Array de objetos de split de marketplace
                  items:
                    properties:
                      recipient_id:
                        type: string
                        description: >-
                          O identificador único do destinatário no sistema da
                          Yuno. <br/> Você deve informar o
                          [`recipient_id`](/pt-br/reference/recipients-for-marketplace/create-recipient-1)
                          (gerado pela Yuno) ou o `provider_recipient_id` (ID do
                          provedor externo) ao criar um pagamento.
                      provider_recipient_id:
                        type: string
                        description: >-
                          O ID do destinatário fornecido pelo provedor de
                          pagamento externo, se aplicável. <br/> Você deve
                          informar o `provider_recipient_id` ou o
                          [`recipient_id`](/pt-br/reference/recipients-for-marketplace/create-recipient-1)
                          (gerado pela Yuno) ao criar um pagamento.
                      description:
                        type: string
                        description: Descrição do split. (MAX 255; MIN 3).
                      type:
                        type: string
                        description: >-
                          O tipo de split. `recipient_id` é obrigatório para
                          `PURCHASE` e `MARKETPLACE`.
                        enum:
                          - PURCHASE
                          - PAYMENTFEE
                          - VAT
                          - COMMISSION
                          - MARKETPLACE
                          - SHIPPING
                      merchant_reference:
                        type: string
                        description: >-
                          Identificador único opcional da transação de split
                          (MAX 255; MIN 3).
                      recipient_type:
                        type: string
                        description: O tipo de destinatário para o provedor.
                        enum:
                          - MEAL
                          - FOOD
                          - MULTI_BENEFITS
                          - FLEET
                        example: MEAL
                      amount:
                        type: object
                        description: Define o valor do split.
                        required:
                          - value
                          - currency
                        properties:
                          value:
                            type: number
                            description: O valor do split (múltiplo de 0.0001).
                            format: float
                          currency:
                            type: string
                            description: >-
                              A moeda usada para fazer o pagamento. Para a lista
                              completa de códigos de moeda, veja a [Referência
                              de países](/docs/country-reference) (MAX 3; MIN 3;
                              ISO 4217).
                      liability:
                        type: object
                        description: >-
                          Informações opcionais sobre a responsabilidade do
                          destinatário por tarifas e chargebacks.
                        properties:
                          processing_fee:
                            type: string
                            description: Indica quem será cobrado pela tarifa da transação.
                            enum:
                              - MERCHANT
                              - RECIPIENT
                              - SHARED
                          chargebacks:
                            type: boolean
                            description: >-
                              O destinatário é responsável em caso de
                              chargeback.
                    required:
                      - type
                    type: object
                simplified_mode:
                  type: boolean
                  description: >-
                    Indica se devemos tentar reembolsar um pagamento após um
                    erro/recusa na primeira tentativa. O padrão é `false`. Para
                    mais informações, acesse o [guia](transaction-retries).
                  default: false
                response_additional_data:
                  type: object
                  description: >-
                    Especifica dados adicionais necessários para a resposta da
                    transação
                  properties:
                    receipt:
                      type: boolean
                      description: >-
                        Indica se um recibo é necessário para a resposta da
                        transação
                    receipt_language:
                      type: string
                      description: Indica o idioma do recibo a ser gerado
                      enum:
                        - ES
                        - EN
                        - PT
                customer_payer:
                  type: object
                  description: Especifica o objeto de cliente dos pagamentos.
                  properties:
                    first_name:
                      type: string
                      description: O primeiro nome do cliente (MAX 255; MIN 3).
                    last_name:
                      type: string
                      description: O sobrenome do cliente (MAX 255; MIN 3).
                    gender:
                      type: string
                      description: >-
                        O gênero do cliente (MAX 2; MIN 1). <br/>- M=Masculino
                        <br/>- F=Feminino <br/>- NB=Não binário <br/>- NA=Não
                        aplicável <br/>- NK=Não conhecido <br/>- U=Indefinido.
                      enum:
                        - M
                        - F
                        - NB
                        - NA
                        - NK
                        - U
                    date_of_birth:
                      type: string
                      description: >-
                        A data de nascimento do cliente no formato `YYYY-MM-DD`
                        (comprimento: 10).
                    email:
                      type: string
                      description: O e-mail do cliente (MAX 255; MIN 3).
                    nationality:
                      type: string
                      description: >-
                        A nacionalidade do cliente (MAX 2; MIN 2; [ISO
                        3166-1](/pt-br/reference/country-reference)).
                    document:
                      type: object
                      description: >-
                        Especifica o objeto de documento do cliente, incluindo o
                        número e o tipo.
                      properties:
                        document_number:
                          type: string
                          description: Número do documento do cliente (MAX 40; MIN 3)
                        document_type:
                          type: string
                          description: >-
                            O tipo de documento do cliente (MAX 6, MIN 2).
                            Acesse a [Lista de tipos de
                            documento](/pt-br/reference/country-reference) para
                            mais detalhes.
                          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: Especifica o objeto de telefone do cliente.
                      properties:
                        country_code:
                          type: string
                          description: >-
                            O código do país do telefone do cliente (MAX 3; MIN
                            1).
                        number:
                          type: string
                          description: >-
                            O número de telefone do cliente, sem o código do
                            país (MAX 32; MIN 1).
                    billing_address:
                      type: object
                      description: Especifica o objeto de endereço de cobrança do cliente.
                      properties:
                        address_line_1:
                          type: string
                          description: >-
                            A linha principal do endereço de cobrança do cliente
                            (MAX 255; MIN 3).
                        address_line_2:
                          type: string
                          description: >-
                            A linha secundária do endereço de cobrança do
                            cliente (MAX 255; MIN 3).
                        city:
                          type: string
                          description: >-
                            A cidade considerada para o endereço de cobrança
                            (MAX 255; MIN 3).
                        country:
                          type: string
                          description: >-
                            O país considerado para o endereço de cobrança (MAX
                            2; MIN 2; [ISO
                            3166-1](https://docs.y.uno/pt-br/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: >-
                            O estado considerado para o endereço de cobrança
                            (MAX 255; MIN 3).
                        zip_code:
                          type: string
                          description: >-
                            O CEP considerado para o endereço de cobrança (MAX
                            10; MIN 5).
                    shipping_address:
                      type: object
                      description: Especifica o objeto de endereço de entrega do cliente.
                      properties:
                        address_line_1:
                          type: string
                          description: >-
                            A linha principal do endereço de entrega do cliente
                            (MAX 255; MIN 3).
                        address_line_2:
                          type: string
                          description: >-
                            A linha secundária do endereço de entrega do cliente
                            (MAX 255; MIN 3).
                        city:
                          type: string
                          description: >-
                            A cidade considerada para o endereço de entrega (MAX
                            255; MIN 3).
                        country:
                          type: string
                          description: >-
                            O país considerado para o endereço de entrega (MAX
                            2; MIN 2; [ISO
                            3166-1](https://docs.y.uno/pt-br/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: >-
                            O estado considerado para o endereço de entrega (MAX
                            255; MIN 3).
                        zip_code:
                          type: string
                          description: >-
                            O CEP considerado para o endereço de entrega (MAX
                            10; MIN 5).
                payment_method:
                  type: object
                  description: Especifica o objeto de meio de pagamento para pagamentos.
                  properties:
                    detail:
                      type: object
                      description: Especifica o objeto de detalhes do meio de pagamento.
                      properties:
                        bank_transfer:
                          type: object
                          description: >-
                            Especifica os detalhes do meio de pagamento por
                            transferência bancária.
                          properties:
                            account_type:
                              type: string
                              description: Tipo de conta bancária (MAX 255; MIN 3)
                              enum:
                                - CHECKINGS
                                - SAVINGS
                            bank_name:
                              type: string
                              description: Nome do banco (MAX 255; MIN 3)
                            bank_id:
                              type: string
                              description: ID do banco (MAX 255; MIN 3)
                            beneficiary_name:
                              type: string
                              description: Nome do titular da conta (MAX 255; MIN 3)
                            bank_account:
                              type: string
                              description: Número da conta bancária (MAX 255; MIN 3)
                            beneficiary_document_type:
                              type: string
                              description: >-
                                Tipo de documento do titular da conta (MAX 255;
                                MIN 3)
                            beneficiary_document:
                              type: string
                              description: >-
                                Número do documento do titular da conta (MAX
                                255; MIN 3)
                            reference:
                              type: string
                              description: Código de referência do usuário (MAX 255; MIN 1)
                            bank_account_mask_number:
                              type: string
                              description: >-
                                Número mascarado da conta bancária associada à
                                transferência bancária (por exemplo, ****6789).
                                São dados da conta, não do mandato.
                            mandate:
                              type: object
                              description: >-
                                Detalhes do mandato de débito direto, para
                                métodos de transferência bancária que operam com
                                mandatos (por exemplo, ACH, SEPA, BACS, PAD).
                              properties:
                                id:
                                  type: string
                                  description: >-
                                    Identificador do mandato, conforme fornecido
                                    pelo provedor de pagamento.
                                info:
                                  type: string
                                  description: Free-text mandate information.
                                received_status:
                                  type: string
                                  description: >-
                                    Status do provedor que indica se o mandato
                                    foi recebido. Repassado conforme fornecido
                                    pelo provedor de pagamento.
                                existing_status:
                                  type: string
                                  description: >-
                                    Status do provedor para o mandato existente.
                                    Repassado conforme fornecido pelo provedor
                                    de pagamento.
                                created_at:
                                  type: string
                                  format: date-time
                                  description: >-
                                    Data e hora em que o mandato foi criado (ISO
                                    8601).
                                updated_at:
                                  type: string
                                  format: date-time
                                  description: >-
                                    Data e hora da última atualização do mandato
                                    (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: Reembolso total
                    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: >-
                              Cópia ofuscada da requisição que a Yuno enviou ao
                              provedor. Retornada apenas para organizações em
                              uma lista de permissões.
                          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: >-
                                  O valor que o provedor aprovou (múltiplo de
                                  0.0001), líquido de qualquer promoção da Yuno
                                  (`value` menos `discount_amount`) e acrescido
                                  das autorizações incrementais aprovadas. Ele é
                                  igual a esse valor líquido em uma aprovação
                                  total ou quando o provedor não retorna um
                                  valor aprovado. Após uma aprovação parcial de
                                  um pagamento com cartão enviado com
                                  `payment_method.detail.card.partial_approval:
                                  true`, o pagamento mantém o status de uma
                                  aprovação total, então ele está parcialmente
                                  aprovado quando `authorized` é menor que
                                  `value` menos `discount_amount` (quando não há
                                  promoção, menor que `value`). Não é retornado
                                  para pagamentos que não foram aprovados ou que
                                  foram criados antes da introdução deste campo.
                                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: >-
                              O desconto total da promoção da Yuno aplicada ao
                              pagamento: a soma das linhas `YUNO_PROMOTION` de
                              `additional_data.order.discounts`. Ausente quando
                              nenhuma promoção foi aplicada. O valor cobrado é
                              `amount.value` menos este valor, e ele está em
                              `transactions.amount`. Veja
                              [Promoções](/docs/payment-features/promotions).
                            properties:
                              currency:
                                type: string
                                description: >-
                                  A moeda do desconto, a mesma de
                                  `amount.currency`.
                              value:
                                type: number
                                description: O desconto.
                          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: Cliente pagador.
                      simplified_mode:
                        type: boolean
                        example: false
                        description: Modo simplificado.
                      receipt:
                        type: boolean
                        example: false
                        description: Recibo.
                      receipt_url:
                        nullable: true
                        description: URL do recibo.
                      receipt_language:
                        nullable: true
                        description: Idioma do recibo.
                      split_marketplace:
                        type: array
                        items: {}
                        description: Split de marketplace.
                      metadata:
                        nullable: true
                        description: Metadados.
                  - title: Reembolso parcial
                    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: >-
                              Cópia ofuscada da requisição que a Yuno enviou ao
                              provedor. Retornada apenas para organizações em
                              uma lista de permissões.
                          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: >-
                                  O valor que o provedor aprovou (múltiplo de
                                  0.0001), líquido de qualquer promoção da Yuno
                                  (`value` menos `discount_amount`) e acrescido
                                  das autorizações incrementais aprovadas. Ele é
                                  igual a esse valor líquido em uma aprovação
                                  total ou quando o provedor não retorna um
                                  valor aprovado. Após uma aprovação parcial de
                                  um pagamento com cartão enviado com
                                  `payment_method.detail.card.partial_approval:
                                  true`, o pagamento mantém o status de uma
                                  aprovação total, então ele está parcialmente
                                  aprovado quando `authorized` é menor que
                                  `value` menos `discount_amount` (quando não há
                                  promoção, menor que `value`). Não é retornado
                                  para pagamentos que não foram aprovados ou que
                                  foram criados antes da introdução deste campo.
                                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: >-
                              O desconto total da promoção da Yuno aplicada ao
                              pagamento: a soma das linhas `YUNO_PROMOTION` de
                              `additional_data.order.discounts`. Ausente quando
                              nenhuma promoção foi aplicada. O valor cobrado é
                              `amount.value` menos este valor, e ele está em
                              `transactions.amount`. Veja
                              [Promoções](/docs/payment-features/promotions).
                            properties:
                              currency:
                                type: string
                                description: >-
                                  A moeda do desconto, a mesma de
                                  `amount.currency`.
                              value:
                                type: number
                                description: O desconto.
                          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: Cliente pagador.
                      simplified_mode:
                        type: boolean
                        example: false
                        description: Modo simplificado.
                      receipt:
                        type: boolean
                        example: false
                        description: Recibo.
                      receipt_url:
                        nullable: true
                        description: URL do recibo.
                      receipt_language:
                        nullable: true
                        description: Idioma do recibo.
                      split_marketplace:
                        type: array
                        items: {}
                        description: Split de marketplace.
                      metadata:
                        nullable: true
                        description: Metadados.
                  - title: Cancelamento
                    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: >-
                              Cópia ofuscada da requisição que a Yuno enviou ao
                              provedor. Retornada apenas para organizações em
                              uma lista de permissões.
                          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: >-
                                  O valor que o provedor aprovou (múltiplo de
                                  0.0001), líquido de qualquer promoção da Yuno
                                  (`value` menos `discount_amount`) e acrescido
                                  das autorizações incrementais aprovadas. Ele é
                                  igual a esse valor líquido em uma aprovação
                                  total ou quando o provedor não retorna um
                                  valor aprovado. Após uma aprovação parcial de
                                  um pagamento com cartão enviado com
                                  `payment_method.detail.card.partial_approval:
                                  true`, o pagamento mantém o status de uma
                                  aprovação total, então ele está parcialmente
                                  aprovado quando `authorized` é menor que
                                  `value` menos `discount_amount` (quando não há
                                  promoção, menor que `value`). Não é retornado
                                  para pagamentos que não foram aprovados ou que
                                  foram criados antes da introdução deste campo.
                                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: >-
                              O desconto total da promoção da Yuno aplicada ao
                              pagamento: a soma das linhas `YUNO_PROMOTION` de
                              `additional_data.order.discounts`. Ausente quando
                              nenhuma promoção foi aplicada. O valor cobrado é
                              `amount.value` menos este valor, e ele está em
                              `transactions.amount`. Veja
                              [Promoções](/docs/payment-features/promotions).
                            properties:
                              currency:
                                type: string
                                description: >-
                                  A moeda do desconto, a mesma de
                                  `amount.currency`.
                              value:
                                type: number
                                description: O desconto.
                      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: Cliente pagador.
                      simplified_mode:
                        type: boolean
                        example: false
                        description: Modo simplificado.
                      receipt:
                        type: boolean
                        example: false
                        description: Recibo.
                      receipt_url:
                        nullable: true
                        description: URL do recibo.
                      receipt_language:
                        nullable: true
                        description: Idioma do recibo.
                      split_marketplace:
                        type: array
                        items: {}
                        description: Split de marketplace.
                      metadata:
                        nullable: true
                        description: Metadados.
        '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.