# Chargebee setup for PopMCP

You end up with two values: your Chargebee site name (the part before .chargebee.com) and a full-access API key that starts with live_ or test_.

- Auth: API credentials
- Setup time: 4 min
- API base URL: https://{site}.chargebee.com/api/v2
- Credentials screen: https://app.chargebee.com/login
- Provider docs: https://apidocs.chargebee.com/docs/api

## Before you begin

- A Chargebee Billing site, live or test
- An Admin or Owner user. The API Keys screen is hidden from users without configuration rights
- Decide up front whether you are connecting the live site or the test site. Keys never work across the two

## Get your credentials

### 1. Sign in and note your site name

Sign in at app.chargebee.com/login and read the address bar. In `https://acme.chargebee.com` the site name is `acme`, and that is what PopMCP's Site name field wants.

Screen: https://app.chargebee.com/login

### 2. Open the API keys screen

Go to Settings → Configure Chargebee → API Keys and Webhooks, then click the API Keys tab.

### 3. Add a full-access key

Click + Add API Key, select Full-Access Key, name it `PopMCP`, and click Create Key.

### 4. Copy the key and paste both values into PopMCP

Copy the key from the dialog and paste it into PopMCP's API key field, then type your site name into Site name.

## Fields PopMCP asks for

- Site name (site) [required]: Your Chargebee site subdomain: the part before .chargebee.com. You can paste the full URL (https://acme.chargebee.com) too. For a test site use the full name including -test (e.g. acme-test).
- API key (apiKey) [required]: Chargebee → Settings → Configure Chargebee → API Keys & Webhooks → API Keys → create/copy a Full-Access key. Stored encrypted; used server-side only. A read-only key works too but will reject writes.

## Verify

PopMCP shows the Chargebee connection as Connected and a customer or subscription list tool returns records from your site.

## Troubleshooting

### 401 Unauthorized

Cause: The key belongs to the other environment, or it was disabled on the API Keys tab.

Fix: Open API Keys on the exact site you typed into PopMCP and create a new full-access key there.

### Requests fail before Chargebee answers, or the host is not found

Cause: The Site name field holds the full URL, a trailing slash, or is missing the -test suffix.

Fix: Enter just the subdomain, for example acme or acme-test.

### Write tools return an error but reads work

Cause: You pasted a read-only key.

Fix: Create a Full-Access Key and reconnect.

### You closed the dialog before copying the key

Cause: Chargebee shows the full value once and stores only a masked version afterwards.

Fix: Delete that key and add a new one.

### 429 Too Many Requests

Cause: Per-minute request or concurrency limit hit.

Fix: Retry after about a minute, or contact Chargebee support for a higher limit on your plan.

---

Source: https://www.docs.popmcp.com/docs/integrations/chargebee/