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

# Update Subscription



## OpenAPI

````yaml openapi/yuno_sandbox_tested.json PATCH /v1/subscriptions/{subscription_id}
openapi: 3.1.0
info:
  title: Yuno Payments API
  version: 1.0.0
  description: >
    The Yuno Payments API is built around REST principles, using standard HTTP
    methods and JSON payloads.


    ## Authentication

    All requests require two headers:

    ```

    public-api-key: YOUR_PUBLIC_KEY

    private-secret-key: YOUR_PRIVATE_KEY

    ```


    ## Idempotency

    Payment mutations (create, capture, cancel, refund, payout) require an
    `X-Idempotency-Key` header (UUID).

    The API stores the key and returns the same response for duplicate requests
    within 24 hours.


    ## Environments

    | Environment | Base URL |

    |-------------|----------|

    | Sandbox | `https://api-sandbox.y.uno/v1` |

    | Production | `https://api.y.uno/v1` |
  contact:
    name: Yuno Support
    url: https://docs.y.uno
  license:
    name: Proprietary
servers:
  - url: https://api-sandbox.y.uno
    description: Sandbox
  - url: https://api.y.uno
    description: Production (US)
  - url: https://api.eu.y.uno
    description: Production (EMEA)
security:
  - PublicApiKey: []
    PrivateSecretKey: []
tags:
  - name: Customers
    description: Create and manage customer records.
  - name: Checkout Sessions
    description: Initialize the Yuno SDK on the front-end.
  - name: Payment Methods
    description: Enroll and manage vaulted payment methods.
  - name: Payments
    description: Create and manage payment transactions.
  - name: Payment Links
    description: Hosted payment pages requiring no SDK.
  - name: Subscriptions
    description: Recurring billing management.
  - name: Payouts
    description: Disburse funds to individuals or entities.
  - name: Reports
    description: Generate and download transaction reports.
  - name: Currency Conversion
    description: Dynamic currency conversion (DCC).
paths:
  /v1/subscriptions/{subscription_id}:
    patch:
      tags:
        - Subscriptions
      summary: Update Subscription
      operationId: update-subscription
      parameters:
        - $ref: '#/components/parameters/SubscriptionId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSubscriptionRequest'
            example:
              retries:
                retry_on_decline: true
                amount: 3
              frequency:
                type: MONTH
                value: 1
                monthly_billing_day: 1
      responses:
        '200':
          description: Subscription updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Subscription'
components:
  parameters:
    SubscriptionId:
      name: subscription_id
      in: path
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    UpdateSubscriptionRequest:
      type: object
      properties:
        frequency:
          type: object
          properties:
            type:
              type: string
              enum:
                - DAY
                - WEEK
                - MONTH
            value:
              type: integer
            monthly_billing_day:
              type: integer
              minimum: 1
              maximum: 31
        retries:
          type: object
          properties:
            retry_on_decline:
              type: boolean
            amount:
              type: integer
              minimum: 1
              maximum: 7
    Subscription:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        status:
          type: string
          enum:
            - ACTIVE
            - PAUSED
            - CANCELLED
            - EXPIRED
        amount:
          $ref: '#/components/schemas/Amount'
        frequency:
          type: object
          properties:
            type:
              type: string
            value:
              type: integer
        subscription_agreement_id:
          type: string
          description: >-
            Links this subscription to the initial payment created with the same
            agreement ID. Used for tracking, reconciliation, and chargeback
            handling.
        created_at:
          type: string
          format: date-time
    Amount:
      type: object
      required:
        - currency
        - value
      properties:
        currency:
          $ref: '#/components/schemas/Currency'
        value:
          type: number
          multipleOf: 0.0001
          description: Amount in cents (e.g. 10000 = $100.00)
    Currency:
      type: string
      minLength: 3
      maxLength: 3
      description: ISO 4217 currency code (e.g. USD, BRL, MXN)

````

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