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

> Cancela el onboarding de un destinatario antes de que se complete con un proveedor

Cancela un onboarding de un destinatario.

Un onboarding en estado `SUCCEEDED`, `BLOCKED`, `CANCELLED`, `INACTIVE`, `TRANSFERRED` o `TERMINATED` no se puede cancelar, y la API devuelve `400 INVALID_STATE`. Un onboarding cancelado es definitivo. Para volver a hacer el onboarding del destinatario con el proveedor, crea un nuevo onboarding.


## OpenAPI

````yaml openapi/es/recipients-for-marketplace/cancel-recipient.json POST /recipients/{recipient_id}/onboardings/{onboarding_id}/cancel
openapi: 3.1.0
info:
  title: Recipients API
  version: 1.0.0
  description: >-
    API for managing recipients in split payment scenarios. This feature enables
    merchants to split payments among multiple recipients, which is particularly
    beneficial for marketplace models where transactions need to be divided
    among different sellers or stakeholders.
servers:
  - url: https://api-sandbox.y.uno/v1
    description: Sandbox
  - url: https://api.y.uno/v1
    description: Production (US)
security:
  - sec0: []
    sec1: []
paths:
  /recipients/{recipient_id}/onboardings/{onboarding_id}/cancel:
    parameters:
      - name: recipient_id
        in: path
        required: true
        description: El identificador único del destinatario
        schema:
          type: string
      - name: onboarding_id
        in: path
        required: true
        description: El identificador único del onboarding asociado a esta acción.
        schema:
          type: string
    post:
      summary: Cancelar onboarding
      operationId: cancel-recipient
      responses:
        '200':
          description: Onboarding cancelado correctamente
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OnboardingResponse'
              examples:
                Success Response:
                  value:
                    id: 61df26d9-3750-4206-baab-f2e20683f35b
                    type: ONE_STEP_ONBOARDING
                    workflow: DIRECT
                    status: CANCELLED
                    callback_url: https://merchant.example.com/webhook/onboarding
                    provider:
                      id: STRIPE
                      connection_id: 8fee3cc6-f3cb-455d-b139-973866111a03
                      recipient_id: null
                      redirect_url: null
                      onboarding_url: null
                      legal_entity: null
                    documentation:
                      - file_name: recipient.pdf
                        content_type: application/pdf
                        content_category: IDENTIFICATION_DOCUMENT
                        content: recipient.pdf-20ac42c2-ef01-4a0c-80dd-0f9f71c9cde7
                    legal_representatives:
                      - merchant_reference: ONB_001
                        first_name: Tatiana
                        last_name: González
                        email: tatiana.gonzalez@example.com
                        date_of_birth: '1985-05-20'
                        country: BR
                        nationality: BR
                        title: CEO
                        publicly_exposed_person: false
                        ultimate_beneficial_owner: true
                        document:
                          document_type: CC
                          document_number: '0987654321'
                        phone:
                          number: '3109876543'
                          country_code: '+57'
                        address:
                          address_line_1: 'Calle 26 # 13-19'
                          address_line_2: null
                          country: CO
                          state: Cundinamarca
                          city: Bogotá
                          zip_code: '110311'
                    requirements: []
                    withdrawal_methods:
                      bank:
                        code: '003'
                        branch: '003'
                        branch_digit: null
                        account: '9876543210'
                        account_digit: null
                        account_type: CHECKINGS
                        routing: '021000022'
                        country: US
                        currency: USD
                    terms_of_service:
                      acceptance: true
                      date: '2025-07-21T20:43:54.786342Z'
                      ip: 129.21.111.11
                    recipient:
                      id: 5a37f0c0-7689-4065-8348-4b5ff5bf9cc7
                      account_id: c24d6c92-99a7-40bb-bc7b-efc40337f9f4
                      merchant_recipient_id: MERCHANT_85ac5f5d-a169-46b3-bd87-80c0df2e6591
                      national_entity: INDIVIDUAL
                      entity_type: PRIVATE
                      first_name: Stebann
                      last_name: Castro
                      legal_name: Steban Castro
                      email: juan.perez@example.com
                      date_of_birth: '1992-01-21'
                      country: CO
                      website: https://juanperez.com
                      industry: Technology
                      merchant_category_code: '5740'
                      document:
                        document_number: '09082160000100'
                        document_type: CNPJ
                      phone:
                        country_code: '57'
                        number: '3001234567'
                      address:
                        address_line_1: 'Carrera 7 # 32-16'
                        address_line_2: Oficina 201
                        city: Bogotá
                        country: CO
                        state: Cundinamarca
                        zip_code: '110311'
                        neighborhood: Centro
                      legal_representatives:
                        - merchant_reference: REP_001
                          first_name: María
                          last_name: González
                          email: maria.gonzalez@example.com
                          date_of_birth: '1985-05-20'
                          country: CO
                          nationality: CO
                          title: CEO
                          publicly_exposed_person: false
                          ultimate_beneficial_owner: true
                          document:
                            document_type: CC
                            document_number: '0987654321'
                          phone:
                            number: '3109876543'
                            country_code: '+57'
                          address:
                            address_line_1: 'Calle 26 # 13-19'
                            address_line_2: null
                            country: CO
                            state: Cundinamarca
                            city: Bogotá
                            zip_code: '110311'
                      withdrawal_methods:
                        bank:
                          code: '001'
                          branch: '004'
                          branch_digit: '123'
                          account: '1234567890'
                          account_digit: '123'
                          account_type: SAVINGS
                          routing: '021000021'
                          country: CO
                          currency: COP
                      documentation:
                        - file_name: recipient.pdf
                          content_type: application/pdf
                          content_category: IDENTIFICATION_DOCUMENT
                          content: recipient.pdf-2bf73b44-33e3-49c7-b777-34a5178cfb45
                      created_at: '2025-08-22T17:54:05.711545Z'
                      updated_at: '2025-08-22T17:54:05.711561Z'
                    history:
                      id: 61df26d9-3750-4206-baab-f2e20683f35b
                      type: ONE_STEP_ONBOARDING
                      workflow: DIRECT
                      status: CANCELLED
                      callback_url: https://merchant.example.com/webhook/onboarding
                      provider:
                        id: STRIPE
                        connection_id: 8fee3cc6-f3cb-455d-b139-973866111a03
                        recipient_id: null
                        redirect_url: null
                      documentation:
                        - file_name: recipient.pdf
                          content_type: application/pdf
                          content_category: IDENTIFICATION_DOCUMENT
                          content: recipient.pdf-20ac42c2-ef01-4a0c-80dd-0f9f71c9cde7
                      legal_representatives:
                        - merchant_reference: ONB_001
                          first_name: Tatiana
                          last_name: González
                          email: tatiana.gonzalez@example.com
                          date_of_birth: '1985-05-20'
                          country: BR
                          nationality: BR
                          title: CEO
                          publicly_exposed_person: false
                          ultimate_beneficial_owner: true
                          document:
                            document_type: CC
                            document_number: '0987654321'
                          phone:
                            number: '3109876543'
                            country_code: '+57'
                          address:
                            address_line_1: 'Calle 26 # 13-19'
                            address_line_2: null
                            country: CO
                            state: Cundinamarca
                            city: Bogotá
                            zip_code: '110311'
                      requirements: []
                      withdrawal_methods:
                        bank:
                          code: '003'
                          branch: '003'
                          branch_digit: null
                          account: '9876543210'
                          account_digit: null
                          account_type: CHECKINGS
                          routing: '021000022'
                          country: US
                          currency: USD
                      terms_of_service:
                        acceptance: true
                        date: '2025-07-21T20:43:54.786342Z'
                        ip: 129.21.111.11
                      recipient:
                        id: 5a37f0c0-7689-4065-8348-4b5ff5bf9cc7
                        account_id: c24d6c92-99a7-40bb-bc7b-efc40337f9f4
                        merchant_recipient_id: MERCHANT_85ac5f5d-a169-46b3-bd87-80c0df2e6591
                        national_entity: INDIVIDUAL
                        entity_type: PRIVATE
                        first_name: Stebann
                        last_name: Castro
                        legal_name: Steban Castro
                        email: juan.perez@example.com
                        date_of_birth: '1992-01-21'
                        country: CO
                        website: https://juanperez.com
                        industry: Technology
                        merchant_category_code: '5740'
                        document:
                          document_number: '09082160000100'
                          document_type: CNPJ
                        phone:
                          country_code: '57'
                          number: '3001234567'
                        address:
                          address_line_1: 'Carrera 7 # 32-16'
                          address_line_2: Oficina 201
                          city: Bogotá
                          country: CO
                          state: Cundinamarca
                          zip_code: '110311'
                          neighborhood: Centro
                        legal_representatives:
                          - merchant_reference: REP_001
                            first_name: María
                            last_name: González
                            email: maria.gonzalez@example.com
                            date_of_birth: '1985-05-20'
                            country: CO
                            nationality: CO
                            title: CEO
                            publicly_exposed_person: false
                            ultimate_beneficial_owner: true
                            document:
                              document_type: CC
                              document_number: '0987654321'
                            phone:
                              number: '3109876543'
                              country_code: '+57'
                            address:
                              address_line_1: 'Calle 26 # 13-19'
                              address_line_2: null
                              country: CO
                              state: Cundinamarca
                              city: Bogotá
                              zip_code: '110311'
                        withdrawal_methods:
                          bank:
                            code: '001'
                            branch: '004'
                            branch_digit: '123'
                            account: '1234567890'
                            account_digit: '123'
                            account_type: SAVINGS
                            routing: '021000021'
                            country: CO
                            currency: COP
                        documentation:
                          - file_name: recipient.pdf
                            content_type: application/pdf
                            content_category: IDENTIFICATION_DOCUMENT
                            content: recipient.pdf-2bf73b44-33e3-49c7-b777-34a5178cfb45
                        created_at: '2025-08-22T17:54:05.711545Z'
                        updated_at: '2025-08-22T17:54:05.711561Z'
                      created_at: '2025-08-22T17:57:58.460711Z'
                      updated_at: '2025-08-22T17:57:58.460724Z'
                    created_at: '2025-08-22T17:57:58.460711Z'
                    updated_at: '2025-08-22T17:57:58.460724Z'
        '400':
          description: >-
            Solicitud incorrecta. El onboarding está en un estado que no se
            puede cancelar.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Invalid state:
                  value:
                    code: INVALID_STATE
                    messages:
                      - >-
                        The onboarding state does not support the action
                        requested.
        '401':
          description: No autorizado
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Unauthorized:
                  value:
                    code: INVALID_CREDENTIALS
                    messages:
                      - Invalid credentials
        '403':
          description: Prohibido
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                Forbidden:
                  value:
                    code: AUTHORIZATION_REQUIRED
                    messages:
                      - The merchant has no authorization to use this API.
