# Chargebee — Pipedream Connect

> Automated Subscription Billing Software

- API slug: `chargebee` (use in MCP headers and tool keys)
- Auth: API key (Pipedream-managed)
- Categories: Commerce
- Website: https://www.chargebee.com/
- This page (HTML): https://pipedream.com/apps/chargebee
- Tools: 4 actions · 20 triggers

## Connect via MCP (recommended)

- Endpoint: `https://remote.mcp.pipedream.net/v3`
- Headers: `Authorization: Bearer <token>` · `x-pd-project-id` · `x-pd-environment` · `x-pd-external-user-id` · `x-pd-app-slug: chargebee`

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "chargebee",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// e.g. run Create Customer:
const result = await mcp.callTool({
  name: "chargebee-create-customer",
  arguments: {
    id: "ID",
    firstName: "First Name",
  },
})
```

Docs: [MCP guide](https://pipedream.com/docs/connect/mcp/developers.md)

## API proxy

For a Chargebee endpoint with no pre-built tool, the proxy forwards your request with the connected user's credentials attached.

```bash
# The path segment is the target URL, URL-safe base64 encoded:
# https://api.example.com/v1/me

curl "https://api.pipedream.com/v1/connect/{project_id}/proxy/aHR0cHM6Ly9hcGkuZXhhbXBsZS5jb20vdjEvbWU?external_user_id={external_user_id}&account_id=apn_xxxxxxx" \
  -H "Authorization: Bearer {access_token}" \
  -H "x-pd-environment: production"
```

Docs: [API proxy guide](https://pipedream.com/docs/connect/api-proxy.md)

## SDK

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "chargebee-create-customer",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    chargebee: { authProvisionId: "apn_xxxxxxx" },
    id: "ID",
    firstName: "First Name",
  },
})
```

