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

# Actualizar plan

> Actualiza el estado, los detalles de las cuotas o el método de pago de un plan de cuotas existente

La API **Update Plan** te permite modificar un plan existente, lo que te permite actualizar atributos como el estado del plan, los detalles de las cuotas y el método de pago asociado al plan.

Usa esta API para gestionar y ajustar los planes de cuotas después de su creación.


## OpenAPI

````yaml openapi/es/installments/update-plan.json PATCH /installments-plans/{installment_code}
openapi: 3.1.0
info:
  title: installments
  version: 1.0.2
servers:
  - url: https://api-sandbox.y.uno/v1
    description: Sandbox
  - url: https://api.y.uno/v1
    description: Production (US)
security:
  - sec0: []
    sec1: []
paths:
  /installments-plans/{installment_code}:
    patch:
      summary: Actualizar plan
      operationId: update-plan
      parameters:
        - name: installment_code
          in: path
          description: El identificador único del plan de cuotas.
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: El nombre del plan de cuotas (MAX 255; MIN 3)
                account_id:
                  type: array
                  description: >-
                    El identificador único de la cuenta de Yuno que tendrá
                    disponible el plan de cuotas (MAX 64 ; MIN 36).
                  items:
                    type: string
                merchant_reference:
                  type: string
                  description: Identificación del plan de cuotas (MAX 255; MIN 3)
                installments_plan:
                  type: array
                  description: Definición de las cuotas disponibles para cada escenario
                  items:
                    properties:
                      installment:
                        type: integer
                        description: >-
                          La cantidad de cuotas mensuales que pueden elegir los
                          compradores
                        format: int32
                      rate:
                        type: number
                        description: >-
                          La tasa que aplica el proveedor de pagos al monto
                          final de la transacción cuando se usan cuotas. El
                          valor se ingresa como multiplicador, no como
                          porcentaje. Por ejemplo, para aplicar una tasa del 20
                          %, ingresa `1.20` en lugar de `20`.
                        format: float
                      financial_costs:
                        type: array
                        description: >-
                          Detalles opcionales de los costos financieros de esta
                          opción de cuotas.
                        items:
                          type: object
                          properties:
                            type:
                              type: string
                              description: >-
                                El identificador del tipo de costo financiero
                                (MIN 3; MAX 255).


                                <br/> Ejemplo: `CFT`, `TEA`, `CET`, `CAT`
                            rate:
                              type: number
                              description: >-
                                La tasa del costo financiero como número decimal
                                (por ejemplo, 45.25 para 45.25%).
                              minimum: 0
                              maximum: 100000
                              format: float
                          required:
                            - type
                            - rate
                      type:
                        type: string
                        description: >-
                          Tipo de cuota. Solo disponible para Ecuador y México.
                          Merchant se refiere a pagos diferidos con intereses e
                          Issuer, a pagos diferidos sin intereses
                        enum:
                          - MERCHANT_INSTALLMENTS
                          - ISSUER_INSTALLMENTS
                    required:
                      - installment
                      - rate
                    type: object
                country_code:
                  type: string
                  description: El país del emisor (ISO 3166-1 MAX 2; MIN 2)
                scheme:
                  type: string
                  description: Información del esquema de la tarjeta. (MAX 255; MIN 3)
                brand:
                  type: array
                  description: Información de la marca de la tarjeta (MAX 255; MIN 3).
                  items:
                    type: string
                issuer:
                  type: string
                  description: Emisor de la tarjeta (MAX 255; MIN 3)
                iin:
                  type: array
                  description: >-
                    El número de identificación del emisor (IIN) corresponde a
                    los primeros dígitos del número de una tarjeta de pago
                    emitida por una institución financiera (MAX 8; MIN 6)
                  items:
                    type: string
                first_installment_deferral:
                  type: integer
                  description: >-
                    La cantidad de meses que se esperan para debitar la primera
                    cuota (MAX: 3).
                  format: int32
                amount:
                  type: object
                  description: >-
                    Los montos para los que estará disponible el plan de cuotas.
                    Si es null, está disponible para cualquier monto.
                  required:
                    - currency
                  properties:
                    currency:
                      type: string
                      description: >-
                        La moneda con la que se hace el pago (ISO 4217 MAX 3;
                        MIN 3)
                    min_value:
                      type: number
                      description: >-
                        El monto mínimo para el que se podrá usar el plan de
                        cuotas (múltiplo de 0.0001).
                      format: float
                    max_value:
                      type: number
                      description: >-
                        El monto máximo para el que se podrá usar el plan de
                        cuotas (múltiplo de 0.0001).
                      format: float
                availability:
                  type: object
                  description: >-
                    Las fechas en las que estará disponible el plan de cuotas.
                    Si es null, no tiene fecha de finalización
                  required:
                    - start_at
                    - finish_at
                  properties:
                    start_at:
                      type: string
                      description: >-
                        La fecha de inicio desde la cual se podrá usar el plan
                        de cuotas
                      format: date-time
                    finish_at:
                      type: string
                      description: >-
                        La fecha de fin hasta la cual se podrá usar el plan de
                        cuotas.
                      format: date-time
            examples:
              Update Plan:
                summary: Update Plan
                value:
                  name: Plan Update
                  account_id:
                    - '{{account_id}}'
                  merchant_reference: REF01
                  installments_plan:
                    - installment: 3
                      rate: 1.05
                      financial_costs:
                        - type: CFT
                          rate: 15.5
                      type: MERCHANT_INSTALLMENTS
                    - installment: 6
                      rate: 1.1
                    - installment: 12
                      rate: 1.2
                  country_code: US
                  scheme: VISA
                  brand:
                    - VISA
                    - MASTERCARD
                  issuer: JPMORGAN CHASE BANK
                  iin:
                    - '411111'
                    - '542418'
                  first_installment_deferral: 1
                  amount:
                    currency: USD
                    min_value: 50
                    max_value: 10000
                  availability:
                    start_at: '2024-01-01T00:00:00.000Z'
                    finish_at: '2024-12-31T23:59:59.999Z'
      responses:
        '200':
          description: >-
            Hoy la respuesta devuelve `amount.Currency` con C mayúscula, no
            `amount.currency`. Lee la clave sin distinguir mayúsculas de
            minúsculas.
          content:
            application/json:
              examples:
                Result:
                  value:
                    id: 4d573425-33f9-4c46-b009-2c7e749b0ec7
                    name: plan_007
                    account_id:
                      - f7c5fe77-721b-49c2-84d3-957748df3c2c
                    merchant_reference: Test
                    installments_plan:
                      - installment: 1
                        rate: 1
                        provider_id: ''
                      - installment: 3
                        rate: 1
                        provider_id: ''
                        financial_costs:
                          - type: CFT
                            rate: 45.25
                            formatted_value: 45,25%
                          - type: TEA
                            rate: 38.5
                            formatted_value: 38,50%
                      - installment: 6
                        rate: 1
                        provider_id: ''
                      - installment: 9
                        rate: 1
                        provider_id: ''
                      - installment: 12
                        rate: 1
                        provider_id: ''
                    source: ''
                    provider_id: ''
                    scheme: ''
                    brand:
                      - VISA
                    issuer: ''
                    issuer_id: ''
                    iin: null
                    country_code: US
                    first_installment_deferral: 0
                    amount:
                      currency: USD
                      min_value: 0
                      max_value: 100000000
                    availability:
                      start_at: '2023-09-12T00:00:00Z'
                      finish_at: '2030-09-20T00:00:00Z'
                    created_at: '2023-10-11T17:52:31.886178246Z'
                    updated_at: '2023-10-11T17:52:31.886178246Z'
                    payment_method_type: NU_PAY_ENROLLMENT
              schema:
                type: object
                properties:
                  id:
                    type: string
                    example: 4d573425-33f9-4c46-b009-2c7e749b0ec7
                  name:
                    type: string
                    example: plan_007
                  account_id:
                    type: array
                    items:
                      type: string
                      example: f7c5fe77-721b-49c2-84d3-957748df3c2c
                  merchant_reference:
                    type: string
                    example: Test
                  installments_plan:
                    type: array
                    items:
                      type: object
                      properties:
                        installment:
                          type: integer
                          example: 1
                          default: 0
                        rate:
                          type: number
                          example: 1
                          default: 0
                        provider_id:
                          type: string
                          example: ''
                        financial_costs:
                          type: array
                          items:
                            type: object
                            properties:
                              type:
                                type: string
                                enum:
                                  - CFT
                                  - TEA
                                  - CET
                                  - CAT
                              rate:
                                type: number
                                format: float
                              formatted_value:
                                type: string
                  type:
                    type: string
                    example: ''
                  source:
                    type: string
                    example: ''
                  provider_id:
                    type: string
                    example: ''
                  scheme:
                    type: string
                    example: ''
                  brand:
                    type: array
                    items:
                      type: string
                      example: VISA
                  issuer:
                    type: string
                    example: ''
                  issuer_id:
                    type: string
                    example: ''
                  iin: {}
                  country_code:
                    type: string
                    example: US
                  first_installment_deferral:
                    type: integer
                    example: 0
                    default: 0
                  amount:
                    type: object
                    properties:
                      currency:
                        type: string
                        example: USD
                      min_value:
                        type: integer
                        example: 0
                        default: 0
                      max_value:
                        type: integer
                        example: 100000000
                        default: 0
                  availability:
                    type: object
                    properties:
                      start_at:
                        type: string
                        example: '2023-09-12T00:00:00Z'
                      finish_at:
                        type: string
                        example: '2030-09-20T00:00:00Z'
                  created_at:
                    type: string
                    example: '2023-10-11T17:52:31.886178246Z'
                  updated_at:
                    type: string
                    example: '2023-10-11T17:52:31.886178246Z'
                  payment_method_type:
                    type: string
                    example: NU_PAY_ENROLLMENT
                    description: Tipo de método de pago.
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: {}
              schema:
                type: object
                properties: {}
      deprecated: false
components:
  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.