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

# Preview Change Plan

> Preview the proration and recurring-amount impact of switching plans.

Read-only: does not mutate Stripe state or workspace state. Warnings mirror
the 409 conflicts that ``change_plan`` would raise (org overflow, member
overflow) so the frontend can surface them before the user commits.



## OpenAPI

````yaml /openapi.json get /api/v1/workspaces/{workspace_id}/billing/change-plan/preview
openapi: 3.1.0
info:
  description: Change Impact Engine for multi-repo systems
  title: Riftmap
  version: 1.12.3
servers: []
security: []
paths:
  /api/v1/workspaces/{workspace_id}/billing/change-plan/preview:
    get:
      tags:
        - billing
      summary: Preview Change Plan
      description: >-
        Preview the proration and recurring-amount impact of switching plans.


        Read-only: does not mutate Stripe state or workspace state. Warnings
        mirror

        the 409 conflicts that ``change_plan`` would raise (org overflow, member

        overflow) so the frontend can surface them before the user commits.
      operationId: >-
        preview_change_plan_api_v1_workspaces__workspace_id__billing_change_plan_preview_get
      parameters:
        - in: path
          name: workspace_id
          required: true
          schema:
            format: uuid
            title: Workspace Id
            type: string
        - in: query
          name: target_plan
          required: true
          schema:
            enum:
              - pro
              - business
            title: Target Plan
            type: string
        - in: query
          name: promotion_code
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Promotion Code
        - in: header
          name: X-Workspace-Id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Workspace-Id
        - in: cookie
          name: riftmap_access
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Riftmap Access
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChangePlanPreviewResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - APIKeyHeader: []
        - HTTPBearer: []
components:
  schemas:
    ChangePlanPreviewResponse:
      properties:
        coupon_applies_to_target:
          default: true
          title: Coupon Applies To Target
          type: boolean
        coupon_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Coupon Id
        coupon_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Coupon Name
        currency:
          title: Currency
          type: string
        next_invoice_amount:
          title: Next Invoice Amount
          type: integer
        next_invoice_date:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Next Invoice Date
        next_invoice_proration:
          title: Next Invoice Proration
          type: integer
        next_invoice_recurring:
          title: Next Invoice Recurring
          type: integer
        promotion_code_applied:
          anyOf:
            - type: string
            - type: 'null'
          title: Promotion Code Applied
        prorated_today:
          title: Prorated Today
          type: integer
        target_plan:
          title: Target Plan
          type: string
        warnings:
          items:
            $ref: '#/components/schemas/ChangePlanPreviewWarning'
          title: Warnings
          type: array
      required:
        - target_plan
        - prorated_today
        - next_invoice_recurring
        - next_invoice_proration
        - next_invoice_amount
        - next_invoice_date
        - currency
        - promotion_code_applied
        - warnings
      title: ChangePlanPreviewResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ChangePlanPreviewWarning:
      properties:
        current_count:
          title: Current Count
          type: integer
        new_limit:
          title: New Limit
          type: integer
        overflow:
          title: Overflow
          type: integer
        type:
          enum:
            - org_disconnect_required
            - member_eviction_required
          title: Type
          type: string
      required:
        - type
        - overflow
        - new_limit
        - current_count
      title: ChangePlanPreviewWarning
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    APIKeyHeader:
      in: header
      name: X-API-Key
      type: apiKey
    HTTPBearer:
      description: API key as Bearer token (rfm_live_... prefix)
      scheme: bearer
      type: http

````