Docs: [Managed auth guide](https://pipedream.com/docs/connect/managed-auth/quickstart.md) · [Tools guide](https://pipedream.com/docs/connect/components.md)

## Actions (4)

### `chargebee-create-customer` — Create Customer (Write)

Create a customer in Chargebee. See the documentation

Full schema: https://pipedream.com/apps/chargebee/actions/create-customer.md

### `chargebee-create-subscription` — Create Subscription (Write)

Create a new subscription for an existing customer. See the documentation

Full schema: https://pipedream.com/apps/chargebee/actions/create-subscription.md

### `chargebee-list-customer-id-options` — List Customer ID Options (Read-only)

Retrieves available options for the Customer ID field.

Full schema: https://pipedream.com/apps/chargebee/actions/list-customer-id-options.md

### `chargebee-list-item-price-id-options` — List Plan Item Price ID Options (Read-only)

Retrieves available options for the Plan Item Price ID field.

Full schema: https://pipedream.com/apps/chargebee/actions/list-item-price-id-options.md

## Triggers (20)

### `chargebee-customer-card-expired-instant` — Customer Card Expired (Instant) (Instant)

Emit new event when a customer card has expired. See the Documentation. Please make sure once you deploy this source, you copy/paste the webhook URL to create it in your Chargebee Webhook settings.

Full schema: https://pipedream.com/apps/chargebee/triggers/customer-card-expired-instant.md

### `chargebee-customer-changed-instant` — Customer Changed (Instant) (Instant)

Emit new event when a customer is changed. See the Documentation. Please make sure once you deploy this source, you copy/paste the webhook URL to create it in your Chargebee Webhook settings.

Full schema: https://pipedream.com/apps/chargebee/triggers/customer-changed-instant.md

### `chargebee-new-customer-created-instant` — New Customer Created (Instant) (Instant)

Emit new event when a new customer is created. See the Documentation. Please make sure once you deploy this source, you copy/paste the webhook URL to create it in your Chargebee Webhook settings.

Full schema: https://pipedream.com/apps/chargebee/triggers/new-customer-created-instant.md

### `chargebee-new-event` — New Event (Instant) (Instant)

Emit new event when the selected event is triggered. See the Documentation. Please make sure once you deploy this source, you copy/paste the webhook URL to create it in your Chargebee Webhook settings.

Full schema: https://pipedream.com/apps/chargebee/triggers/new-event.md

### `chargebee-new-invoice-created-instant` — New Invoice Created (Instant) (Instant)

Emit new event when a new invoice is created. See the Documentation. Please make sure once you deploy this source, you copy/paste the webhook URL to create it in your Chargebee Webhook settings.

Full schema: https://pipedream.com/apps/chargebee/triggers/new-invoice-created-instant.md

### `chargebee-new-invoice-updated-instant` — New Invoice Updated (Instant) (Instant)

Emit new event when a new invoice is updated. See the Documentation. Please make sure once you deploy this source, you copy/paste the webhook URL to create it in your Chargebee Webhook settings.

Full schema: https://pipedream.com/apps/chargebee/triggers/new-invoice-updated-instant.md

### `chargebee-payment-refunded-instant` — New Payment Refunded (Instant) (Instant)

Emit new event when a payment is refunded. See the Documentation. Please make sure once you deploy this source, you copy/paste the webhook URL to create it in your Chargebee Webhook settings.

Full schema: https://pipedream.com/apps/chargebee/triggers/payment-refunded-instant.md

### `chargebee-new-payment-source-added-instant` — New Payment Source Added (Instant) (Instant)

Emit new event when a new payment source is added. See the Documentation. Please make sure once you deploy this source, you copy/paste the webhook URL to create it in your Chargebee Webhook settings.

Full schema: https://pipedream.com/apps/chargebee/triggers/new-payment-source-added-instant.md

### `chargebee-subscription-activated-instant` — New Subscription Activated (Instant) (Instant)

Emit new event when a subscription is activated. See the Documentation. Please make sure once you deploy this source, you copy/paste the webhook URL to create it in your Chargebee Webhook settings.

Full schema: https://pipedream.com/apps/chargebee/triggers/subscription-activated-instant.md

### `chargebee-subscription-created-instant` — New Subscription Created (Instant) (Instant)

Emit new event when a new subscription is created. See the Documentation. Please make sure once you deploy this source, you copy/paste the webhook URL to create it in your Chargebee Webhook settings.

Full schema: https://pipedream.com/apps/chargebee/triggers/subscription-created-instant.md

### `chargebee-subscription-renewed-instant` — New Subscription Renewed (Instant) (Instant)

Emit new event when a subscription is renewed. See the Documentation. Please make sure once you deploy this source, you copy/paste the webhook URL to create it in your Chargebee Webhook settings.

Full schema: https://pipedream.com/apps/chargebee/triggers/subscription-renewed-instant.md

### `chargebee-payment-failed-instant` — Payment Failed (Instant) (Instant)

Emit new event when a payment is failed. See the Documentation. Please make sure once you deploy this source, you copy/paste the webhook URL to create it in your Chargebee Webhook settings.

Full schema: https://pipedream.com/apps/chargebee/triggers/payment-failed-instant.md

### `chargebee-payment-source-updated-instant` — Payment Source Updated (Instant) (Instant)

Emit new event when a payment source is updated. See the Documentation. Please make sure once you deploy this source, you copy/paste the webhook URL to create it in your Chargebee Webhook settings.

Full schema: https://pipedream.com/apps/chargebee/triggers/payment-source-updated-instant.md

### `chargebee-payment-succeeded-instant` — Payment Succeeded (Instant) (Instant)

Emit new event when a payment is successful. See the Documentation. Please make sure once you deploy this source, you copy/paste the webhook URL to create it in your Chargebee Webhook settings.

Full schema: https://pipedream.com/apps/chargebee/triggers/payment-succeeded-instant.md

### `chargebee-subscription-cancellation-scheduled-instant` — Subscription Cancellation Scheduled (Instant) (Instant)

Emit new event when a subscription cancellation is scheduled. See the Documentation. Please make sure once you deploy this source, you copy/paste the webhook URL to create it in your Chargebee Webhook settings.

Full schema: https://pipedream.com/apps/chargebee/triggers/subscription-cancellation-scheduled-instant.md

### `chargebee-subscription-cancelled-instant` — Subscription Cancelled (Instant) (Instant)

Emit new event when a subscription is cancelled. See the Documentation. Please make sure once you deploy this source, you copy/paste the webhook URL to create it in your Chargebee Webhook settings.

Full schema: https://pipedream.com/apps/chargebee/triggers/subscription-cancelled-instant.md

### `chargebee-subscription-changed-instant` — Subscription Changed (Instant) (Instant)

Emit new event when a subscription is changed. See the Documentation. Please make sure once you deploy this source, you copy/paste the webhook URL to create it in your Chargebee Webhook settings.

Full schema: https://pipedream.com/apps/chargebee/triggers/subscription-changed-instant.md

### `chargebee-subscription-paused-instant` — Subscription Paused (Instant) (Instant)

Emit new event when a subscription is paused. See the Documentation. Please make sure once you deploy this source, you copy/paste the webhook URL to create it in your Chargebee Webhook settings.

Full schema: https://pipedream.com/apps/chargebee/triggers/subscription-paused-instant.md

### `chargebee-subscription-reactivated-instant` — Subscription Reactivated (Instant) (Instant)

Emit new event when a subscription is reactivated. See the Documentation. Please make sure once you deploy this source, you copy/paste the webhook URL to create it in your Chargebee Webhook settings.

Full schema: https://pipedream.com/apps/chargebee/triggers/subscription-reactivated-instant.md

### `chargebee-subscription-resumed-instant` — Subscription Resumed (Instant) (Instant)

Emit new event when a subscription is resumed. See the Documentation. Please make sure once you deploy this source, you copy/paste the webhook URL to create it in your Chargebee Webhook settings.

Full schema: https://pipedream.com/apps/chargebee/triggers/subscription-resumed-instant.md

---

- All apps: https://pipedream.com/apps — index: https://pipedream.com/llms.txt
- Pipedream docs for agents: https://pipedream.com/docs/llms.txt
