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

# Connect your app to Chargebee

> Connect your app to Chargebee, a subscription billing and revenue management platform, to manage customers, subscriptions, invoices, checkout, and billing workflows.

export const connector_0 = "Chargebee"

[Chargebee](https://www.chargebee.com/) is a subscription billing and revenue management platform for managing customers, subscriptions, invoices, payments, product catalog data, hosted checkout, and billing portal flows. The Chargebee connector lets your Lovable app call the Chargebee API through a workspace-level connection.

With Chargebee, your app can:

* List and manage customers and subscriptions
* Read invoices, credit notes, payments, and orders
* Build billing workflows around products and item prices
* Create hosted checkout pages and billing portal flows

The Chargebee connector is a good fit when your app needs subscription billing data, customer billing workflows, or internal tools backed by your Chargebee account.

## Common use cases and example apps

| Example app                  | Example prompt                                                                                                                 | Description                                                                                                                                                                                    |
| :--------------------------- | :----------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Customer billing portal      | *Use Chargebee and build a customer billing portal where customers can view their subscription, invoices, and payment status.* | **Give customers access to billing information from Chargebee.**<br />The app reads customer, subscription, invoice, and payment data from Chargebee and presents it in a self-service portal. |
| Subscription admin dashboard | *Use Chargebee and build an admin dashboard for searching customers, viewing subscriptions, and checking invoice status.*      | **Help operators manage subscription accounts in one place.**<br />The app lists Chargebee customers and subscriptions so support or finance teams can investigate account status.             |
| Checkout flow                | *Use Chargebee and build a checkout flow that creates hosted checkout pages for subscription plans.*                           | **Start subscription checkout from your app.**<br />The app creates Chargebee hosted checkout pages and redirects customers to complete subscription signup.                                   |
| Revenue reporting app        | *Use Chargebee and build a revenue dashboard showing recent invoices, payments, credit notes, and orders.*                     | **Turn billing activity into operational reporting.**<br />The app reads Chargebee billing records and summarizes recent revenue activity for your team.                                       |
| Plan management tool         | *Use Chargebee and build an internal tool for reviewing products, item prices, and subscription plan details.*                 | **Surface product catalog data from Chargebee.**<br />The app reads Chargebee product and price data so teams can inspect plans without leaving the app.                                       |
| Renewal workflow tracker     | *Use Chargebee and build a workflow tracker for upcoming subscription renewals and failed payments.*                           | **Track billing events that need follow-up.**<br />The app uses Chargebee subscription and payment data to highlight accounts that need attention.                                             |

## How to connect Chargebee

Workspace **admins** and **owners** can connect Chargebee.

You can create multiple Chargebee connections using different API keys, which is useful for separating environments (for example, test and production) or connecting different Chargebee sites.

When the connection is created, Chargebee becomes available across all projects in the workspace. Anyone building in a project can ask Lovable in chat to link their project to it.

### Prerequisites

Before connecting Chargebee, make sure you have:

* A Chargebee account
* Your Chargebee site name, for example `acme-test` from `https://acme-test.chargebee.com`
* A Chargebee API key
* Lovable workspace owner or admin role

<Note>
  All API requests made through this connector use your Chargebee account. API usage, limits, and billing are handled directly by Chargebee, not Lovable.
</Note>

### Step 1: Get your Chargebee site name and API key

A Chargebee API key lets your Lovable app authenticate with the Chargebee API for your connected site. You can create separate keys for different environments or apps.

To find your site name and create a Chargebee API key:

<Steps>
  <Step title="Open your Chargebee site">
    Sign in to [Chargebee](https://app.chargebee.com/login) with the account for the site you want to connect.
  </Step>

  <Step title="Note your site name">
    Copy the site name from your Chargebee URL. For example, if your Chargebee URL is `https://acme-test.chargebee.com`, enter `acme-test` in Lovable.
  </Step>

  <Step title="Open API keys">
    Follow Chargebee's API key instructions to open the API keys area for your site.
  </Step>

  <Step title="Create or copy an API key">
    Create a key for Lovable or copy an existing key with permissions for the Chargebee API actions your app needs. Use a descriptive name, for example `Lovable integration`.
  </Step>

  <Step title="Copy the key">
    Copy the API key and store it securely.
  </Step>
</Steps>

<Warning>
  Your API key functions like a password. Keep it secure and never share it publicly. You need it in the next step.
</Warning>

See Chargebee documentation for more: [Chargebee API getting started](https://apidocs.chargebee.com/docs/api/getting-started#get-your-api-key).

### Step 2: Connect Chargebee to Lovable

You can create multiple connections using different API keys.

<Steps>
  <Step title="Open Chargebee in Connectors">
    Go to **Connectors → App connectors** and select **Chargebee**.
  </Step>

  <Step title="Add a connection">
    Click **Add connection**.
  </Step>

  <Step title="Configure the connection">
    * **Display name**: name the connection, for example `Chargebee Prod` or `Chargebee Test`.
    * **Site name**: enter your Chargebee site name without `.chargebee.com`, for example `acme-test`.
    * **API key**: paste your Chargebee API key.
  </Step>

  <Step title="Choose who can access this connection">
    Under **Who can access this connection**, decide who in your workspace can use the connection:

    * **Only you** (default): only the person creating the connection can use it and its associated data.
    * **Invite specific people**: only you and explicitly added workspace members can use the connection and its associated data.
    * **Invite entire workspace**: click **Invite entire workspace** to make the connection available to everyone in your Lovable workspace.

    See [Connection-level access](/integrations/introduction#connection-level-access) for more information.
  </Step>

  <Step title="Connect">
    Click **Connect**.
  </Step>
</Steps>

When connected, anyone building in a project can ask Lovable in chat to link their project to Chargebee (based on configured connection-level access). Your Lovable apps can then manage customers, subscriptions, invoices, checkout, and billing workflows through Chargebee.

## Limitations

The Chargebee connector cannot:

* Create or manage your Chargebee account or site configuration
* Receive Chargebee webhooks directly through the connector
* Rotate API keys automatically. To rotate a key, create a new key in Chargebee and update the Lovable connection
* Support per-end-user Chargebee login. Each connection represents a single Chargebee account shared across all projects linked to it
* Bypass Chargebee API permissions, limits, or billing rules for your account

## How to unlink projects from a {connector_0} connection

Editors and above can remove specific projects from a connection without deleting the connection entirely. The connection will remain available for other projects.

To unlink projects:

<Steps>
  <Step title="Open Connectors">
    Open **Connectors**, then go to **App connectors**, and select **{connector_0}**.
  </Step>

  <Step title="Open the connection">
    Open the connection you want to manage.
  </Step>

  <Step title="Select projects">
    Under **Linked projects**, check the projects you want to unlink.
  </Step>

  <Step title="Confirm">
    Click **Unlink projects** and confirm.
  </Step>
</Steps>

When unlinked, those projects will no longer have access to {connector_0} through this connection. If a project needs {connector_0} again, you can link it to any available connection.

## How to delete a {connector_0} connection

Workspace admins and owners can delete {connector_0} connections. Other members can delete a connection if they created it, or if they have been explicitly granted access to it.

<Warning>
  Deleting a connection is permanent and cannot be undone. It will remove the credentials from all linked projects, and any apps using this connection will stop working until a new connection is added.
</Warning>

Before deleting, review the **Linked projects** section to see which projects are currently using the connection.

To delete a connection:

<Steps>
  <Step title="Open Connectors">
    Open **Connectors**, then go to **App connectors**, and select **{connector_0}**.
  </Step>

  <Step title="Open the connection">
    Open the connection you want to remove.
  </Step>

  <Step title="Review linked projects">
    Review the **Linked projects** section.
  </Step>

  <Step title="Delete">
    Under **Delete this connection**, click **Delete** and confirm.
  </Step>
</Steps>
