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

# Preview plan change

> <Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

Shows what upgrading your workspace to another plan costs, without changing or charging anything. Pass the price ID of the plan you're considering, from `price_ids` in [List plans](/api-reference/list-plans). Only the workspace owner can preview.

The preview mirrors [Change plan](/api-reference/change-plan): `prorated_amount_due` is what that call charges now, and `recurring_amount` is what the new plan costs at each renewal. It previews upgrades only. A downgrade returns 400, because a downgrade charges nothing now and takes effect at the end of the billing period.

This previews plans billed through Stripe. For a workspace billed through Wix, use [Preview Wix plan change](/api-reference/preview-wix-plan-change). A Wix-billed workspace can still get a result here, but it doesn't apply to its plan.

The base rate limit is 20 requests per minute per user. See [Rate limits](/developers/references/apps-api/get-started/rate-limits) for the multiplier your plan gets.

<Warning>The response includes fields beyond the ones documented here. Don't rely on undocumented response fields, as they can change at any time.</Warning>



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json post /api/billing/preview-upgrade/{price_id}
openapi: 3.1.0
info:
  title: Base44 App Management API
  version: 1.0.0
servers:
  - url: https://app.base44.com
security:
  - PersonalAccessTokenAuth: []
paths:
  /api/billing/preview-upgrade/{price_id}:
    post:
      summary: Preview plan change
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Shows what upgrading your workspace to another plan costs, without
        changing or charging anything. Pass the price ID of the plan you're
        considering, from `price_ids` in [List
        plans](/api-reference/list-plans). Only the workspace owner can preview.


        The preview mirrors [Change plan](/api-reference/change-plan):
        `prorated_amount_due` is what that call charges now, and
        `recurring_amount` is what the new plan costs at each renewal. It
        previews upgrades only. A downgrade returns 400, because a downgrade
        charges nothing now and takes effect at the end of the billing period.


        This previews plans billed through Stripe. For a workspace billed
        through Wix, use [Preview Wix plan
        change](/api-reference/preview-wix-plan-change). A Wix-billed workspace
        can still get a result here, but it doesn't apply to its plan.


        The base rate limit is 20 requests per minute per user. See [Rate
        limits](/developers/references/apps-api/get-started/rate-limits) for the
        multiplier your plan gets.


        <Warning>The response includes fields beyond the ones documented here.
        Don't rely on undocumented response fields, as they can change at any
        time.</Warning>
      operationId: preview_upgrade_api_billing_preview_upgrade__price_id__post
      parameters:
        - name: price_id
          in: path
          required: true
          schema:
            type: string
            description: >-
              Price ID of the plan to preview, from `price_ids` in [List
              plans](/api-reference/list-plans).
            title: Price Id
          description: >-
            Price ID of the plan to preview, from `price_ids` in [List
            plans](/api-reference/list-plans).
          example: price_1QxYzAbCdEfGhIjK
      responses:
        '200':
          description: What the upgrade costs now and at renewal.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanChangePreview'
              example:
                prorated_amount_due: 12.5
                currency: usd
                next_billing_date: 1767225600
                recurring_amount: 50
                billing_interval: month
                full_diff: false
        '400':
          description: >-
            `price_id` isn't a plan, the workspace has no active subscription,
            the target is a downgrade, or the move isn't allowed: a different
            currency, yearly to monthly billing, or a lower plan while switching
            to yearly billing.
        '401':
          description: >-
            Missing or invalid credentials. A read-only token gets this response
            too.
        '402':
          description: The workspace has an overdue invoice. Pay it before upgrading.
        '403':
          description: You aren't the workspace owner.
        '409':
          description: >-
            The subscription has ended, or the workspace is still on a free
            migration trial.
        '429':
          description: >-
            Rate limit exceeded. The base rate limit is 20 requests per minute
            per user. See [Rate
            limits](/developers/references/apps-api/get-started/rate-limits) for
            the multiplier your plan gets.
      security:
        - PersonalAccessTokenAuth:
            - full_access
components:
  schemas:
    PlanChangePreview:
      properties:
        prorated_amount_due:
          type: number
          title: Prorated Amount Due
          description: >-
            Amount [Change plan](/api-reference/change-plan) charges now for
            this upgrade, in major units of `currency` (dollars, not cents).
            When `full_diff` is `true`, this is the full price difference rather
            than a prorated amount.
          example: 12.5
        currency:
          type: string
          title: Currency
          description: Lowercase three-letter currency code of both amounts.
          example: usd
        next_billing_date:
          type: integer
          title: Next Billing Date
          description: When the new plan next renews, as a Unix timestamp in seconds.
          example: 1767225600
        recurring_amount:
          type: number
          title: Recurring Amount
          description: >-
            What the new plan costs at each renewal, in major units of
            `currency`.
          example: 50
        billing_interval:
          type: string
          title: Billing Interval
          description: 'How often the new plan renews: `month` or `year`.'
          example: month
        full_diff:
          type: boolean
          title: Full Diff
          description: >-
            `true` when `prorated_amount_due` is the full price difference
            between the plans, not a prorated share of it.
          example: false
      type: object
      required:
        - prorated_amount_due
        - currency
        - next_billing_date
        - recurring_amount
        - billing_interval
        - full_diff
      title: PlanChangePreview
      description: What an upgrade costs now and at renewal.
  securitySchemes:
    PersonalAccessTokenAuth:
      type: http
      scheme: bearer
      description: >-
        Personal access token, sent as `Authorization: Bearer <token>`. Each
        operation lists the permission it needs: `read_only` or `full_access`. A
        full-access token can call every operation. A read-only token can call
        only the operations that list `read_only`; anything else returns 403
        `read_only_credential_route_not_allowed`.

````

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