components:
  schemas:
    OnboardingResponse:
      type: object
      properties:
        id:
          type: string
          description: El identificador único del onboarding.
        type:
          type: string
          enum:
            - PREVIOUSLY_ONBOARDED
            - ONE_STEP_ONBOARDING
            - TWO_STEP_ONBOARDING
          description: Tipo de flujo de onboarding.
        workflow:
          type: string
          enum:
            - HOSTED_BY_PROVIDER
            - DIRECT
          description: Flujo de trabajo del onboarding.
        status:
          type: string
          description: Estado actual del onboarding. CANCELLED después de una cancelación.
        callback_url:
          type: string
          description: URL a la que se redirige después del proceso de onboarding.
        provider:
          type: object
          properties:
            id:
              type: string
            connection_id:
              type: string
            recipient_id:
              type:
                - string
                - 'null'
              description: >-
                ID del destinatario en el proveedor. Nulo hasta que el proveedor
                asigna uno, por ejemplo, en un onboarding cancelado.
            redirect_url:
              type:
                - string
                - 'null'
            onboarding_url:
              type:
                - string
                - 'null'
            legal_entity:
              type:
                - string
                - 'null'
        documentation:
          type: array
          items:
            type: object
            properties:
              file_name:
                type: string
              content_type:
                type: string
              content_category:
                type: string
              content:
                type: string
        legal_representatives:
          type: array
          items:
            type: object
            properties:
              merchant_reference:
                type: string
              first_name:
                type: string
              last_name:
                type: string
              email:
                type: string
              date_of_birth:
                type: string
              country:
                type: string
              nationality:
                type: string
              title:
                type: string
              publicly_exposed_person:
                type: boolean
              ultimate_beneficial_owner:
                type: boolean
              document:
                type: object
                properties:
                  document_type:
                    type: string
                  document_number:
                    type: string
              phone:
                type: object
                properties:
                  number:
                    type: string
                  country_code:
                    type: string
              address:
                type: object
                properties:
                  address_line_1:
                    type: string
                  address_line_2:
                    type:
                      - string
                      - 'null'
                  country:
                    type: string
                  state:
                    type: string
                  city:
                    type: string
                  zip_code:
                    type: string
        requirements:
          type: array
          items: {}
        withdrawal_methods:
          type: object
          properties:
            bank:
              type: object
              properties:
                code:
                  type: string
                branch:
                  type: string
                branch_digit:
                  type:
                    - string
                    - 'null'
                account:
                  type: string
                account_digit:
                  type:
                    - string
                    - 'null'
                account_type:
                  type: string
                routing:
                  type: string
                country:
                  type: string
                currency:
                  type: string
        terms_of_service:
          type: object
          properties:
            acceptance:
              type: boolean
            date:
              type: string
            ip:
              type: string
        recipient:
          $ref: '#/components/schemas/Recipient'
          description: El destinatario al que pertenece el onboarding.
        history:
          $ref: '#/components/schemas/OnboardingSnapshot'
          description: Instantánea del onboarding.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    ErrorResponse:
      type: object
      properties:
        code:
          type: string
          example: INVALID_REQUEST
        messages:
          type: array
          items:
            type: string
            example: Invalid request
    Recipient:
      type: object
      properties:
        id:
          type: string
        account_id:
          type: string
        merchant_recipient_id:
          type: string
        national_entity:
          type: string
        entity_type:
          type: string
        first_name:
          type: string
        last_name:
          type: string
        legal_name:
          type: string
        email:
          type: string
        date_of_birth:
          type: string
        country:
          type: string
        website:
          type: string
        industry:
          type: string
        merchant_category_code:
          type: string
        document:
          type: object
          properties:
            document_type:
              type: string
            document_number:
              type: string
        phone:
          type: object
          properties:
            number:
              type: string
            country_code:
              type: string
        address:
          type: object
          properties:
            address_line_1:
              type: string
            address_line_2:
              type: string
            city:
              type: string
            country:
              type: string
            state:
              type: string
            zip_code:
              type: string
            neighborhood:
              type: string
        legal_representatives:
          type: array
          items:
            type: object
            properties:
              merchant_reference:
                type: string
              first_name:
                type: string
              last_name:
                type: string
              email:
                type: string
              date_of_birth:
                type: string
              country:
                type: string
              nationality:
                type: string
              title:
                type: string
              publicly_exposed_person:
                type: boolean
              ultimate_beneficial_owner:
                type: boolean
              document:
                type: object
                properties:
                  document_type:
                    type: string
                  document_number:
                    type: string
              phone:
                type: object
                properties:
                  number:
                    type: string
                  country_code:
                    type: string
              address:
                type: object
                properties:
                  address_line_1:
                    type: string
                  address_line_2:
                    type:
                      - string
                      - 'null'
                  country:
                    type: string
                  state:
                    type: string
                  city:
                    type: string
                  zip_code:
                    type: string
        withdrawal_methods:
          type: object
          properties:
            bank:
              type: object
              properties:
                code:
                  type: string
                branch:
                  type: string
                branch_digit:
                  type: string
                account:
                  type: string
                account_digit:
                  type: string
                account_type:
                  type: string
                routing:
                  type: string
                country:
                  type: string
                currency:
                  type: string
        documentation:
          type: array
          items:
            type: object
            properties:
              file_name:
                type: string
              content_type:
                type: string
              content_category:
                type: string
              content:
                type: string
        created_at:
          type: string
        updated_at:
          type: string
    OnboardingSnapshot:
      type: object
      properties:
        id:
          type: string
        type:
          type: string
        workflow:
          type: string
        status:
          type: string
        callback_url:
          type: string
        provider:
          type: object
          properties:
            id:
              type: string
            connection_id:
              type: string
            recipient_id:
              type:
                - string
                - 'null'
              description: >-
                ID del destinatario en el proveedor. Nulo hasta que el proveedor
                asigna uno, por ejemplo, en un onboarding cancelado.
            redirect_url:
              type:
                - string
                - 'null'
        documentation:
          type: array
          items:
            type: object
            properties:
              file_name:
                type: string
              content_type:
                type: string
              content_category:
                type: string
              content:
                type: string
        legal_representatives:
          type: array
          items:
            type: object
            properties:
              merchant_reference:
                type: string
              first_name:
                type: string
              last_name:
                type: string
              email:
                type: string
              date_of_birth:
                type: string
              country:
                type: string
              nationality:
                type: string
              title:
                type: string
              publicly_exposed_person:
                type: boolean
              ultimate_beneficial_owner:
                type: boolean
              document:
                type: object
                properties:
                  document_type:
                    type: string
                  document_number:
                    type: string
              phone:
                type: object
                properties:
                  number:
                    type: string
                  country_code:
                    type: string
              address:
                type: object
                properties:
                  address_line_1:
                    type: string
                  address_line_2:
                    type:
                      - string
                      - 'null'
                  country:
                    type: string
                  state:
                    type: string
                  city:
                    type: string
                  zip_code:
                    type: string
        requirements:
          type: array
          items: {}
        withdrawal_methods:
          type: object
          properties:
            bank:
              type: object
              properties:
                code:
                  type: string
                branch:
                  type: string
                branch_digit:
                  type:
                    - string
                    - 'null'
                account:
                  type: string
                account_digit:
                  type:
                    - string
                    - 'null'
                account_type:
                  type: string
                routing:
                  type: string
                country:
                  type: string
                currency:
                  type: string
        terms_of_service:
          type: object
          properties:
            acceptance:
              type: boolean
            date:
              type: string
            ip:
              type: string
        recipient:
          $ref: '#/components/schemas/Recipient'
        created_at:
          type: string
        updated_at:
          type: string
  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.