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

# Remove addon from subscription

> Use when removing an add-on from a subscription (e.g. downgrade or opt-out).



## OpenAPI

````yaml /api-reference/openapi.json delete /subscriptions/addon
openapi: 3.0.1
info:
  title: Flexprice API
  description: Flexprice API Service
  contact:
    name: API Support
  license:
    name: AGPL-3.0
    url: https://www.gnu.org/licenses/agpl-3.0.html
  version: '1.0'
servers:
  - url: https://us.api.flexprice.io/v1
    description: US Region
  - url: https://api.cloud.flexprice.io/v1
    description: India Region
security: []
paths:
  /subscriptions/addon:
    delete:
      tags:
        - Subscriptions
      summary: Remove addon from subscription
      description: >-
        Use when removing an add-on from a subscription (e.g. downgrade or
        opt-out).
      operationId: removeSubscriptionAddon
      requestBody:
        description: Remove Addon Request
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RemoveAddonRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.ErrorResponse'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors.ErrorResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    RemoveAddonRequest:
      required:
        - addon_association_id
      type: object
      properties:
        addon_association_id:
          type: string
        effective_date:
          type: string
          description: >-
            EffectiveDate is the date the cancellation takes effect.

            When nil the addon is cancelled at the end of the current period.

            When provided it must fall within [CurrentPeriodStart,
            CurrentPeriodEnd]; mid-period

            values combined with create_prorations will issue a wallet credit
            for unused time.
          format: date-time
        proration_behavior:
          $ref: '#/components/schemas/types.ProrationBehavior'
        reason:
          type: string
    SuccessResponse:
      type: object
      properties:
        message:
          type: string
    errors.ErrorResponse:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/errors.ErrorCode'
        http_status_code:
          type: integer
        message:
          type: string
      x-speakeasy-name-override: ErrorResponse
    types.ProrationBehavior:
      type: string
      enum:
        - create_prorations
        - none
      x-enum-comments:
        ProrationBehaviorCreateProrations: 'Default: Create credits/charges on invoice'
        ProrationBehaviorNone: Calculate but don't apply (e.g., for previews)
      x-enum-varnames:
        - ProrationBehaviorCreateProrations
        - ProrationBehaviorNone
      x-speakeasy-name-override: ProrationBehavior
    errors.ErrorCode:
      type: string
      enum:
        - http_client_error
        - system_error
        - internal_error
        - not_found
        - already_exists
        - version_conflict
        - validation_error
        - invalid_operation
        - permission_denied
        - database_error
        - service_unavailable
        - too_many_requests
      x-enum-varnames:
        - ErrCodeHTTPClient
        - ErrCodeSystemError
        - ErrCodeInternalError
        - ErrCodeNotFound
        - ErrCodeAlreadyExists
        - ErrCodeVersionConflict
        - ErrCodeValidation
        - ErrCodeInvalidOperation
        - ErrCodePermissionDenied
        - ErrCodeDatabase
        - ErrCodeServiceUnavailable
        - ErrCodeTooManyRequests
      x-speakeasy-name-override: ErrorCode
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      description: Enter your API key in the format *x-api-key &lt;api-key&gt;**
      name: x-api-key
      in: header

````