> For the complete documentation index, see [llms.txt](https://integrations.drivetrain.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://integrations.drivetrain.ai/integration-guide/readme/billing-and-invoicing/integrating-with-chargebee.md).

# Integrating with Chargebee

Pull Chargebee subscription and MRR data into Drivetrain for real-time revenue planning. Covers API key creation, site name setup, and completing setup.

[Prerequisites](#prerequisites)

[Chargebee Setup](#chargebee-setup)\
[Create an API key](#create-an-api-key)\
[Find Subdomain](#find-subdomain)

### Prerequisites <a href="#prerequisites" id="prerequisites"></a>

To connect Chargebee to Drivetrain, you need:

* An active Chargebee account
* Admin privileges on Chargebee

### Chargebee Setup <a href="#chargebee-setup" id="chargebee-setup"></a>

#### Create an API key <a href="#create-an-api-key" id="create-an-api-key"></a>

1. Login to your [Chargebee account](https://app.chargebee.com/login)
2. Navigate to **Settings > Configure Chargebee**

<figure><img src="https://4220329029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBZR0D9lq6jrI895OuOU%2Fuploads%2Fgit-blob-6250d154303eb730019f390a89f905165b76944f%2FChargebee-1.png?alt=media" alt=""><figcaption></figcaption></figure>

3. Scroll down to the **API Keys and Webhooks** section and Click **API Keys** tab

<figure><img src="https://4220329029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBZR0D9lq6jrI895OuOU%2Fuploads%2Fgit-blob-5095a860e3d5d919bc6dc37772c1c60e61acaedc%2FChargebee-2.png?alt=media" alt=""><figcaption></figcaption></figure>

4. Click **Add API Key** to create a new API key

<figure><img src="https://4220329029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBZR0D9lq6jrI895OuOU%2Fuploads%2Fgit-blob-573890f2b973dc091fe847c13fc0bb49ee9e82fc%2FChargebee-3.png?alt=media" alt=""><figcaption></figcaption></figure>

5. Select **Read-only Key**.
6. Select **All** and enter name as "**Drivetrain Integration**" for the API key, then click **Create Key**.

<figure><img src="https://4220329029-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FmBZR0D9lq6jrI895OuOU%2Fuploads%2Fgit-blob-d36a8e6965445c6d7c9421ffeecc7be4541d5cc0%2FChargebee-4.png?alt=media" alt=""><figcaption></figcaption></figure>

7. Find the API key you just created on the next page and make a note of it in a secure document

#### Find Subdomain <a href="#find-subdomain" id="find-subdomain"></a>

Find your account's subdomain in your Chargebee URL and make a note of it. For example, if your Chargebee URL is `https://drivetrain-test.chargebee.com`, then your subdomain is `drivetrain-test`.

{% hint style="info" %}
That’s it! Share the API key and Subdomain with your customer success manager or data integrations manager so that they can get started!
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://integrations.drivetrain.ai/integration-guide/readme/billing-and-invoicing/integrating-with-chargebee.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
