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

# Cancel subscription

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

Cancels your workspace's paid subscription. Only the workspace owner can cancel.

<Warning>This takes effect right away, with no confirmation step. By default the plan stops renewing: it stays active until the end of the billing period, then the workspace moves to the Free plan, and nothing is refunded. With `ils_refund_consent: true`, the paid plan ends immediately and part of the period is refunded, which can't be undone.</Warning>

Before the period ends, you can undo a default cancellation with [Reactivate subscription](/api-reference/reactivate-subscription), or with [Turn on auto-renew](/api-reference/turn-on-auto-renew) for a workspace billed through Wix.

**Immediate cancellation with a refund.** When [Preview ILS refund](/api-reference/preview-ils-refund) shows you're eligible, send `ils_refund_consent: true` to cancel right away and get part of the period back. The response then carries `ils_refund`. If an earlier immediate cancellation on this subscription refunded you but didn't finish, this call finishes it right away, even without consent.

<Warning>Check `ils_refund.status`. `refund_issued_cancel_failed` means you were refunded but the subscription is still active. Call this endpoint again to finish cancelling.</Warning>

**Apps over the Free plan's limit.** If [Get cancellation impact](/api-reference/get-cancellation-impact) shows `apps.over_limit: true`, send `cancellation_selection.keep_app_ids` to choose which apps stay published. When the plan ends, if the workspace is still over the limit, every other app is unpublished. Leave `cancellation_selection` out to unpublish nothing.

If a request fails after Base44 reached the payment provider, the cancellation may already have taken effect. Cancelling again is safe.

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

<Warning>Send only the fields documented here. Other request fields aren't supported and their behavior can change.</Warning>



