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

# Criar pagamento (dois cartões)

> Crie um pagamento financiado por exatamente dois cartões com POST /v2/payments, usando o workflow DIRECT, REDIRECT ou SDK_CHECKOUT.

Esta requisição cria um pagamento financiado por exatamente dois cartões. Cada cartão paga sua parte de `amount`, e as duas partes precisam somar `amount.value`. A URL base é `https://api-sandbox.y.uno/v2` no sandbox e `https://api.y.uno/v2` em produção. Leia [Pagar com dois cartões](https://docs.y.uno/pt-br/docs/payment-features/pay-with-two-cards.md) antes de integrar.

* **`DIRECT` ou `REDIRECT`**: envie `payment_method.payment_methods` com exatamente dois itens, ambos `type: CARD`. Cada item tem seu `amount` e `detail.card` ou um `vaulted_token`.
* **`SDK_CHECKOUT`**: envie `checkout.session` e o `payment_method.token` composto do [Web SDK headless](https://docs.y.uno/pt-br/docs/sdks/headless-web/payment.md#split-one-payment-across-two-cards). Não envie `payment_methods`.

`payment_method.capture` se aplica aos dois cartões e o padrão é `true`. Não envie `capture` dentro de `detail.card`: a requisição é rejeitada.

A resposta tem o mesmo formato de [Recuperar pagamento (dois cartões)](https://docs.y.uno/pt-br/reference/payments/retrieve-payment-two-cards.md).

> [!WARNING]
>
> **Tudo ou nada**
>
> Se um cartão falhar, a Yuno reverte o outro cartão antes de responder a esta requisição, então a resposta já mostra o resultado final. Consulte [Tudo ou nada](https://docs.y.uno/pt-br/docs/payment-features/pay-with-two-cards.md#all-or-nothing).

> [!NOTE]
>
> **Habilitação**
>
> Em produção, os pagamentos com dois cartões são habilitados por organização. Até isso acontecer, esta requisição retorna `403 PRODUCT_NOT_ENABLED`. No sandbox, eles estão habilitados para todas as organizações.

`split_marketplace`, `external_subscription` e `amount.currency_conversion` não são permitidos com dois cartões, e cotações de promoção não são aceitas.

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


## OpenAPI

````yaml openapi/pt-br/payments/create-payment-v2.json POST /payments
openapi: 3.1.0
info:
  title: payments-v2
  version: 2.0.0
servers:
  - url: https://api-sandbox.y.uno/v2
    description: Sandbox
  - url: https://api.y.uno/v2
    description: Production (US)
security:
  - sec0: []
    sec1: []
paths:
  /payments:
    post:
      summary: Criar pagamento (dois cartões)
      description: >-
        Cria um pagamento financiado por exatamente dois cartões. Cada cartão
        paga a sua parte do `amount`. Se um cartão falhar, a Yuno reverte o
        outro antes de responder.
      operationId: create-payment-v2
      parameters:
        - name: X-Idempotency-Key
          in: header
          required: true
          description: >-
            Chave única para esta requisição. Obrigatória em toda requisição de
            pagamento v2. Repita um resultado incerto com a mesma chave. Sem
            ela, a requisição é rejeitada com `400 INVALID_PARAMETERS`: "The
            header 'x-idempotency-key' is required."
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - account_id
                - merchant_order_id
                - description
                - country
                - amount
                - workflow
                - payment_method
                - customer_payer
              properties:
                account_id:
                  type: string
                  format: uuid
                  description: O id da sua conta Yuno.
                merchant_order_id:
                  type: string
                  description: O id do seu pedido (MIN 3; MAX 255).
                merchant_reference:
                  type: string
                  description: A sua referência para o pagamento (MIN 3; MAX 255).
                description:
                  type: string
                  description: Descrição do pagamento (MIN 3; MAX 255).
                country:
                  type: string
                  description: Código de país ISO 3166-1 alpha-2.
                amount:
                  type: object
                  description: >-
                    Total do pagamento. Deve ser igual à soma dos valores dos
                    dois cartões. `amount.currency_conversion` não é permitido.
                  required:
                    - currency
                    - value
                  properties:
                    currency:
                      type: string
                      description: Código de moeda ISO 4217 (3 caracteres).
                      example: BRL
                    value:
                      type: number
                      description: Valor em unidades principais (múltiplo de 0.0001).
                      example: 300
                workflow:
                  type: string
                  enum:
                    - DIRECT
                    - REDIRECT
                    - SDK_CHECKOUT
                  description: >-
                    `DIRECT` ou `REDIRECT` com `payment_method.payment_methods`,
                    ou `SDK_CHECKOUT` com `checkout.session` e o
                    `payment_method.token` composto.
                checkout:
                  type: object
                  description: Obrigatório para `SDK_CHECKOUT`.
                  properties:
                    session:
                      type: string
                      format: uuid
                      description: >-
                        A sessão de checkout para a qual o token composto foi
                        criado.
                payment_method:
                  type: object
                  properties:
                    capture:
                      type: boolean
                      default: true
                      description: >-
                        Compartilhado pelos dois cartões. `true` (padrão) cobra
                        os dois cartões; `false` os autoriza, e você captura
                        cada um depois.
                    token:
                      type: string
                      format: uuid
                      description: >-
                        Apenas `SDK_CHECKOUT`: o token de uso único composto do
                        Web SDK. Não envie `payment_methods` com ele.
                    payment_methods:
                      type: array
                      description: >-
                        Apenas `DIRECT` e `REDIRECT`: exatamente dois itens,
                        ambos `type: CARD`.
                      minItems: 2
                      maxItems: 2
                      items:
                        type: object
                        required:
                          - type
                          - amount
                        properties:
                          type:
                            type: string
                            enum:
                              - CARD
                          amount:
                            type: object
                            description: >-
                              Parte do total que este cartão paga. `value` maior
                              que 0; `currency` igual a `amount.currency`.
                            required:
                              - currency
                              - value
                            properties:
                              currency:
                                type: string
                                description: Código de moeda ISO 4217 (3 caracteres).
                                example: BRL
                              value:
                                type: number
                                description: >-
                                  Valor em unidades principais (múltiplo de
                                  0.0001).
                                example: 300
                          vaulted_token:
                            type: string
                            format: uuid
                            description: >-
                              Vaulted token de um cartão cadastrado. Envie-o ou
                              `detail.card`.
                          detail:
                            type: object
                            properties:
                              card:
                                type: object
                                description: >-
                                  Dados do cartão. Não envie `capture` aqui: use
                                  `payment_method.capture`.
                                properties:
                                  number:
                                    type: string
                                    example: '4111111111111111'
                                  expiration_month:
                                    type: integer
                                    example: 11
                                  expiration_year:
                                    type: integer
                                    example: 2029
                                  security_code:
                                    type: string
                                    example: '123'
                                  holder_name:
                                    type: string
                                    example: ANA SOUZA
                          payment_method_owner:
                            type: object
                            description: >-
                              Opcional. O titular deste cartão, quando não é o
                              pagador. Mesmos campos de `customer_payer`.
                          account_updater:
                            type: boolean
                            description: Opcional.
                          network_token:
                            type: boolean
                            description: >-
                              Opcional. Controle por cartão para [network
                              tokens](/pt-br/docs/security-and-compliance/network-tokens#choose-per-card).
                              `false` nunca usa um network token para este
                              cartão; `true` usa ou provisiona um quando o
                              cartão está no vault, mesmo quando a rota tem a
                              opção de network token desativada; omitido mantém
                              o comportamento da rota. Exige o onboarding em
                              network tokens; não tem efeito em cartões de
                              convidado.
                customer_payer:
                  type: object
                  description: >-
                    Obrigatório. O pagador, compartilhado pelos dois cartões.
                    Mesmos campos de [Criar
                    pagamento](/pt-br/reference/payments/create-payment).
                callback_url:
                  type: string
                  description: >-
                    Opcional. Para onde um desafio 3DS ou um redirecionamento
                    retorna o cliente.
                additional_data:
                  type: object
                  description: Opcional, como na v1.
                metadata:
                  type: array
                  items:
                    type: object
            examples:
              'DIRECT: two new cards':
                value:
                  account_id: 493e9374-510a-4201-9e09-de669d75f256
                  merchant_order_id: order-10045
                  description: Order paid with two cards
                  country: BR
                  amount:
                    currency: BRL
                    value: 300
                  workflow: DIRECT
                  customer_payer:
                    id: cfae0941-7234-427a-a739-ef4fce966c79
                    first_name: Ana
                    last_name: Souza
                    email: ana.souza@example.com
                    document:
                      document_type: CPF
                      document_number: '12345678909'
                  payment_method:
                    capture: true
                    payment_methods:
                      - type: CARD
                        amount:
                          currency: BRL
                          value: 200
                        detail:
                          card:
                            number: '4111111111111111'
                            expiration_month: 11
                            expiration_year: 2029
                            security_code: '123'
                            holder_name: ANA SOUZA
                      - type: CARD
                        amount:
                          currency: BRL
                          value: 100
                        detail:
                          card:
                            number: '5555555555554444'
                            expiration_month: 3
                            expiration_year: 2030
                            security_code: '456'
                            holder_name: ANA SOUZA
              'DIRECT: one vaulted card and one new card':
                value:
                  account_id: 493e9374-510a-4201-9e09-de669d75f256
                  merchant_order_id: order-10046
                  description: Order paid with two cards
                  country: BR
                  amount:
                    currency: BRL
                    value: 300
                  workflow: DIRECT
                  customer_payer:
                    id: cfae0941-7234-427a-a739-ef4fce966c79
                  payment_method:
                    capture: false
                    payment_methods:
                      - type: CARD
                        amount:
                          currency: BRL
                          value: 120
                        vaulted_token: aad8578e-ac2f-40a0-8065-25b5957f6555
                      - type: CARD
                        amount:
                          currency: BRL
                          value: 180
                        detail:
                          card:
                            number: '4111111111111111'
                            expiration_month: 11
                            expiration_year: 2029
                            security_code: '123'
                            holder_name: JOAO SOUZA
                        payment_method_owner:
                          first_name: Joao
                          last_name: Souza
                          email: joao.souza@example.com
              'SDK_CHECKOUT: composite token':
                value:
                  account_id: 493e9374-510a-4201-9e09-de669d75f256
                  merchant_order_id: order-10047
                  description: Order paid with two cards
                  country: BR
                  amount:
                    currency: BRL
                    value: 300
                  workflow: SDK_CHECKOUT
                  checkout:
                    session: eec6578e-ac2f-40a0-8065-25b5957f6dd3
                  customer_payer:
                    id: cfae0941-7234-427a-a739-ef4fce966c79
                  payment_method:
                    token: ee78bc2a-63b4-45bb-bd28-3e6829ab1c3d
                    capture: true
                  callback_url: https://merchant.example.com/checkout/return
      responses:
        '201':
          description: >-
            Pagamento criado. Leia `status` e `sub_status` e, em seguida, as
            `transactions` de cada cartão.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaymentV2'
              examples:
                Both cards charged:
                  value:
                    id: 7c1b6e2a-5f3d-4a8e-9b21-3e4f5a6b7c8d
                    account_id: 493e9374-510a-4201-9e09-de669d75f256
                    description: Order paid with two cards
                    country: BR
                    status: SUCCEEDED
                    sub_status: APPROVED
                    merchant_order_id: order-10045
                    created_at: '2026-10-27T14:02:11.120Z'
                    updated_at: '2026-10-27T14:02:12.300Z'
                    split_payment_methods: true
                    payment_methods_count: 2
                    sdk_action_required: false
                    amount:
                      currency: BRL
                      value: 300
                    checkout:
                      session: null
                    payment_method:
                      capture: true
                      account_updater: false
                      payment_methods:
                        - sequence: 1
                          type: CARD
                          amount:
                            currency: BRL
                            value: 200
                          transactions:
                            - id: d2a4f6b8-1c3e-4a5b-8d7f-9e0a1b2c3d4e
                              type: PURCHASE
                              status: SUCCEEDED
                              category: CARD
                              amount: 200
                              provider_id: YUNO_TEST_PAYMENT_GATEWAY
                              response_code: SUCCEEDED
                              response_message: Transaction successful
                              reason: null
                              description: null
                              merchant_reference: null
                              three_d_secure_action_required: false
                              created_at: '2026-10-27T14:02:11.402Z'
                              updated_at: '2026-10-27T14:02:12.118Z'
                        - sequence: 2
                          type: CARD
                          amount:
                            currency: BRL
                            value: 100
                          transactions:
                            - id: e3b5a7c9-2d4f-4b6c-9e8a-0f1b2c3d4e5f
                              type: PURCHASE
                              status: SUCCEEDED
                              category: CARD
                              amount: 100
                              provider_id: YUNO_TEST_PAYMENT_GATEWAY
                              response_code: SUCCEEDED
                              response_message: Transaction successful
                              reason: null
                              description: null
                              merchant_reference: null
                              three_d_secure_action_required: false
                              created_at: '2026-10-27T14:02:11.402Z'
                              updated_at: '2026-10-27T14:02:12.118Z'
                    customer_payer:
                      id: cfae0941-7234-427a-a739-ef4fce966c79
                      first_name: Ana
                      last_name: Souza
                      email: ana.souza@example.com
                    workflow: DIRECT
                    callback_url: https://merchant.example.com/checkout/return
                    metadata: []
                Both cards authorized (capture false):
                  value:
                    id: 7c1b6e2a-5f3d-4a8e-9b21-3e4f5a6b7c8d
                    account_id: 493e9374-510a-4201-9e09-de669d75f256
                    description: Order paid with two cards
                    country: BR
                    status: PENDING
                    sub_status: AUTHORIZED
                    merchant_order_id: order-10045
                    created_at: '2026-10-27T14:02:11.120Z'
                    updated_at: '2026-10-27T14:02:12.300Z'
                    split_payment_methods: true
                    payment_methods_count: 2
                    sdk_action_required: false
                    amount:
                      currency: BRL
                      value: 300
                    checkout:
                      session: null
                    payment_method:
                      capture: false
                      account_updater: false
                      payment_methods:
                        - sequence: 1
                          type: CARD
                          amount:
                            currency: BRL
                            value: 200
                          transactions:
                            - id: d2a4f6b8-1c3e-4a5b-8d7f-9e0a1b2c3d4e
                              type: AUTHORIZE
                              status: SUCCEEDED
                              category: CARD
                              amount: 200
                              provider_id: YUNO_TEST_PAYMENT_GATEWAY
                              response_code: SUCCEEDED
                              response_message: Transaction successful
                              reason: null
                              description: null
                              merchant_reference: null
                              three_d_secure_action_required: false
                              created_at: '2026-10-27T14:02:11.402Z'
                              updated_at: '2026-10-27T14:02:12.118Z'
                        - sequence: 2
                          type: CARD
                          amount:
                            currency: BRL
                            value: 100
                          transactions:
                            - id: e3b5a7c9-2d4f-4b6c-9e8a-0f1b2c3d4e5f
                              type: AUTHORIZE
                              status: SUCCEEDED
                              category: CARD
                              amount: 100
                              provider_id: YUNO_TEST_PAYMENT_GATEWAY
                              response_code: SUCCEEDED
                              response_message: Transaction successful
                              reason: null
                              description: null
                              merchant_reference: null
                              three_d_secure_action_required: false
                              created_at: '2026-10-27T14:02:11.402Z'
                              updated_at: '2026-10-27T14:02:12.118Z'
                    customer_payer:
                      id: cfae0941-7234-427a-a739-ef4fce966c79
                      first_name: Ana
                      last_name: Souza
                      email: ana.souza@example.com
                    workflow: DIRECT
                    callback_url: https://merchant.example.com/checkout/return
                    metadata: []
                One card declined, the other refunded:
                  value:
                    id: 7c1b6e2a-5f3d-4a8e-9b21-3e4f5a6b7c8d
                    account_id: 493e9374-510a-4201-9e09-de669d75f256
                    description: Order paid with two cards
                    country: BR
                    status: DECLINED
                    sub_status: DECLINED
                    merchant_order_id: order-10045
                    created_at: '2026-10-27T14:02:11.120Z'
                    updated_at: '2026-10-27T14:02:12.300Z'
                    split_payment_methods: true
                    payment_methods_count: 2
                    sdk_action_required: false
                    amount:
                      currency: BRL
                      value: 300
                    checkout:
                      session: null
                    payment_method:
                      capture: true
                      account_updater: false
                      payment_methods:
                        - sequence: 1
                          type: CARD
                          amount:
                            currency: BRL
                            value: 200
                          transactions:
                            - id: d2a4f6b8-1c3e-4a5b-8d7f-9e0a1b2c3d4e
                              type: PURCHASE
                              status: SUCCEEDED
                              category: CARD
                              amount: 200
                              provider_id: YUNO_TEST_PAYMENT_GATEWAY
                              response_code: SUCCEEDED
                              response_message: Transaction successful
                              reason: null
                              description: null
                              merchant_reference: null
                              three_d_secure_action_required: false
                              created_at: '2026-10-27T14:02:11.402Z'
                              updated_at: '2026-10-27T14:02:12.118Z'
                            - id: f4c6b8d0-3e5a-4c7d-8f9b-1a2b3c4d5e6f
                              type: REFUND
                              status: SUCCEEDED
                              category: CARD
                              amount: 200
                              provider_id: YUNO_TEST_PAYMENT_GATEWAY
                              response_code: SUCCEEDED
                              response_message: Transaction successful
                              reason: null
                              description: null
                              merchant_reference: null
                              three_d_secure_action_required: false
                              created_at: '2026-10-27T14:02:11.402Z'
                              updated_at: '2026-10-27T14:02:12.118Z'
                        - sequence: 2
                          type: CARD
                          amount:
                            currency: BRL
                            value: 100
                          transactions:
                            - id: e3b5a7c9-2d4f-4b6c-9e8a-0f1b2c3d4e5f
                              type: PURCHASE
                              status: DECLINED
                              category: CARD
                              amount: 100
                              provider_id: YUNO_TEST_PAYMENT_GATEWAY
                              response_code: DECLINED_BY_ISSUER
                              response_message: Declined by issuer
                              reason: null
                              description: null
                              merchant_reference: null
                              three_d_secure_action_required: false
                              created_at: '2026-10-27T14:02:11.402Z'
                              updated_at: '2026-10-27T14:02:12.118Z'
                    customer_payer:
                      id: cfae0941-7234-427a-a739-ef4fce966c79
                      first_name: Ana
                      last_name: Souza
                      email: ana.souza@example.com
                    workflow: DIRECT
                    callback_url: https://merchant.example.com/checkout/return
                    metadata: []
        '400':
          description: Requisição inválida
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  messages:
                    type: array
                    items:
                      type: string
              examples:
                Missing idempotency key:
                  value:
                    code: INVALID_PARAMETERS
                    messages:
                      - The header 'x-idempotency-key' is required.
                Workflow not allowed:
                  value:
                    code: INVALID_PARAMETERS
                    messages:
                      - >-
                        The field 'workflow' has an invalid value for
                        /v2/payments, the allowed values are: 'DIRECT',
                        'REDIRECT', 'SDK_CHECKOUT'.
                SDK_CHECKOUT without session or token:
                  value:
                    code: INVALID_PARAMETERS
                    messages:
                      - >-
                        The field 'checkout.session' is required for the
                        SDK_CHECKOUT workflow.
                      - >-
                        The field 'payment_method.token' is required for the
                        SDK_CHECKOUT workflow.
                SDK_CHECKOUT token is not a UUID:
                  value:
                    code: INVALID_PARAMETERS
                    messages:
                      - The field 'payment_method.token' must be a valid UUID.
                payment_methods with SDK_CHECKOUT:
                  value:
                    code: INVALID_PARAMETERS
                    messages:
                      - >-
                        The field 'payment_method.payment_methods' is not
                        allowed for the SDK_CHECKOUT workflow, the one-time
                        token carries the payment methods.
                token with DIRECT:
                  value:
                    code: INVALID_PARAMETERS
                    messages:
                      - >-
                        The field 'payment_method.token' is only allowed for the
                        SDK_CHECKOUT workflow, not for DIRECT.
                Field not allowed with two methods:
                  value:
                    code: INVALID_PARAMETERS
                    messages:
                      - >-
                        The field 'split_marketplace' is not allowed with more
                        than one payment method.
                      - >-
                        The field 'external_subscription' is not allowed with
                        more than one payment method.
                      - >-
                        The field 'amount.currency_conversion' is not allowed
                        with more than one payment method.
                Capture per card:
                  value:
                    code: INVALID_PARAMETERS
                    messages:
                      - >-
                        The field
                        'payment_method.payment_methods[0].detail.card.capture'
                        is not allowed, use 'payment_method.capture' for every
                        payment method.
                Invalid card item:
                  value:
                    code: INVALID_PARAMETERS
                    messages:
                      - >-
                        The field 'payment_method.payment_methods[1].type' must
                        be 'CARD'.
                      - >-
                        The field
                        'payment_method.payment_methods[0].amount.value' must be
                        greater than 0.
                      - >-
                        The field
                        'payment_method.payment_methods[1].amount.currency' must
                        match 'amount.currency'.
                Amounts do not add up:
                  value:
                    code: INVALID_PARAMETERS
                    messages:
                      - >-
                        The sum of
                        'payment_method.payment_methods[].amount.value' must
                        equal 'amount.value'.
        '401':
          description: Credenciais inválidas
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  messages:
                    type: array
                    items:
                      type: string
              example:
                code: INVALID_CREDENTIALS
                messages:
                  - Invalid credentials
        '403':
          description: >-
            Os pagamentos com dois cartões não estão habilitados para a
            organização (apenas em produção)
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  messages:
                    type: array
                    items:
                      type: string
              example:
                code: PRODUCT_NOT_ENABLED
                messages:
                  - >-
                    Payments with more than one payment method are enabled per
                    account. Contact your Key Account Manager (KAM) to activate
                    it.
components:
  schemas:
    PaymentV2:
      type: object
      description: Um pagamento financiado por dois cartões.
      properties:
        id:
          type: string
          format: uuid
        account_id:
          type: string
          format: uuid
        description:
          type: string
        country:
          type: string
        status:
          type: string
          description: >-
            Status agregado do pagamento. Veja [Pagar com dois
            cartões](/pt-br/docs/payment-features/pay-with-two-cards#statuses).
        sub_status:
          type: string
          description: >-
            Substatus agregado, por exemplo, `APPROVED`, `AUTHORIZED`,
            `PARTIALLY_CAPTURED`, `PARTIALLY_REFUNDED`,
            `REFUND_RETRY_IN_PROCESS` ou `CANCEL_RETRY_IN_PROCESS`.
        merchant_order_id:
          type: string
        merchant_reference:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        split_payment_methods:
          type: boolean
          description: '`true` para um pagamento financiado por dois cartões.'
        payment_methods_count:
          type: integer
          description: 'Número de cartões que financiam o pagamento: `2`.'
        sdk_action_required:
          type: boolean
          description: >-
            `true` quando o SDK precisa continuar o pagamento, por exemplo, para
            executar um desafio 3DS.
        amount:
          type: object
          description: Total do pagamento.
          required:
            - currency
            - value
          properties:
            currency:
              type: string
              description: Código de moeda ISO 4217 (3 caracteres).
              example: BRL
            value:
              type: number
              description: Valor em unidades principais (múltiplo de 0.0001).
              example: 300
        checkout:
          type: object
          properties:
            session:
              type:
                - string
                - 'null'
        payment_method:
          type: object
          properties:
            capture:
              type: boolean
              description: Configuração de captura compartilhada pelos dois cartões.
            account_updater:
              type:
                - boolean
                - 'null'
            payment_methods:
              type: array
              description: >-
                Uma entrada por cartão. Não há status por cartão: leia o
                resultado de cada cartão nas suas `transactions`.
              minItems: 2
              maxItems: 2
              items:
                type: object
                properties:
                  sequence:
                    type: integer
                    description: 'Posição do cartão: `1` ou `2`.'
                  type:
                    type: string
                    enum:
                      - CARD
                  amount:
                    type: object
                    description: Parte do total que este cartão paga.
                    required:
                      - currency
                      - value
                    properties:
                      currency:
                        type: string
                        description: Código de moeda ISO 4217 (3 caracteres).
                        example: BRL
                      value:
                        type: number
                        description: Valor em unidades principais (múltiplo de 0.0001).
                        example: 300
                  payment_method_detail:
                    type: object
                    description: Detalhes do cartão, como no objeto de pagamento v1.
                  payment_method_owner:
                    type: object
                    description: Titular do cartão, quando enviado na requisição.
                  transactions:
                    type: array
                    description: >-
                      Transações deste cartão. Um cartão que passou pelo 3DS
                      mostra `THREE_D_SECURE` seguido de `PURCHASE` ou
                      `AUTHORIZE`.
                    items:
                      type: object
                      description: >-
                        Uma transação do cartão. Leia o resultado do cartão nas
                        suas transações.
                      properties:
                        id:
                          type: string
                          format: uuid
                          description: Id da transação. Use-o nas operações por transação.
                        type:
                          type: string
                          description: >-
                            Tipo de transação, por exemplo, `THREE_D_SECURE`,
                            `PURCHASE`, `AUTHORIZE`, `CAPTURE`, `CANCEL` ou
                            `REFUND`.
                        status:
                          type: string
                          description: >-
                            Status desta transação, por exemplo, `SUCCEEDED`,
                            `DECLINED`, `PENDING` ou `ERROR`.
                        category:
                          type: string
                          example: CARD
                        amount:
                          type: number
                          description: Valor desta transação.
                        provider_id:
                          type: string
                          description: Provedor que processou a transação.
                        response_code:
                          type: string
                          description: Código de resposta da Yuno para a transação.
                        response_message:
                          type: string
                        reason:
                          type:
                            - string
                            - 'null'
                        description:
                          type:
                            - string
                            - 'null'
                        merchant_reference:
                          type:
                            - string
                            - 'null'
                        three_d_secure_action_required:
                          type:
                            - boolean
                            - 'null'
                        created_at:
                          type: string
                          format: date-time
                        updated_at:
                          type:
                            - string
                            - 'null'
                          format: date-time
        customer_payer:
          type: object
          description: O pagador, conforme enviado na requisição.
        additional_data:
          type:
            - object
            - 'null'
        callback_url:
          type: string
        workflow:
          type: string
          enum:
            - DIRECT
            - REDIRECT
            - SDK_CHECKOUT
        metadata:
          type: array
          items:
            type: object
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: public-api-key
      x-default: <Your public-api-key>
    sec1:
      type: apiKey
      in: header
      name: private-secret-key
      x-default: <Your private-secret-key>

````

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