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

# Change plan

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

Moves your workspace's paid plan to another plan. Pass the price ID of the new plan, from `price_ids` in [List plans](/api-reference/list-plans). Only the workspace owner can change the plan.

<Warning>An upgrade applies right away and charges the saved payment method now, with no confirmation step. The charge is either the prorated difference for the rest of the billing period or the full price difference between the plans, depending on the plans. Check the amount first with [Preview plan change](/api-reference/preview-plan-change).</Warning>

A downgrade charges nothing now. It's scheduled for the end of the billing period, and you can undo it with [Cancel scheduled plan change](/api-reference/cancel-scheduled-plan-change). Either change also clears a pending cancellation, so the plan renews again.

<Warning>`success: false` doesn't mean the change failed. The upgrade is already applied, and its charge needs the payer to act. Send them to `payment_action_url`. Until they pay, the invoice stays open.</Warning>

This works for plans billed through Stripe. If the workspace is billed through Wix, this returns 409 `workspace_billed_through_wix`. Use [Change Wix plan](/api-reference/change-wix-plan) instead.

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



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json post /api/billing/update-subscription/{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/update-subscription/{price_id}:
    post:
      summary: Change plan
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Moves your workspace's paid plan to another plan. Pass the price ID of
        the new plan, from `price_ids` in [List
        plans](/api-reference/list-plans). Only the workspace owner can change
        the plan.


        <Warning>An upgrade applies right away and charges the saved payment
        method now, with no confirmation step. The charge is either the prorated
        difference for the rest of the billing period or the full price
        difference between the plans, depending on the plans. Check the amount
        first with [Preview plan
        change](/api-reference/preview-plan-change).</Warning>


        A downgrade charges nothing now. It's scheduled for the end of the
        billing period, and you can undo it with [Cancel scheduled plan
        change](/api-reference/cancel-scheduled-plan-change). Either change also
        clears a pending cancellation, so the plan renews again.


        <Warning>`success: false` doesn't mean the change failed. The upgrade is
        already applied, and its charge needs the payer to act. Send them to
        `payment_action_url`. Until they pay, the invoice stays open.</Warning>


        This works for plans billed through Stripe. If the workspace is billed
        through Wix, this returns 409 `workspace_billed_through_wix`. Use
        [Change Wix plan](/api-reference/change-wix-plan) instead.


        The base rate limit is 10 requests per hour per user. See [Rate
        limits](/developers/references/apps-api/get-started/rate-limits) for the
        multiplier your plan gets.
      operationId: update_subscription_api_billing_update_subscription__price_id__post
      parameters:
        - name: price_id
          in: path
          required: true
          schema:
            type: string
            description: >-
              Price ID of the plan to move to, from `price_ids` in [List
              plans](/api-reference/list-plans).
            title: Price Id
          description: >-
            Price ID of the plan to move to, from `price_ids` in [List
            plans](/api-reference/list-plans).
          example: price_1QxYzAbCdEfGhIjK
      responses:
        '200':
          description: The plan change, applied now or scheduled.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanChangeResult'
              example:
                success: true
                subscription:
                  id: sub_1QxYzAbCdEfGhIjK
                  status: active
                  is_downgrade: false
                  billing_period_change: false
        '400':
          description: >-
            The workspace has no active subscription, `price_id` isn't a plan,
            or the move isn't allowed: a different currency, yearly to monthly
            billing, a lower plan while switching to yearly billing, or a
            lower-priced Business plan from outside the Business plans.
        '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.
            Downgrades are still allowed.
        '403':
          description: >-
            You aren't the workspace owner, or a payment dispute is open on the
            workspace.
        '409':
          description: >-
            The workspace is billed through Wix
            (`workspace_billed_through_wix`), the subscription has ended, the
            workspace is still on a free migration trial, or another upgrade is
            already in progress.
        '429':
          description: >-
            Rate limit exceeded. The base rate limit is 10 requests per hour 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:
    PlanChangeResult:
      properties:
        success:
          type: boolean
          title: Success
          description: >-
            `true` when the change is complete. `false` when an upgrade is
            already applied but its charge needs the payer to act, for example
            to confirm the payment with their bank.
          example: true
        payment_action_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Payment Action Url
          description: >-
            Stripe page where the payer completes the charge when `success` is
            `false`. `null` when no action is needed. It can also be `null` when
            `success` is `false`. Then find the open invoice with [Get billing
            info](/api-reference/get-billing-info).
          example: >-
            https://invoice.stripe.com/i/acct_1N3XrmDr56L89dkK/live_YWNjdF8xTjNYcm1EcjU2TDg5ZGtL
        subscription:
          $ref: '#/components/schemas/PlanChangeSubscription'
          description: The subscription after the change.
      type: object
      required:
        - success
        - payment_action_url
        - subscription
      title: PlanChangeResult
      description: The outcome of a plan change.
    PlanChangeSubscription:
      properties:
        id:
          type: string
          title: Id
          description: ID of the Stripe subscription.
          example: sub_1QxYzAbCdEfGhIjK
        status:
          type: string
          title: Status
          description: Stripe status of the subscription, such as `active` or `past_due`.
          example: active
        is_downgrade:
          type: boolean
          title: Is Downgrade
          description: >-
            `true` when the change is a downgrade, scheduled for the end of the
            billing period. `false` for an upgrade, which applies now.
          example: false
        schedule_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Schedule Id
          description: >-
            ID of the Stripe subscription schedule that applies a downgrade at
            the end of the period. `null` for an upgrade.
          example: sub_sched_1QxYzAbCdEfGhIjK
        billing_period_change:
          type: boolean
          title: Billing Period Change
          description: >-
            `true` when the upgrade moves the subscription from monthly to
            yearly billing. Always `false` for a downgrade.
          example: false
      type: object
      required:
        - id
        - status
        - is_downgrade
        - schedule_id
        - billing_period_change
      title: PlanChangeSubscription
      description: The subscription after a plan change.
  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.