> ## 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 Wix 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 an upgrade with [Change Wix plan](/api-reference/change-wix-plan) would charge, without changing or charging anything. Send the same `new_product_id` and `period_unit` you plan to send there. Only the workspace owner can preview.

Only upgrades can be previewed. A downgrade returns 400, because it charges nothing now and takes effect at the end of the billing period.

This works only for workspaces billed through Wix. For a Stripe-billed workspace, use [Preview plan change](/api-reference/preview-plan-change). Wix billing is still rolling out, so this can return 404 for your account.

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/dynamic-offering/preview-subscription
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/dynamic-offering/preview-subscription:
    post:
      summary: Preview Wix 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 an upgrade with [Change Wix
        plan](/api-reference/change-wix-plan) would charge, without changing or
        charging anything. Send the same `new_product_id` and `period_unit` you
        plan to send there. Only the workspace owner can preview.


        Only upgrades can be previewed. A downgrade returns 400, because it
        charges nothing now and takes effect at the end of the billing period.


        This works only for workspaces billed through Wix. For a Stripe-billed
        workspace, use [Preview plan
        change](/api-reference/preview-plan-change). Wix billing is still
        rolling out, so this can return 404 for your account.


        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_dynamic_offering_subscription_api_billing_dynamic_offering_preview_subscription_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PreviewDynamicOfferingRequest'
        required: true
      responses:
        '200':
          description: What the upgrade costs now and at renewal.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WixPlanChangePreview'
              example:
                prorated_amount_due: 18.5
                currency: usd
                recurring_amount: 50
                next_billing_date: 1763971200
                billing_interval: month
                card_last4: '4242'
        '400':
          description: >-
            `new_product_id` isn't a Base44 plan, the workspace isn't billed
            through Wix, the target is a downgrade, the change isn't allowed
            (yearly to monthly billing, or a Business plan cheaper than the
            current plan), or Base44 couldn't open a Wix billing session for
            you.
        '401':
          description: >-
            Missing or invalid credentials. A read-only token gets this response
            too.
        '402':
          description: >-
            The plan has an unpaid invoice (`detail.error_type` is `past_due`).
            Pay it before upgrading.
        '403':
          description: You aren't the workspace owner.
        '404':
          description: Wix billing isn't available to your account yet.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
              example:
                detail:
                  - type: literal_error
                    loc:
                      - body
                      - period_unit
                    msg: Input should be 'MONTH' or 'YEAR'
                    input: WEEK
                    ctx:
                      expected: '''MONTH'' or ''YEAR'''
        '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:
    PreviewDynamicOfferingRequest:
      properties:
        new_product_id:
          type: string
          maxLength: 100
          minLength: 1
          title: New Product Id
          description: >-
            Wix product of the plan to preview, from `wix_product_id` in [List
            plans](/api-reference/list-plans).
          example: 5f0c7a2e-3b91-4d6a-9e0f-2c8b1d4a7e63
        period_unit:
          type: string
          enum:
            - MONTH
            - YEAR
          title: Period Unit
          description: 'Billing period of the new plan: `MONTH` or `YEAR`.'
          example: MONTH
      type: object
      required:
        - new_product_id
        - period_unit
      title: PreviewDynamicOfferingRequest
    WixPlanChangePreview:
      properties:
        prorated_amount_due:
          type: number
          title: Prorated Amount Due
          description: >-
            Amount [Change Wix plan](/api-reference/change-wix-plan) charges now
            for this upgrade, in major units of `currency` (dollars, not cents).
          example: 18.5
        currency:
          type: string
          title: Currency
          description: Lowercase three-letter currency code of both amounts.
          example: usd
        recurring_amount:
          type: number
          title: Recurring Amount
          description: >-
            What the new plan costs at each renewal, in major units of
            `currency`.
          example: 50
        next_billing_date:
          type: integer
          title: Next Billing Date
          description: When the new plan next renews, as a Unix timestamp in seconds.
          example: 1763971200
        billing_interval:
          type: string
          enum:
            - month
            - year
          title: Billing Interval
          description: 'How often the new plan renews: `month` or `year`.'
          example: month
        card_last4:
          anyOf:
            - type: string
            - type: 'null'
          title: Card Last4
          description: >-
            Last four digits of the card that would be charged, or the wallet's
            name for a wallet such as Apple Pay. `null` when Wix doesn't report
            one.
          example: '4242'
      type: object
      required:
        - prorated_amount_due
        - currency
        - recurring_amount
        - next_billing_date
        - billing_interval
        - card_last4
      title: WixPlanChangePreview
      description: What a Wix plan upgrade costs now and at renewal.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  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.