## OpenAPI

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


        Cancels your workspace's paid subscription. Only the workspace owner can
        cancel.


        <Warning>This takes effect right away, with no confirmation step. By
        default the plan stops renewing: it stays active until the end of the
        billing period, then the workspace moves to the Free plan, and nothing
        is refunded. With `ils_refund_consent: true`, the paid plan ends
        immediately and part of the period is refunded, which can't be
        undone.</Warning>


        Before the period ends, you can undo a default cancellation with
        [Reactivate subscription](/api-reference/reactivate-subscription), or
        with [Turn on auto-renew](/api-reference/turn-on-auto-renew) for a
        workspace billed through Wix.


        **Immediate cancellation with a refund.** When [Preview ILS
        refund](/api-reference/preview-ils-refund) shows you're eligible, send
        `ils_refund_consent: true` to cancel right away and get part of the
        period back. The response then carries `ils_refund`. If an earlier
        immediate cancellation on this subscription refunded you but didn't
        finish, this call finishes it right away, even without consent.


        <Warning>Check `ils_refund.status`. `refund_issued_cancel_failed` means
        you were refunded but the subscription is still active. Call this
        endpoint again to finish cancelling.</Warning>


        **Apps over the Free plan's limit.** If [Get cancellation
        impact](/api-reference/get-cancellation-impact) shows `apps.over_limit:
        true`, send `cancellation_selection.keep_app_ids` to choose which apps
        stay published. When the plan ends, if the workspace is still over the
        limit, every other app is unpublished. Leave `cancellation_selection`
        out to unpublish nothing.


        If a request fails after Base44 reached the payment provider, the
        cancellation may already have taken effect. Cancelling again is safe.


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


        <Warning>Send only the fields documented here. Other request fields
        aren't supported and their behavior can change.</Warning>
      operationId: cancel_subscription_api_billing_cancel_subscription_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CancelSubscriptionRequest'
              default:
                reason: ''
                feedback: ''
                missing_features_description: ''
                ils_refund_consent: false
      responses:
        '200':
          description: >-
            The subscription is canceled, at the end of the period or right
            away.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelSubscriptionResult'
              example:
                success: true
        '400':
          description: >-
            The workspace has no active subscription, or the immediate refund
            couldn't run. The message says why.
        '401':
          description: >-
            Missing or invalid credentials. A read-only token gets this response
            too.
        '403':
          description: You aren't the workspace owner.
        '409':
          description: >-
            You sent `ils_refund_consent: true`, but the plan no longer
            qualifies for an immediate refund. Check [Preview ILS
            refund](/api-reference/preview-ils-refund) again.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
              example:
                detail:
                  - type: bool_parsing
                    loc:
                      - body
                      - ils_refund_consent
                    msg: Input should be a valid boolean, unable to interpret input
                    input: maybe
        '429':
          description: >-
            Rate limit exceeded. The base rate limit is 5 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:
    CancelSubscriptionRequest:
      properties:
        reason:
          type: string
          maxLength: 100
          title: Reason
          description: >-
            Why you're cancelling, up to 100 characters. Saved with the
            cancellation.
          default: ''
          example: Too expensive
        feedback:
          type: string
          maxLength: 2500
          title: Feedback
          description: Anything else you want to tell Base44, up to 2,500 characters.
          default: ''
          example: We only needed it for one launch.
        missing_features_description:
          type: string
          maxLength: 500
          title: Missing Features Description
          description: Features you were missing, up to 500 characters.
          default: ''
          example: A Salesforce connector.
        ils_refund_consent:
          type: boolean
          title: Ils Refund Consent
          description: >-
            `true` to cancel right away and take the refund shown by [Preview
            ILS refund](/api-reference/preview-ils-refund). Ignored when that
            preview isn't eligible, except that a plan that stopped qualifying
            since returns 409. Defaults to `false`.
          default: false
          example: false
        cancellation_selection:
          anyOf:
            - properties:
                keep_app_ids:
                  items:
                    type: string
                  type: array
                  maxItems: 1000
                  description: >-
                    IDs of the apps to keep published, from `apps.items[].id` in
                    [Get cancellation
                    impact](/api-reference/get-cancellation-impact). Only as
                    many as the Free plan allows are kept, in the order you send
                    them, and IDs of apps outside the workspace are ignored.
                  example:
                    - 6820f3a4e7b91d003c45a1f2
              type: object
              title: CancellationSelection
            - type: 'null'
          description: >-
            Which apps stay published if the workspace is over the Free plan's
            app limit when the plan ends. Leave it out to unpublish nothing.
          example:
            keep_app_ids:
              - 6820f3a4e7b91d003c45a1f2
      type: object
      title: CancelSubscriptionRequest
      description: Details of the cancellation. Every field is optional.
    CancelSubscriptionResult:
      properties:
        success:
          type: boolean
          title: Success
          description: Always `true`. A failure returns an error status instead.
          example: true
        ils_refund:
          anyOf:
            - $ref: '#/components/schemas/ImmediateRefund'
            - type: 'null'
          description: >-
            Returned only when the subscription was canceled right away with a
            refund.
      type: object
      required:
        - success
      title: CancelSubscriptionResult
      description: The outcome of a cancellation.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ImmediateRefund:
      properties:
        refund_agorot:
          type: integer
          title: Refund Agorot
          description: >-
            Amount refunded, in the smallest unit of `currency` (agorot for ILS,
            cents for USD).
          example: 4275
        currency:
          type: string
          title: Currency
          description: Lowercase three-letter currency code of the refund.
          example: ils
        status:
          type: string
          title: Status
          description: >-
            `issued`: refunded and canceled. `zero_refund`: canceled, with
            nothing left to refund. `pending_manual`: canceled, and Wix pays the
            refund. `refund_issued_cancel_failed`: refunded, but the
            subscription is still active. Call [Cancel
            subscription](/api-reference/cancel-subscription) again to finish
            cancelling.
          example: issued
        interval:
          anyOf:
            - type: string
            - type: 'null'
          title: Interval
          description: >-
            Billing period of the canceled plan: `monthly` or `yearly`. Not
            returned when the workspace is billed through Wix.
          example: monthly
      type: object
      required:
        - refund_agorot
        - currency
        - status
      title: ImmediateRefund
      description: The refund paid by an immediate cancellation.
    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.