> ## Documentation Index
> Fetch the complete documentation index at: https://docs.theomnibot.io/llms.txt
> Use this file to discover all available pages before exploring further.

# SaaS Management: Accounts, Plans, Billing, and Quotas

> Manage sub-accounts, configure pricing plans with resource quotas, connect Stripe for automated billing, and share channel app credentials with clients.

The SaaS section of your white-label portal gives you full control over every aspect of running a chatbot-as-a-service business. From here you create and manage client accounts, define the feature tiers you sell, connect Stripe to automate subscription billing, and share channel credentials so your clients can connect Meta, Google, TikTok, and Zalo without setting up their own developer apps.

## Managing Sub-Accounts

Sub-accounts are the individual client accounts that live on your portal. Each operates independently with its own login credentials, workspaces, and resource quotas. Manage them under **SaaS → Sub-accounts**.

### How Accounts Are Created

| Method                            | How it works                                                                                                                                                       |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Client self-registration**      | A client visits your portal's signup page and completes the registration form. The system creates the account automatically and assigns them to your default plan. |
| **Manual administrator creation** | You create the account directly from the admin dashboard, useful when onboarding clients without requiring them to sign up themselves.                             |

#### Create a Sub-Account Manually

<Steps>
  <Step title="Open the creation form">
    In **SaaS → Sub-accounts**, click **+ Create sub-account** in the top-right corner.
  </Step>

  <Step title="Enter account details">
    Fill in the required fields:

    * **Email** — the client's login email address.
    * **Name** — the client's display name or business name.
    * **Password** — the initial login password (minimum 8 characters).
  </Step>

  <Step title="Create the account">
    Click **Create sub-account**. The new account appears in the list with an **Active** status and is assigned to the default plan.
  </Step>
</Steps>

### Admin Actions on a Sub-Account

Click the three-dot `...` menu on any sub-account row to access quick administrative tasks:

| Action                          | Description                                                                                                                     |
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| **Manage pricing plan**         | Manually assign a different plan to a client, or customize their resource limits individually without affecting other accounts. |
| **Send password reset request** | Sends an automated password reset email to the client. The email content follows your **Forgot Password Email** template.       |
| **Delete sub-account**          | Permanently deletes the client's account including all workspaces, credentials, and data.                                       |

<Warning>
  Deleting a sub-account is permanent and cannot be undone. Ensure your client has backed up any important data before you perform this action.
</Warning>

## Managing Plans

Plans define the service tiers you sell or assign to clients. Each Plan sets available resources, message allowances, and pricing. Manage Plans under **SaaS → Plans**.

### Public Pricing Page

ChatbotX automatically generates a public pricing page at `https://[your-domain]/portal/pricing` from Plans that have both **Public** and **Active** enabled. Use **Copy URL** to share it or **View pricing page** to preview what clients see. The **Upgrade plan** button inside each client account also links to this page.

### Create a New Plan

<Steps>
  <Step title="Open the new Plan form">
    Go to **SaaS → Plans** and select **+ New plan**.
  </Step>

  <Step title="Enter information and limits">
    Fill in the basic configuration:

    | Option                     | Description                                                                                     |
    | -------------------------- | ----------------------------------------------------------------------------------------------- |
    | **Name**                   | The Plan name shown to administrators and clients.                                              |
    | **Description (optional)** | A brief description of the intended customer or the Plan's primary value.                       |
    | **Free trial (days)**      | Enter `0` for no trial. Enter a number to grant full Plan access at no cost for that many days. |
    | **Sort order**             | Controls the display order on the public pricing page.                                          |
    | **Public**                 | Show the Plan on the pricing page. Hidden Plans can still be assigned manually.                 |
    | **Active**                 | Allow new customers to purchase this Plan. Inactive Plans do not affect existing subscribers.   |
  </Step>

  <Step title="Set resource and usage limits">
    Configure the caps that apply across the client's entire account:

    **Resource limits:**

    | Limit            | How it works                                                           |
    | ---------------- | ---------------------------------------------------------------------- |
    | **Workspaces**   | Total number of workspaces the client can create.                      |
    | **Channels**     | Total number of channels the client can connect across all workspaces. |
    | **Team members** | Total number of members the client can add to the account.             |

    **Usage limits:**

    | Limit                       | How it works                                                                                                    |
    | --------------------------- | --------------------------------------------------------------------------------------------------------------- |
    | **Monthly active contacts** | Maximum active contacts per month across the entire account.                                                    |
    | **Bot messages**            | Total messages sent by the Bot. Choose **Lifetime** (never resets) or **Monthly** (resets each billing period). |

    Enable **Unlimited** on any limit to remove the cap. A value of `0` blocks access to that resource entirely.
  </Step>

  <Step title="Add pricing page features">
    Under **Pricing page features**, click **+ Add feature** to add descriptive bullet points to the Plan card (e.g., `24/7 priority support`, `No ChatbotX branding`). These help clients compare Plans but do not change actual limits.
  </Step>

  <Step title="Create the Plan">
    Click **Create plan**, then open the Plan's details page to add one or more prices under **Linked prices**.
  </Step>
