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

# Annuler un transfert autonome

> Annule totalement ou partiellement un transfert autonome de la plateforme vers le bénéficiaire

Annulez totalement ou partiellement un transfert `PLATFORM_TO_RECIPIENT`, selon son statut et le montant annulable restant.

Un transfert parent `RECIPIENT_TO_PLATFORM` ne peut pas être annulé : les requêtes d'annulation totale et partielle renvoient toutes deux `400 INVALID_PARAMETERS`. Pour restituer des frais perçus séparément, [créez un nouveau transfert](https://docs.y.uno/fr/reference/transfers/create-standalone-transfer.md) avec `direction: PLATFORM_TO_RECIPIENT`.

La réponse HTTP de l'annulation décrit le parent après l'annulation et n'inclut pas `direction`. Utilisez [GET](https://docs.y.uno/fr/reference/transfers/get-standalone-transfer.md) pour lire la direction inchangée du parent. La notification d'annulation inclut la direction `PLATFORM_TO_RECIPIENT` du parent.


## OpenAPI

````yaml openapi/fr/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: >-
        Annule totalement ou partiellement un transfert PLATFORM_TO_RECIPIENT.
        Un parent RECIPIENT_TO_PLATFORM renvoie 400 INVALID_PARAMETERS. Pour
        restituer des frais collectés séparément, créez un nouveau transfert
        PLATFORM_TO_RECIPIENT. La réponse HTTP de l'annulation n'inclut pas le
        sens ; lisez le transfert parent pour le récupérer.
      operationId: reverse-standalone-transfer
      parameters:
        - name: transfer_id
          in: path
          required: true
          schema:
            type: string
          description: L'ID unique du flux de transfert à annuler.
        - name: X-Idempotency-Key
          in: header
          required: true
          schema:
            type: string
          description: Clé unique pour l'idempotence de la requête.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - account_id
                - reason
              properties:
                account_id:
                  type: string
                  description: L'identifiant unique du compte.
                amount:
                  $ref: '#/components/schemas/Amount'
                reason:
                  type: string
                  description: >-
                    Le motif de l'annulation. Obligatoire : l'API renvoie 400
                    INVALID_PARAMETERS ("The field 'reason' is required.")
                    lorsqu'il est absent.
                description:
                  type: string
                  description: Une description lisible de l'annulation.
                merchant_reference:
                  type: string
                  description: >-
                    Identifiant unique du commerçant pour le suivi de cette
                    annulation.
            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: Annulation traitée
          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: Requête incorrecte
          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: Introuvable
          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: a5658a52-f273-4852-8cc3-72c2e8ae3c4e
        amount: 3735b101-7823-4cb0-8e1f-56dd5d8b017f
        status:
          type: string
          example: REVERSED_PARTIAL
        reason: 8b6c3753-1968-430e-be7e-29a0107ae5a3
        description: c2064b83-abdb-4a78-84ae-93c5fdd48e18
        merchant_reference: 0986895b-43a8-46e6-a675-bdf5f96e9698
        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: b0254ca1-8ee5-4df2-806f-b3249a995c62
        updated_at: 9c90e815-1a76-4e1a-9be2-30bd0b100f63
        transactions: dfcf9879-6e87-4595-a63b-b2a5f37fae5e
      description: >-
        Le transfert parent après une annulation. Le sens est disponible via
        GET, pas dans cette réponse.
  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.