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

# Create billing portal session

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

Creates a link to the Stripe customer portal for your workspace. The link opens a hosted page: open it in a browser, and the workspace owner updates the card, downloads invoices, or manages the plan there. Nothing in the portal can be completed through the API. Only the workspace owner can create the link.

When the person leaves the portal, Stripe sends them back to the Base44 billing page.

Set `flow_type` to choose what the portal offers. A workspace billed through Wix, or one still on a free migration trial, always gets `manage_no_cancel` unless you ask for `payment_method_update`. Manage a Wix-billed plan with [Change Wix plan](/api-reference/change-wix-plan), and its card with [Create payment method update session](/api-reference/create-payment-method-update-session).

The base rate limit is 20 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/create-portal-session
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/create-portal-session:
    post:
      summary: Create billing portal session
      description: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        Creates a link to the Stripe customer portal for your workspace. The
        link opens a hosted page: open it in a browser, and the workspace owner
        updates the card, downloads invoices, or manages the plan there. Nothing
        in the portal can be completed through the API. Only the workspace owner
        can create the link.


        When the person leaves the portal, Stripe sends them back to the Base44
        billing page.


        Set `flow_type` to choose what the portal offers. A workspace billed
        through Wix, or one still on a free migration trial, always gets
        `manage_no_cancel` unless you ask for `payment_method_update`. Manage a
        Wix-billed plan with [Change Wix plan](/api-reference/change-wix-plan),
        and its card with [Create payment method update
        session](/api-reference/create-payment-method-update-session).


        The base rate limit is 20 requests per hour per user. See [Rate
        limits](/developers/references/apps-api/get-started/rate-limits) for the
        multiplier your plan gets.
      operationId: create_portal_session_api_billing_create_portal_session_post
      parameters:
        - name: flow_type
          in: query
          required: false
          schema:
            type: string
            description: >-
              What the portal offers. `default` opens the full portal,
              `payment_method_update` goes straight to updating the card, and
              `manage_no_cancel` hides cancelling and changing the plan. Any
              other value acts like `default`.
            default: default
            title: Flow Type
          description: >-
            What the portal offers. `default` opens the full portal,
            `payment_method_update` goes straight to updating the card, and
            `manage_no_cancel` hides cancelling and changing the plan. Any other
            value acts like `default`.
          example: payment_method_update
      responses:
        '200':
          description: A link to the Stripe customer portal.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BillingPageUrl'
              example:
                url: >-
                  https://billing.stripe.com/p/session/live_YWNjdF8xTjNYcm1EcjU2TDg5ZGtL
        '400':
          description: The workspace has no Stripe billing account to manage.
        '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.
        '429':
          description: >-
            Rate limit exceeded. The base rate limit is 20 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:
    BillingPageUrl:
      properties:
        url:
          type: string
          title: Url
          description: >-
            Link to a hosted page. Open it in a browser for a person to finish
            there. Some links work only once or expire, so open it right away
            and don't store it.
          example: >-
            https://billing.stripe.com/p/session/live_YWNjdF8xTjNYcm1EcjU2TDg5ZGtL
      type: object
      required:
        - url
      title: BillingPageUrl
      description: A hosted billing page for a person to open.
  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.