> ## Documentation Index
> Fetch the complete documentation index at: https://docs.plugtopay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a subscription plan

> Updates a plan. Amount, currency, and interval cannot be changed after creation.



## OpenAPI

````yaml /api-reference/openapi.json put /api/v1/subscriptions/plans/{uuid}
openapi: 3.0.0
info:
  title: PlugToPay API
  description: API to make payments easy in multiple gateways.
  version: 1.0.0
servers:
  - url: http://localhost:7701
    description: Test Server
security: []
paths:
  /api/v1/subscriptions/plans/{uuid}:
    put:
      tags:
        - Subscription Plans
      summary: Update a subscription plan
      description: >-
        Updates a plan. Amount, currency, and interval cannot be changed after
        creation.
      operationId: e41b5811b8d9daa4a86d7544455c1fc1
      parameters:
        - $ref: '#/components/parameters/XClientId'
        - name: uuid
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                name:
                  type: string
                  example: Pro Monthly
                  nullable: true
                description:
                  type: string
                  example: Updated description.
                  nullable: true
                billing_day:
                  description: Day of the month to charge (1–28).
                  type: integer
                  example: 10
                  nullable: true
                trial_period_days:
                  description: Free trial days (1–365).
                  type: integer
                  example: 14
                  nullable: true
                is_active:
                  description: >-
                    Set to false to deactivate the plan and prevent new
                    subscriptions.
                  type: boolean
                  example: false
                  nullable: true
                min_card_months:
                  description: >-
                    Minimum months the card must be valid at subscription
                    creation (0 to remove restriction).
                  type: integer
                  example: 3
                  nullable: true
              type: object
      responses:
        '200':
          description: Plan updated
          content:
            application/json:
              schema:
                properties:
                  data:
                    $ref: '#/components/schemas/SubscriptionPlan'
                type: object
        '401':
          description: Unauthorized — Invalid API Key
        '404':
          description: Plan not found
        '422':
          description: Validation error
      security:
        - ApiKeyAuth: []
components:
  parameters:
    XClientId:
      name: x-client-id
      in: header
      description: Client identifier for the company in the request.
      required: true
      schema:
        type: string
        example: client_abc123
  schemas:
    SubscriptionPlan:
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          example: Basic Monthly
        description:
          type: string
          nullable: true
        amount:
          description: Plan price in cents
          type: integer
          example: 2990
        currency:
          type: string
          example: BRL
        interval:
          type: string
          enum:
            - weekly
            - monthly
            - yearly
          example: monthly
        interval_count:
          type: integer
          example: 1
          nullable: true
        trial_period_days:
          type: integer
          example: 7
          nullable: true
        billing_day:
          description: Day of the month to charge (1–28)
          type: integer
          example: 5
          nullable: true
        min_card_months:
          description: >-
            Minimum months the card must be valid at subscription creation; null
            = no restriction
          type: integer
          example: 3
          nullable: true
        is_active:
          type: boolean
          example: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      type: object
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      description: Company API key. Send in the X-API-Key header.
      name: X-API-Key
      in: header

````