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

# Revertir una transferencia independiente

> Revierte total o parcialmente una transferencia independiente de plataforma a destinatario

Revierte total o parcialmente una transferencia `PLATFORM_TO_RECIPIENT`, según su estado y el monto reversible restante.

Una transferencia principal `RECIPIENT_TO_PLATFORM` no se puede revertir: tanto las solicitudes de reversión total como parcial devuelven `400 INVALID_PARAMETERS`. Para devolver una comisión cobrada por separado, [crea una nueva transferencia](https://docs.y.uno/es/reference/transfers/create-standalone-transfer.md) con `direction: PLATFORM_TO_RECIPIENT`.

La respuesta HTTP de la reversión describe la transferencia principal después de la reversión y no incluye `direction`. Usa [GET](https://docs.y.uno/es/reference/transfers/get-standalone-transfer.md) para leer la dirección sin cambios de la transferencia principal. La notificación de la reversión incluye la dirección `PLATFORM_TO_RECIPIENT` de la transferencia principal.


## OpenAPI

````yaml openapi/es/transfers/reverse-standalone-transfer.json POST /split-marketplace/transfers/{transfer_id}/reverse
openapi: 3.1.0
info:
  title: Transfer Flow API
  version: 1.0.0
  description: >-
    API for managing standalone forward and reverse transfers within the
    Marketplace.
servers:
  - url: https://api-sandbox.y.uno/v1
    description: Sandbox
  - url: https://api.y.uno/v1
    description: Production (US)
security:
  - public_api_key: []
    private_secret_key: []
paths:
  /split-marketplace/transfers/{transfer_id}/reverse:
    post:
      tags:
        - Transfers
      summary: Reverse Standalone Transfer
      description: >-
        Revierte total o parcialmente una transferencia PLATFORM_TO_RECIPIENT.
        Un padre RECIPIENT_TO_PLATFORM devuelve 400 INVALID_PARAMETERS. Para
        devolver una comisión cobrada por separado, crea una nueva transferencia
        PLATFORM_TO_RECIPIENT. La respuesta HTTP de la reversión no incluye
        direction; consulta la transferencia padre para obtenerlo.
      operationId: reverse-standalone-transfer
      parameters:
        - name: transfer_id
          in: path
          required: true
          schema:
            type: string
          description: El ID único del flujo de transferencia que se revertirá.
        - name: X-Idempotency-Key
          in: header
          required: true
          schema:
            type: string
          description: Clave única para la idempotencia de la solicitud.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - account_id
                - reason
              properties:
                account_id:
                  type: string
                  description: El identificador único de la cuenta.
                amount:
                  $ref: '#/components/schemas/Amount'
                reason:
                  type: string
                  description: >-
                    El motivo de la reversión. Obligatorio: la API devuelve 400
                    INVALID_PARAMETERS ("The field 'reason' is required.")
                    cuando falta.
                description:
                  type: string
                  description: Una descripción legible de la reversión.
                merchant_reference:
                  type: string
                  description: >-
                    Identificador único del comercio para dar seguimiento a esta
                    reversión.
            examples:
              Reverse a transfer:
                value:
                  account_id: '{{account-code}}'
                  reason: Order cancelled by the customer
                  description: Reversal of transfer
                  merchant_reference: MR-REVERSAL-001
      responses:
        '201':
          description: Reversión procesada
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReverseTransfer'
              examples:
                PartialReversal:
                  summary: Parent after a partial reversal
                  value:
                    id: 550e8400-e29b-41d4-a716-446655440000
                    recipient_id: d246d578-266c-47c3-92b6-1748d780711b
                    amount:
                      currency: USD
                      value: 1
                    status: REVERSED_PARTIAL
                    reason: ORDER_CANCELLED
                    description: Partial reversal
                    merchant_reference: REVERSAL-001
                    provider_data:
                      id: STRIPE
                      recipient_id: acct_example
                      transaction_id: trr_example
                      response_code: ''
                      response_message: ''
                    transactions:
                      - code: cb5fd244-90fd-49b0-a160-a9d9f764eb9e
                        type: SPLIT_TRANSFER
                        status: SUCCEEDED
                        provider_transfer_id: tr_example
                        created_at: '2026-09-15T10:00:00Z'
                        updated_at: '2026-09-15T10:00:00Z'
                      - code: 0e5b4d60-4811-4a48-90c1-398d28dbce8c
                        type: SPLIT_TRANSFER_REVERSE
                        status: SUCCEEDED
                        parent_transaction_code: cb5fd244-90fd-49b0-a160-a9d9f764eb9e
                        provider_transfer_id: trr_example
                        reason: ORDER_CANCELLED
                        created_at: '2026-09-15T10:05:00Z'
                        updated_at: '2026-09-15T10:05:00Z'
                    created_at: '2026-09-15T10:00:00Z'
                    updated_at: '2026-09-15T10:05:00Z'
        '400':
          description: Solicitud incorrecta
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  messages:
                    type: array
                    items:
                      type: string
              examples:
                TRANSFER_NOT_REVERSIBLE:
                  summary: Transfer not reversible
                  value:
                    code: TRANSFER_NOT_REVERSIBLE
                    messages:
                      - The transfer is not in a reversible state.
                TRANSFER_ALREADY_REVERSED:
                  summary: Transfer already reversed
                  value:
                    code: TRANSFER_ALREADY_REVERSED
                    messages:
                      - The transfer has already been reversed.
                REVERSAL_AMOUNT_EXCEEDS:
                  summary: Reversal amount exceeds original
                  value:
                    code: REVERSAL_AMOUNT_EXCEEDS
                    messages:
                      - >-
                        The reversal amount exceeds the original transfer
                        amount.
                INVALID_CURRENCY:
                  summary: Invalid currency
                  value:
                    code: INVALID_CURRENCY
                    messages:
                      - >-
                        The specified currency is invalid or does not match the
                        original transfer.
                DIRECTION_NOT_REVERSIBLE:
                  summary: Recipient-to-platform transfers cannot be reversed
                  description: Match on code. The message text can differ between releases.
                  value:
                    code: INVALID_PARAMETERS
                    messages:
                      - Invalid transfer parameters
        '404':
          description: No encontrado
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  messages:
                    type: array
                    items:
                      type: string
              examples:
                TRANSFER_NOT_FOUND:
                  summary: Transfer not found
                  value:
                    code: TRANSFER_NOT_FOUND
                    messages:
                      - The specified transfer was not found.
        '502':
          description: Bad Gateway
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  messages:
                    type: array
                    items:
                      type: string
              examples:
                PROVIDER_INTERNAL_ERROR:
                  summary: Provider internal error
                  value:
                    code: PROVIDER_INTERNAL_ERROR
                    messages:
                      - The payment provider encountered an internal error.
components:
  schemas:
    Amount:
      type: object
      required:
        - value
        - currency
      properties:
        value:
          type: number
          example: 150
        currency:
          type: string
          example: USD
    ReverseTransfer:
      type: object
      properties:
        id:
          type: string
          example: 550e8400-e29b-41d4-a716-446655440000
        recipient_id: 3a164b50-a5e0-4006-8621-d5d5f0b1bbe7
        amount: 634b5038-3933-4552-bed3-0113ff874afa
        status:
          type: string
          example: REVERSED_PARTIAL
        reason: 622d580b-be9e-4ce6-bc22-2c91f067058a
        description: a610749e-05d9-4529-a342-9430cfaf9522
        merchant_reference: 91ad1def-6bf3-48e2-9c70-70953b0f6cfb
        provider_data:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
            recipient_id:
              type: string
            transaction_id:
              type: string
            response_code:
              type: string
            response_message:
              type: string
        created_at: 2991c1f4-0833-4473-ad6d-0b82831dd80b
        updated_at: 204b72a7-600c-43b8-9e9a-f1c0c2796e1c
        transactions: fe2cc929-6a29-4689-95f3-22947c2bf483
      description: >-
        La transferencia padre después de una reversión. La dirección está
        disponible mediante GET, no en esta respuesta.
  securitySchemes:
    public_api_key:
      type: apiKey
      in: header
      name: PUBLIC-API-KEY
    private_secret_key:
      type: apiKey
      in: header
      name: PRIVATE-SECRET-KEY

````

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