</Steps>

### Plan Prices

You can link a Manual/Offline price or a Stripe price to each Plan. Select **Manual / Offline** when you confirm payments yourself, or select **Stripe** to automate subscription collection. Connect Stripe before adding a Stripe price.

### Top-Up Packs

Top-up packs sell additional bot-message credits on top of a Plan allowance. Access them from the **Top-up packs** button on the Plans page or via **SaaS → Top-up packs**. Each pack requires a one-time Stripe Price ID.

<Note>
  Top-up packs add bot-message credits only. They do not change the Plan's limits for Workspaces, Channels, Team members, or Monthly active contacts.
</Note>

## Stripe Billing Automation

Connecting your own Stripe account enables automatic subscription charging and renewal for your clients.

### Connect Stripe

<Steps>
  <Step title="Get your Stripe Secret Key">
    Log in to your Stripe dashboard, open the **Developers** menu, select the **API keys** tab, and copy the **Secret key** (begins with `sk_live_` for live or `sk_test_` for test environments).
  </Step>

  <Step title="Open Payment Processor">
    In your portal admin dashboard, go to **SaaS → Payment Processor**.
  </Step>

  <Step title="Paste the key and save">
    Paste the Secret key into the **Secret key** field and click **Save configuration**. The system automatically registers a webhook endpoint on your Stripe account. A green checkmark and a **registered** label confirm the connection is active.
  </Step>
</Steps>

<Warning>
  Your Stripe Secret Key is stored fully encrypted but is highly sensitive. Never share it in public documents, video tutorials, or frontend source code.
</Warning>

### Create Products and Recurring Pricing in Stripe

Before linking a Stripe price to a Plan, create the product in Stripe:

<Steps>
  <Step title="Create a product">
    In the Stripe dashboard, open **Product catalog** and click **+ Create product**. Enter the plan name, a short description, and select **Recurring** pricing.
  </Step>

  <Step title="Configure billing period">
    Set the billing cycle — **Monthly** or **Yearly** are the most common.
  </Step>

  <Step title="Select a pricing model">
    Choose from **Flat rate**, **Tiered pricing**, or **Usage-based**, then configure the advanced pricing details for your chosen model.
  </Step>

  <Step title="Create and copy the Price ID">
    Click **Add product** to create it. Then click the product action menu and select **Copy price ID**. The ID begins with `price_`.
  </Step>
</Steps>

Paste the `price_` ID into the **Stripe price ID** field when adding a price to a Plan in the portal.

## Workspaces and Quotas

Monitor client consumption by opening **SaaS → Sub-accounts** and reviewing each account's plan assignment and usage. Use **Manage pricing plan** on any account row to adjust their plan or override resource limits individually when needed.

## Shared App Credentials

To let clients connect Meta (Facebook, Instagram), Google, TikTok, and Zalo channels without creating their own developer apps, configure shared app credentials at the platform level under **Platform** settings. Clients can then authorize their channel connections using your platform's app, reducing friction during their onboarding.
