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

# End free trial

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

Ends your workspace's free trial now and starts the paid plan. Only the workspace owner can end it. This works only for a workspace billed through Wix that's in a free trial. Otherwise it returns 400 with `not_wix_billed` or `not_in_free_trial`.

<Warning>This charges the saved payment method for the first billing cycle right away, with no confirmation step.</Warning>

<Warning>A declined card isn't an error. The response is 200 with `status` set to `payment_declined` or `payment_declined_not_retriable`, and the workspace stays in its free trial. Check `status` before you treat the trial as ended.</Warning>

To fix a declined card, update it with [Create payment method update session](/api-reference/create-payment-method-update-session), then call this again.

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/end-free-trial
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/end-free-trial:
    post:
      summary: End free trial
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Ends your workspace's free trial now and starts the paid plan. Only the
        workspace owner can end it. This works only for a workspace billed
        through Wix that's in a free trial. Otherwise it returns 400 with
        `not_wix_billed` or `not_in_free_trial`.


        <Warning>This charges the saved payment method for the first billing
        cycle right away, with no confirmation step.</Warning>


        <Warning>A declined card isn't an error. The response is 200 with
        `status` set to `payment_declined` or `payment_declined_not_retriable`,
        and the workspace stays in its free trial. Check `status` before you
        treat the trial as ended.</Warning>


        To fix a declined card, update it with [Create payment method update
        session](/api-reference/create-payment-method-update-session), then call
        this again.


        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: end_free_trial_api_billing_end_free_trial_post
      responses:
        '200':
          description: The outcome of the charge. Check `status`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FreeTrialEnded'
              example:
                status: ended_successfully
                invoice_id: 9a8b7c6d-1234-4f5e-8a9b-0c1d2e3f4a5b
        '400':
          description: >-
            The workspace isn't billed through Wix (`not_wix_billed`), isn't in
            a free trial (`not_in_free_trial`), or Base44 couldn't open a Wix
            billing session for the workspace owner.
        '401':
          description: >-
            Missing or invalid credentials. A read-only token gets this response
            too.
        '403':
          description: >-
            You aren't the workspace owner, or a payment dispute is open on the
            workspace.
        '409':
          description: Wix doesn't allow ending this trial (`free_trial_end_not_allowed`).
        '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:
    FreeTrialEnded:
      properties:
        status:
          type: string
          enum:
            - ended_successfully
            - payment_pending
            - payment_declined
            - payment_declined_not_retriable
            - unknown_status
          title: Status
          description: >-
            `ended_successfully`: the trial is over and the first cycle is paid.
            `payment_pending`: the charge is still processing.
            `payment_declined`: the card was declined and the trial continues,
            so you can retry. `payment_declined_not_retriable`: declined, and
            retrying won't help until the payment method changes.
            `unknown_status`: Wix didn't report an outcome.
          example: ended_successfully
        invoice_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Invoice Id
          description: ID of the invoice for the first cycle. `null` when none was issued.
          example: 9a8b7c6d-1234-4f5e-8a9b-0c1d2e3f4a5b
      type: object
      required:
        - status
        - invoice_id
      title: FreeTrialEnded
      description: The outcome of ending a free trial.
  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.