[Cotlet](https://cotlet.dev/index.md) · [Integrations](https://cotlet.dev/integrations.md) · [How it works](https://cotlet.dev/how-it-works.md) · [Use cases](https://cotlet.dev/use-cases.md) · [Security](https://cotlet.dev/security.md) · [For developers](https://cotlet.dev/for-developers.md) · [For automation agencies](https://cotlet.dev/for-agencies.md) · [Blog](https://cotlet.dev/blog.md) · [API docs](https://cotlet.dev/docs.md) · [Help center](https://cotlet.dev/help.md) · [Changelog](https://cotlet.dev/changelog.md) · [Contact](https://cotlet.dev/contact.md) · [Pricing](https://cotlet.dev/pricing.md) · [Sign up](https://cotlet.dev/signup)

# Chargebee API and MCP server

> Yes. Chargebee has a public REST API (v2) for customers, subscriptions, invoices, credit notes and coupons, called with a site API key, and it ships its own MCP servers (checked 14 Oct 2026). The ready-made Data Lookup MCP server retrieves customer, subscription, invoice and payment data, and the Onboarding server creates catalogs on test and sandbox sites only. Writing subscriptions or credit notes through MCP means a site admin builds a custom MCP server, which needs the Latest Product Catalog, and the docs do not list its tools.

Subscription billing platform for SaaS and subscription businesses: customers, subscriptions, invoices, credit notes, coupons and dunning for failed payments in one admin console.

## What is the Chargebee API?

Cotlet's Chargebee API exposes 12 endpoints for your own Chargebee account: find customer, get customer, list subscriptions, get subscription, list invoices, get invoice, list credit notes, change subscription plan, cancel subscription, create credit note, apply coupon and record invoice payment. The find_customer endpoint returns customers matching an email, company or name. Each endpoint takes simple JSON inputs like subscription_id, limit or cursor and works both as an operation of the chargebee_read or chargebee_write MCP tool for agents and as a REST call for scripts.

- **Category:** [Invoicing & freelance CRM](https://cotlet.dev/integrations/category/invoicing-freelance-crm.md)
- **Endpoints:** 12 (7 read, 5 write)
- **Updated:** 2026-10-22

Yes. Cotlet is a hosted MCP server and REST API for Chargebee with 12 endpoints (7 read, 5 write): you sign in once in your own cloud browser, your AI agent does the work.

## Does Chargebee have an official API?

Yes. Chargebee has a public REST API (v2) for customers, subscriptions, invoices, credit notes and coupons, called with a site API key, and it ships its own MCP servers (checked 14 Oct 2026). The ready-made Data Lookup MCP server retrieves customer, subscription, invoice and payment data, and the Onboarding server creates catalogs on test and sandbox sites only. Writing subscriptions or credit notes through MCP means a site admin builds a custom MCP server, which needs the Latest Product Catalog, and the docs do not list its tools.

| Task | Chargebee official | Cotlet |
|---|---|---|
| Find customers by email or company | Yes: List customers API; the Data Lookup MCP server also reads customers | Yes |
| List subscriptions by status or plan | Yes: List subscriptions API | Yes |
| List overdue invoices | Yes: List invoices API filters by status and dunning status | Yes |
| Change a subscription plan | Yes: Update subscription for items API; the ready-made MCP cannot do it | Yes |
| Cancel a subscription with credit options | Yes: Cancel subscription for items API | Yes |
| Create a credit note | Yes: Create credit note API; not in the ready-made MCP | Yes |
| Apply a coupon to a subscription | Yes: coupon_ids on the update subscription API | Yes |
| Record an offline payment on an invoice | Yes: Record payment is an invoice operation; also a Zapier action | Yes |

Sources: [Chargebee Docs: MCP servers](https://www.chargebee.com/docs/billing/2.0/ai-in-chargebee/chargebee-mcp), [Chargebee Docs: Custom MCP server](https://www.chargebee.com/docs/billing/2.0/ai-in-chargebee/custom-mcp-server), [Chargebee API reference: Getting started](https://apidocs.chargebee.com/docs/api), [Chargebee Docs: What are the Chargebee API limits?](https://www.chargebee.com/docs/billing/2.0/kb/platform/what-are-the-chargebee-api-limits)

## For AI agents

```text
Yes. Chargebee has a public REST API (v2) for customers, subscriptions, invoices, credit notes and coupons, called with a site API key, and it ships its own MCP servers (checked 14 Oct 2026). The ready-made Data Lookup MCP server retrieves customer, subscription, invoice and payment data, and the Onboarding server creates catalogs on test and sandbox sites only. Writing subscriptions or credit notes through MCP means a site admin builds a custom MCP server, which needs the Latest Product Catalog, and the docs do not list its tools.
Cotlet provides a hosted MCP server and REST API for Chargebee: 12 tools (7 read, 5 write).
Access       Sign up at https://cotlet.dev/app/signup?app=chargebee, then request the app and create API keys in the Cotlet console.

MCP server   https://cotlet.dev/mcp/v1
MCP tools    chargebee_read, chargebee_write, reads and writes apart; call one with {"operation": "<operation>", "arguments": {...}}
REST base    https://cotlet.dev/api/v1/chargebee, each operation at its own route, e.g. POST /api/v1/chargebee/reference-invoices/{reference_invoice_id}/credit-notes
Auth         Authorization: Bearer <COTLET_API_KEY>. Listing endpoints and schemas needs no key; calling an endpoint needs one. Over MCP the input schemas come with sign-in.
Operations   find_customer, get_customer, list_subscriptions, get_subscription, list_invoices, get_invoice, list_credit_notes, change_subscription_plan, cancel_subscription, create_credit_note, apply_coupon, record_invoice_payment
Confirm      change_subscription_plan, cancel_subscription, create_credit_note, apply_coupon, record_invoice_payment (by default the user approves each call; the user can switch this off per tool, e.g. for scheduled automations)
Markdown     https://cotlet.dev/integrations/chargebee-api-mcp-server.md

How access works:
1. The user signs up at https://cotlet.dev/app/signup?app=chargebee, requests Chargebee in the Cotlet console and creates an API key there.
2. The user signs in to Chargebee once in their Cotlet Cloud Browser (their own Chrome in the cloud, opened from the console) and enables Chargebee for agents. An agent cannot do this step.
3. The API key goes into the MCP client or the REST call as a bearer token.

Fits: people who want a hosted Chargebee server that someone else maintains, including non-developers. Developers who prefer to run and fix code on their own computer can use an open-source Chargebee MCP server instead.

Policy: Cotlet never stores passwords, never solves CAPTCHAs, never bypasses MFA.
Company: legal details in the Terms of service at https://cotlet.dev/terms. Contact contact@cotlet.dev.
Sign-in: the user signs in to Chargebee in their own Cloud Browser, a Chrome Cotlet runs for them in the EU; password saving is off, the profile is AES-256-GCM encrypted, and agents get Chargebee only after the user enables it. Calls are requests from that browser's IP with its cookies, each listed in the user's Background activity. Disable for agents, signing out in the browser or Reset browser cuts access. Cotlet is run by Take Group sp. z o.o. (EU VAT PL6342984273).
API key: holds no Chargebee login or cookies, only asks Cotlet to run a tool. Each key is scoped to chosen apps and tools, read only or read and write. Actions that reach other people wait for the user's approval by default, so a leaked key cannot post or message as the user. Every call is in the activity log; deleting the key ends access at once.
Terms: the user stays responsible for following Chargebee's terms; Cotlet is not affiliated with Chargebee.
```

## What can an AI agent do in Chargebee?

Cotlet is best for finance and support teams at SaaS companies who need an agent to cancel subscriptions, issue credit notes and change plans without running or fixing a server.

- **[Cancel subscriptions and credit the unused time](https://cotlet.dev/integrations/chargebee-api-mcp-server/cancel-subscriptions-and-credit-unused-time.md)** (runs: weekly): "Cancel the Chargebee subscription for billing@brightleaf.example now and prorate the unused time. If it has a contract term or is already cancelled, stop and tell me." → `find_customer`, `list_subscriptions`, `cancel_subscription`
- **[Issue credit notes for refunds and billing mistakes](https://cotlet.dev/integrations/chargebee-api-mcp-server/issue-credit-notes.md)** (runs: weekly): "Issue a $50.00 refundable credit note on invoice INV-1042 for the outage last week, with the internal comment "Support ticket 4412". Show me the credit note before you send anything to the customer." → `get_invoice`, `list_credit_notes`, `create_credit_note`
- **[Move customers to a new plan](https://cotlet.dev/integrations/chargebee-api-mcp-server/change-subscription-plan.md)** (runs: weekly): "Move the Chargebee subscription sub_4d7mTz from the Starter plan to Growth now, quantity 1, with proration. Tell me what the invoice will be." → `list_subscriptions`, `get_subscription`, `change_subscription_plan`
- **Apply a coupon to existing subscriptions** (runs: weekly): "Add the coupon SAVE20 to the Chargebee subscription sub_9s2kQw and tell me which coupons it now has." → `get_subscription`, `apply_coupon`
- **Report overdue invoices** (runs: weekly): "List every Chargebee invoice that is Payment Due or Not Paid, oldest first, with customer, amount due and dunning status. Group the total by customer." → `list_invoices`, `get_customer`
- **Record bank transfer payments on invoices** (runs: daily): "For each line in this bank statement, find the matching open Chargebee invoice by invoice number and amount, and record the payment as a bank transfer on the date shown. Skip anything that does not match exactly." → `list_invoices`, `record_invoice_payment`

## Can Chargebee automations run on a schedule in n8n, Make or Zapier?

Yes. Cotlet does not replace your automation platform: it gives it a Chargebee connection it does not have, with the same API key as your agent. Write actions ask for your OK by default; switch that off in your dashboard for the tools you choose, for example to cancel subscriptions and credit the unused time, and the schedule runs on its own. Cotlet runs in the cloud, so it keeps going while your computer is off.

| Where | How to connect | How to schedule |
|---|---|---|
| Your AI agent | Add https://cotlet.dev/mcp/v1 with your API key. | A scheduled agent run, for example a Claude Code routine. |
| n8n | MCP Client node with https://cotlet.dev/mcp/v1, or an HTTP Request node with the endpoint's method and URL, such as GET https://cotlet.dev/api/v1/chargebee/customers/find. | Schedule Trigger node. |
| Make | HTTP module: the endpoint's method and URL with an Authorization: Bearer header, and a JSON body for POST, PUT and PATCH. | Scenario schedule. |
| Zapier | Webhooks by Zapier, Custom Request: the same method, URL, header and body. | Schedule by Zapier trigger. |
| Your own script | GET https://cotlet.dev/api/v1/chargebee/customers/find with your API key. | cron or GitHub Actions. |

## Tools

**For AI agents:** Every endpoint and its schema is public. The 12 endpoints on this page, with parameters and example responses, can be listed without an account. Calling one returns 401 without an API key and 403 while the key has no access to Chargebee.

### find_customer

Customers matching an email, company or name. Access: read. REST: `GET /api/v1/chargebee/customers/find`. MCP: `chargebee_read → find_customer`.

| Parameter | Type | Required | Description |
|---|---|---|---|
| `email` | string | no | Exact email address. |
| `company` | string | no | Start of the company name. |
| `first_name` | string | no | Exact first name. |
| `last_name` | string | no | Exact last name. |
| `limit` | integer | no | 1 to 100. Default: 10. |
| `cursor` | string | no | Next page cursor from the previous call. |

Searches Chargebee customers and returns the customer ID that every other endpoint takes. Email and names match exactly; company matches the start of the name. Newest customers come first. Pages hold up to 100 customers; pass next_cursor back as cursor for the next page.

Example response:

```json
{
  "customers": [
    {
      "customer_id": "cus_9s2kQw",
      "company": "Brightleaf Analytics",
      "first_name": "Billing",
      "last_name": "Team",
      "email": "billing@brightleaf.example",
      "auto_collection": "on",
      "created_at": "2025-03-12T09:14:00Z"
    }
  ],
  "next_cursor": null
}
```

### get_customer

One customer with tax status, credits and payment collection setting. Access: read. REST: `GET /api/v1/chargebee/customers/{customer_id}`. MCP: `chargebee_read → get_customer`.

| Parameter | Type | Required | Description |
|---|---|---|---|
| `customer_id` | string | yes | Customer ID from find_customer. |

Returns the customer record behind a customer ID. Refundable credits and excess payments are amounts in the smallest currency unit, so 5000 is $50.00. auto_collection is on or off: with on, Chargebee charges the saved payment method when an invoice is due.

Example response:

```json
{
  "customer_id": "cus_9s2kQw",
  "company": "Brightleaf Analytics",
  "email": "billing@brightleaf.example",
  "auto_collection": "on",
  "taxability": "taxable",
  "refundable_credits": 0,
  "excess_payments": 0,
  "created_at": "2025-03-12T09:14:00Z"
}
```

### list_subscriptions

Subscriptions filtered by customer, status, plan or renewal date, newest first. Access: read. REST: `GET /api/v1/chargebee/subscriptions`. MCP: `chargebee_read → list_subscriptions`.

| Parameter | Type | Required | Description |
|---|---|---|---|
| `customer_id` | string | no | Only this customer's subscriptions. |
| `status` | enum | no | future, in_trial, active, non_renewing, paused or cancelled. |
| `item_price_id` | string | no | Only subscriptions on this plan price, for example growth-USD-monthly. |
| `next_billing_before` | datetime | no | Only subscriptions renewing before this time. |
| `limit` | integer | no | 1 to 100. Default: 10. |
| `cursor` | string | no | Next page cursor from the previous call. |

Returns subscriptions with status, plan, quantity and next billing date, newest first. Status is one of future, in_trial, active, non_renewing, paused or cancelled. Use it to find who is on a plan or whose subscription renews soon. Pages hold up to 100 subscriptions; pass next_cursor back as cursor for the next page.

Example response:

```json
{
  "subscriptions": [
    {
      "subscription_id": "sub_9s2kQw",
      "customer_id": "cus_9s2kQw",
      "status": "active",
      "item_price_id": "growth-USD-monthly",
      "quantity": 1,
      "next_billing_at": "2026-11-01T00:00:00Z",
      "has_scheduled_changes": false
    }
  ],
  "next_cursor": null
}
```

### get_subscription

One subscription with its items, coupons and any scheduled change. Access: read. REST: `GET /api/v1/chargebee/subscriptions/{subscription_id}`. MCP: `chargebee_read → get_subscription`.

| Parameter | Type | Required | Description |
|---|---|---|---|
| `subscription_id` | string | yes | Subscription ID from list_subscriptions. |

Returns the plan item prices with quantities, the coupons on the subscription, the billing dates and whether a change is scheduled. Read it before changing a plan or cancelling, so you know what the call replaces.

Example response:

```json
{
  "subscription_id": "sub_4d7mTz",
  "customer_id": "cus_4d7mTz",
  "status": "active",
  "items": [
    {
      "item_price_id": "starter-USD-monthly",
      "quantity": 1,
      "unit_price": 9900
    }
  ],
  "coupons": [],
  "has_scheduled_changes": false,
  "current_term_end": "2026-11-01T00:00:00Z",
  "contract_term": null
}
```

### list_invoices

Invoices filtered by customer, subscription, status or date, newest first. Access: read. REST: `GET /api/v1/chargebee/invoices`. MCP: `chargebee_read → list_invoices`.

| Parameter | Type | Required | Description |
|---|---|---|---|
| `customer_id` | string | no | Only this customer's invoices. |
| `subscription_id` | string | no | Only this subscription's invoices. |
| `status` | enum | no | paid, posted, payment_due, not_paid, voided or pending. Several values may be sent comma separated. |
| `dunning_status` | enum | no | in_progress, exhausted, stopped or success. |
| `date_after` | date | no | Only invoices dated after this day. |
| `date_before` | date | no | Only invoices dated before this day. |
| `limit` | integer | no | 1 to 100. Default: 10. |
| `cursor` | string | no | Next page cursor from the previous call. |

Returns invoices with total, amount paid, amount due and dunning status, newest first. Amounts are in the smallest currency unit, so 29900 is $299.00. Overdue invoices are the ones with status payment_due or not_paid, so pass both. Pages hold up to 100 invoices; pass next_cursor back as cursor for the next page.

Example response:

```json
{
  "invoices": [
    {
      "invoice_id": "INV-1042",
      "customer_id": "cus_9s2kQw",
      "status": "paid",
      "total": 29900,
      "amount_paid": 29900,
      "amount_due": 0,
      "date": "2026-10-01",
      "due_date": "2026-10-01",
      "dunning_status": null,
      "currency_code": "USD"
    }
  ],
  "next_cursor": null
}
```

### get_invoice

One invoice with line items, payments and credits applied. Access: read. REST: `GET /api/v1/chargebee/invoices/{invoice_id}`. MCP: `chargebee_read → get_invoice`.

| Parameter | Type | Required | Description |
|---|---|---|---|
| `invoice_id` | string | yes | Invoice ID from list_invoices, for example INV-1042. |

Returns the invoice status, the line items, the amount paid, the credits and adjustments applied and the amount still due, all in the smallest currency unit. Read it before creating a credit note: the status decides which credit note type Chargebee allows.

Example response:

```json
{
  "invoice_id": "INV-1042",
  "customer_id": "cus_9s2kQw",
  "status": "paid",
  "line_items": [
    {
      "description": "Growth plan, monthly",
      "amount": 29900
    }
  ],
  "total": 29900,
  "amount_paid": 29900,
  "credits_applied": 0,
  "amount_adjusted": 0,
  "amount_due": 0,
  "currency_code": "USD"
}
```

### list_credit_notes

Credit notes for a customer or an invoice, newest first. Access: read. REST: `GET /api/v1/chargebee/credit-notes`. MCP: `chargebee_read → list_credit_notes`.

| Parameter | Type | Required | Description |
|---|---|---|---|
| `customer_id` | string | no | Only this customer's credit notes. |
| `invoice_id` | string | no | Only credit notes on this invoice. |
| `type` | enum | no | adjustment or refundable. |
| `limit` | integer | no | 1 to 100. Default: 10. |
| `cursor` | string | no | Next page cursor from the previous call. |

Returns credit notes with type (adjustment or refundable), status and total in the smallest currency unit. Use it to see whether an invoice was already credited before you create another credit note. Pages hold up to 100 credit notes; pass next_cursor back as cursor for the next page.

Example response:

```json
{
  "credit_notes": [
    {
      "credit_note_id": "CN-312",
      "customer_id": "cus_9s2kQw",
      "reference_invoice_id": "INV-1031",
      "type": "refundable",
      "status": "refunded",
      "total": 2000,
      "created_at": "2026-09-09T10:02:00Z"
    }
  ],
  "next_cursor": null
}
```

### change_subscription_plan

Move a subscription to another plan or quantity, now or at renewal. Access: write, asks the user first. REST: `PATCH /api/v1/chargebee/item-prices/{item_price_id}/subscriptions/{subscription_id}/plan`. MCP: `chargebee_write → change_subscription_plan`.

| Parameter | Type | Required | Description |
|---|---|---|---|
| `subscription_id` | string | yes | Subscription ID from list_subscriptions. |
| `item_price_id` | string | yes | The plan price to move to, for example growth-USD-monthly. |
| `quantity` | integer | no | Units of the plan. Default: the current quantity. |
| `apply` | enum | no | immediately or next_renewal. Default: immediately. |
| `prorate` | boolean | no | With apply set to immediately: credit unused time and charge the new plan for the rest of the term. Default: your site setting. |
| `replace_items` | boolean | no | true replaces all items with the one you send, false adds it. Default: true. |

Applies the change in Chargebee's Edit Subscription flow and returns the subscription and any invoice the change created. With apply set to immediately and prorate true, Chargebee credits the unused time on the old plan and charges the new plan for the rest of the term, so the invoice total is the difference. With next_renewal, nothing is invoiced until the renewal. Mandatory addons of the old plan stay unless you remove them. The customer sees the new invoice, so by default you confirm each call; you can switch that off for this tool.

Example response:

```json
{
  "subscription": {
    "subscription_id": "sub_4d7mTz",
    "status": "active",
    "items": [
      {
        "item_price_id": "growth-USD-monthly",
        "quantity": 1,
        "unit_price": 29900
      }
    ],
    "next_billing_at": "2026-11-01T00:00:00Z"
  },
  "invoice": {
    "invoice_id": "INV-1043",
    "status": "payment_due",
    "line_items": [
      {
        "description": "Growth plan, prorated charge",
        "amount": 14950
      },
      {
        "description": "Starter plan, unused time credit",
        "amount": -4950
      }
    ],
    "total": 10000,
    "currency_code": "USD"
  }
}
```

### cancel_subscription

Cancel a subscription now, at the end of the term or on a date. Access: write, asks the user first. REST: `POST /api/v1/chargebee/subscriptions/{subscription_id}/cancel`. MCP: `chargebee_write → cancel_subscription`.

| Parameter | Type | Required | Description |
|---|---|---|---|
| `subscription_id` | string | yes | Subscription ID from list_subscriptions. |
| `cancel_option` | enum | no | immediately, end_of_term, specific_date or end_of_billing_term. For subscriptions without a contract term. Default: immediately. |
| `cancel_at` | datetime | no | With specific_date: when the cancellation takes effect. |
| `credit_option_for_current_term_charges` | enum | no | With immediately: none, prorate, full or consumption_based. Default: your site setting. |
| `refundable_credits_handling` | enum | no | no_action or schedule_refund. Default: your site setting. |
| `contract_term_cancel_option` | enum | no | Required with a contract term: terminate_immediately, end_of_contract_term, specific_date or end_of_subscription_billing_term. The last two need Chargebee Support to enable them. |
| `cancel_reason_code` | string | no | A reason code configured in Chargebee, case-sensitive. Required if your site makes reason codes mandatory. |

Cancels the subscription and returns its new status and any credit notes Chargebee raised. credit_option sets how unused time on an immediate cancellation is credited; leave it out to use your site setting. refundable_credits_handling schedule_refund sends refundable credits back at once, no_action leaves a credit note with refund due. Contract term subscriptions need contract_term_cancel_option. This cancels a customer's service and can move money, so by default you confirm each call; you can switch that off for this tool.

Example response:

```json
{
  "subscription": {
    "subscription_id": "sub_9s2kQw",
    "customer_id": "cus_9s2kQw",
    "status": "cancelled",
    "cancelled_at": "2026-10-16T11:30:00Z"
  },
  "credit_notes": [
    {
      "credit_note_id": "CN-318",
      "type": "refundable",
      "status": "refund_due",
      "total": 14950,
      "reference_invoice_id": "INV-1042"
    }
  ]
}
```

### create_credit_note

Credit all or part of an invoice with a refundable or adjustment credit note. Access: write, asks the user first. REST: `POST /api/v1/chargebee/reference-invoices/{reference_invoice_id}/credit-notes`. MCP: `chargebee_write → create_credit_note`.

| Parameter | Type | Required | Description |
|---|---|---|---|
| `reference_invoice_id` | string | yes | Invoice to credit, from list_invoices. |
| `type` | enum | yes | refundable or adjustment, as the invoice status allows. |
| `total` | integer | no | Credit amount in the smallest currency unit. Use this or line_items. |
| `line_items` | array | no | Invoice lines to credit, with an amount each. Use this or total. |
| `reason_code` | string | no | A reason code configured in Chargebee, case-sensitive. Required if your site makes reason codes mandatory. |
| `comment` | string | no | Internal note, 300 characters at most. Not shown to the customer. |
| `customer_notes` | string | no | Text printed on the credit note PDF, 2000 characters at most. |

Creates a credit note on an invoice and returns it with the updated invoice. The invoice status decides the type: a paid invoice takes only refundable, a payment_due or not_paid invoice only adjustment, a partially paid one either. Pass total or line_items, not both; amounts are in the smallest currency unit, so 5000 is $50.00. A refundable credit note starts with refund due and moves no money until someone refunds it. The comment stays inside Chargebee; customer_notes print on the credit note PDF. This changes what a customer owes or is owed, so by default you confirm each call; you can switch that off for this tool.

Example response:

```json
{
  "credit_note": {
    "credit_note_id": "CN-319",
    "reference_invoice_id": "INV-1042",
    "type": "refundable",
    "status": "refund_due",
    "total": 5000,
    "currency_code": "USD",
    "comment": "Support ticket 4412"
  },
  "invoice": {
    "invoice_id": "INV-1042",
    "status": "paid",
    "total": 29900,
    "amount_paid": 29900,
    "amount_due": 0
  }
}
```

### apply_coupon

Add a coupon to a subscription. Access: write, asks the user first. REST: `POST /api/v1/chargebee/subscriptions/{subscription_id}/coupon/apply`. MCP: `chargebee_write → apply_coupon`.

| Parameter | Type | Required | Description |
|---|---|---|---|
| `subscription_id` | string | yes | Subscription ID from list_subscriptions. |
| `coupon` | string | yes | Coupon ID or coupon code, for example SAVE20. |

Adds the coupon to the subscription's existing coupons and returns the full list. Chargebee lists only coupons that apply to the subscription's plan, and by default allows one fixed and one percentage coupon per subscription. A coupon can be added at any point in the billing cycle. It changes what the customer pays on later invoices, so by default you confirm each call; you can switch that off for this tool.

Example response:

```json
{
  "subscription_id": "sub_9s2kQw",
  "coupons": [
    {
      "coupon_id": "SAVE20"
    }
  ]
}
```

### record_invoice_payment

Record an offline payment, such as a bank transfer, on an open invoice. Access: write, asks the user first. REST: `POST /api/v1/chargebee/invoices/{invoice_id}/payment`. MCP: `chargebee_write → record_invoice_payment`.

| Parameter | Type | Required | Description |
|---|---|---|---|
| `invoice_id` | string | yes | Invoice ID from list_invoices, for example INV-1042. |
| `amount` | integer | yes | Amount received in the smallest currency unit. |
| `payment_method` | string | yes | Offline method as named in the Record payment dialog, for example Bank transfer. |
| `date` | date | no | Day the money arrived. Default: today. |
| `reason_code` | string | no | A reason code configured in Chargebee, if your site uses them. |
| `comment` | string | no | Internal note, for example the bank reference. |

Records a payment received outside Chargebee on a payment_due or not_paid invoice. A partial amount reduces the amount due; an amount above it becomes excess payments on the customer. Amounts are in the smallest currency unit. It marks money as received, so by default you confirm each call; you can switch that off for this tool.

Example response:

```json
{
  "invoice": {
    "invoice_id": "INV-1044",
    "status": "paid",
    "total": 29900,
    "amount_paid": 29900,
    "amount_due": 0
  },
  "payment": {
    "amount": 29900,
    "method": "Bank transfer",
    "date": "2026-10-14"
  }
}
```

## How do I connect Chargebee to Claude Code, Codex or Cursor?

Connecting Chargebee takes three steps: sign up, sign in to Chargebee once in your Cloud Browser and enable it for agents, then add one MCP server or call the REST API with the same key.

### Connect Chargebee to your agent.

1. **Create an account** Sign up and add Chargebee in the console. Your API key is there too.

2. **Sign in to Chargebee in your Cloud Browser** Open your Cloud Browser in the console: your own Chrome in the cloud. Sign in to Chargebee there yourself, the way you always do, then press Enable for agents, read only or read and write. We never save your password, and your agent keeps working even when your computer is off.

3. **Add Cotlet to your agent** Paste the snippet for your client. The same server and key serve every app you connect, so you do this once.

   Claude Code:

```
claude mcp add --transport http cotlet \
  https://cotlet.dev/mcp/v1 \
  --header "Authorization: Bearer $COTLET_API_KEY"
```

   Cursor:

```
{
  "mcpServers": {
    "cotlet": {
      "url": "https://cotlet.dev/mcp/v1",
      "headers": {
        "Authorization": "Bearer ${COTLET_API_KEY}"
      }
    }
  }
}
```

   Codex:

```
# ~/.codex/config.toml
[mcp_servers.cotlet]
url = "https://cotlet.dev/mcp/v1"
bearer_token_env_var = "COTLET_API_KEY"
```

4. **Ask your agent** Ask in plain words. Your agent finds the Chargebee tools on the server and calls them for you; anything that reaches other people waits for your OK unless you switch that off for a tool.

```
Cancel the Chargebee subscription for billing@brightleaf.example now and prorate the unused time. If it has a contract term or is already cancelled, stop and tell me.
```

### Call Chargebee from your scripts.

1. **Export your API key** Your scripts use the same API key as your agent. Keep it in an environment variable, never in your code.

```
export COTLET_API_KEY="cotlet_..."
```

2. **Call a tool** Every tool is an endpoint under /api/v1/chargebee with its own method and path, listed with the endpoints above. Path parameters go in the URL; the other parameters go in the query for GET and DELETE and in a JSON body otherwise.

```
curl -X POST https://cotlet.dev/api/v1/chargebee/reference-invoices/INV-1042/credit-notes \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type":"refundable","total":5000,"comment":"Support ticket 4412"}'
```

3. **Read the result** You get plain JSON back, ready for your script. A failed call costs nothing.

```
{
  "credit_note": {
    "credit_note_id": "CN-319",
    "reference_invoice_id": "INV-1042",
    "type": "refundable",
    "status": "refund_due",
    "total": 5000,
    "currency_code": "USD",
    "comment": "Support ticket 4412"
  },
  "invoice": {
    "invoice_id": "INV-1042",
    "status": "paid",
    "total": 29900,
    "amount_paid": 29900,
    "amount_due": 0
  }
}
```

## Why use Cotlet for Chargebee?

**Built for agents**

- One MCP server for every app you connect.
- The same tools as a REST API for scripts and cron jobs.
- Works with Claude Code, Codex and Cursor.

**Your login stays yours**

- You sign in to Chargebee yourself, in your own Cloud Browser. We never save your password; the profile is encrypted with AES-256-GCM, the cipher 1Password uses.
- A+ on Qualys SSL Labs, securityheaders.com and Mozilla Observatory.
- The model never sees a login.
- No stored passwords, no CAPTCHA solving, no MFA bypass.

**You stay in control**

- Scope each API key: its apps, its tools, read only or read and write.
- Anything that reaches other people waits for your OK, so a leaked key cannot post or message as you.
- Every background request listed in your Background activity. Disable for agents in one click.

**Kept working for you**

- We test every integration every 6 hours.
- When Chargebee changes, the tool pauses until we fix it.
- Failed calls cost nothing.

## Is it safe to connect Chargebee to Cotlet?

Yes. You sign in to Chargebee yourself, in your own Cloud Browser, and we never save your password. Your agents only get Chargebee once you enable it, and every background request is listed. The browser profile is stored encrypted with AES-256-GCM, the same cipher 1Password uses for its vaults and Apple for iCloud Keychain. Independent public scanners grade cotlet.dev A+ and find it clean; click a result to rerun it yourself.

- **A+ on Qualys SSL Labs**: Encryption in transit: TLS setup and certificates, on all four server addresses. [Live result](https://www.ssllabs.com/ssltest/analyze.html?d=cotlet.dev)
- **A+ on securityheaders.com**: Browser protections sent with every page, all six headers present. [Live result](https://securityheaders.com/?q=cotlet.dev&followRedirects=on)
- **A+ on Mozilla Observatory**: Mozilla's web security baseline: score 120 of 100, 12 of 12 tests passed. [Live result](https://developer.mozilla.org/en-US/observatory/analyze?host=cotlet.dev)
- **Clean on Sucuri SiteCheck**: No malware, spam or defacement, and not on any of 9 blocklists, Google Safe Browsing included. [Live result](https://sitecheck.sucuri.net/results/cotlet.dev)

[How Cotlet protects your access](https://cotlet.dev/security.md)

### Common concerns

**Who runs Cotlet?**

Cotlet is run by Take Group, a Polish software company working since 2019. Take Group runs about 3,200 websites on its own systems and has its own DevOps team for infrastructure security. We built and used integrations like this inside the company for years before opening them as Cotlet.

**Is this an official Chargebee integration?**

No, Cotlet is independent of Chargebee. Chargebee's own API is too limited for this work. Cotlet works through your own Chargebee account, the way you use Chargebee in the browser, so you need no partner approval and no developer setup.

**What about client data and GDPR?**

Cotlet is run from the EU and follows the GDPR. Cloud Browsers run in Finland, a Tier 1 country in the ITU Global Cybersecurity Index 2024. Data passes through a call and is not kept after it.

**Can I start with read only?**

Yes. Enable the app for agents as read only, or make the API key read only, and anything that reaches other people waits for your OK unless you switch that off per tool.

**Is it reliable?**

Every Cotlet service is checked every 3 minutes from Europe, North America, Asia and Australia. The live results and any outage are public at status.cotlet.dev.

**How do I stop?**

Press Disable for agents next to Chargebee in your console: your agents lose access at once and you stay signed in. Signing out of Chargebee in the browser works too, and Reset browser deletes the whole profile.

## Is there a Chargebee MCP server on GitHub?

Yes. Community Chargebee MCP servers exist on GitHub, usually maintained by one person and often limited to reads. You install one on your own computer, give it a Chargebee API key, and keep it running yourself; when Chargebee changes its API or you rotate the key, it stops until you fix it. The other route is the official REST API with your own scripts. Cotlet hosts the same kind of server for you, and our team keeps it working.

|  | GitHub MCP server | Cotlet |
|---|---|---|
| Setup | Clone the repo, install it, create an API key in Chargebee, add it to each MCP client | Sign up, sign in to Chargebee once, add one MCP server or API key |
| When Chargebee changes | It breaks until you or the maintainer fix it | Our team tests it daily and fixes it for you; failed calls are free |
| Your Chargebee access | A site API key in a config file on your computer, readable by any program you run | Signed in inside your own Cloud Browser in the EU, profile encrypted, only for the apps you enable, disabled for agents in one click |
| When access expires | Tools fail until you replace the key or sign in again by hand | Your Cloud Browser keeps you signed in; if Chargebee logs you out, your agent gets a link to sign in again |
| Upkeep | You update, monitor and debug it yourself | Nothing to host or update |
| Where it runs | Your computer, while it is on | Hosted: Claude Code, Codex, Cursor, n8n and scripts, also on a schedule |
| Price | Free, paid for with your time | Free 7-day trial, then pay-as-you-go credit packs, no subscription |

### Which one fits you

**Pick Cotlet if**

- you are not a developer, or you do not want to maintain a server
- you need it to keep working when Chargebee changes, without checking it yourself
- your agent or a script should run it on a schedule, also while your computer is off

**Pick an open-source server if**

- you are comfortable installing, updating and fixing it yourself
- you want your sign-in to stay on your own computer
- you only need it now and then, from one MCP client

## How much does the Chargebee API cost?

Free 7-day trial with 2,000 credits, no card needed. After that, the Chargebee API is pay as you go with no limit on apps: Credit packs from $29 for 5,000 credits, one-time, no subscription. A successful call uses 20 to 30 credits (25 for most tools, about $0.10 to $0.15), your Cloud Browser uses 50 credits a day while it has an app enabled for agents, however many apps that is, and an agent driving the browser itself uses 5 credits a minute. Credit packs stay valid for 12 months and stack, so unused credits carry over.

| Credits | Price, one time | Calls at 25 credits | Per 1,000 credits |
|---|---|---|---|
| 5,000 | $29 | 200 | $5.80 |
| 15,000 | $79 | 600 | $5.27 |
| 32,000 | $149 | 1,280 | $4.66 |
| 60,000 | $249 | 2,400 | $4.15 |

Only successful calls use credits; failed calls and timeouts cost nothing. At a balance of 0 calls pause, never a surprise charge. Authenticate with the `Authorization: Bearer` header. [See full pricing](https://cotlet.dev/pricing.md)

## How Cotlet holds your access

Cotlet hosts MCP servers and REST APIs for apps with no usable API. Your agent works in your own Chargebee account.

- **Company details:** Cotlet is run by Take Group sp. z o.o., a company registered in Poland. Its full address and registration numbers are in the Terms of service. [Terms of service](https://cotlet.dev/terms)
- **Your sign-in:** You sign in to Chargebee yourself, in your own Cloud Browser: a Chrome we run for you in the EU, one per app. We never save your password (password saving is off), the profile is stored encrypted with AES-256-GCM, and your agents get Chargebee only after you enable it. When Chargebee signs you out, your agent gives you a link to sign in again. [Security](https://cotlet.dev/security.md)
- **Revoking access:** Press Disable for agents next to Chargebee, sign out of Chargebee in your Cloud Browser, or reset the browser. Every background request is listed in your Background activity. Actions that reach other people wait for your OK unless you switch that off per tool.
- **What we never do:** Store passwords, solve CAPTCHAs or bypass MFA.
- **Chargebee's terms:** You use your own Chargebee account and stay responsible for following Chargebee's terms. Cotlet is independent and not affiliated with Chargebee. [Terms](https://cotlet.dev/terms)
- **Contact:** Questions about the company, security or an app: [contact@cotlet.dev](mailto:contact@cotlet.dev)

## Frequently asked questions

**How do I get access?**

Sign up free, open Chargebee in the console and press Request access. Then you create your API key and connect Chargebee there.

**Do I need to be technical?**

No. You sign in to Chargebee once in your Cloud Browser, a normal Chrome you open from the console, and paste one command into your agent, or one URL into n8n. Your agent can walk you through it. There is no server to install, update or fix.

**Is it safe to connect Chargebee to Cotlet?**

Yes. You sign in to Chargebee yourself, in your own Cloud Browser in the EU, and we never save your password. Your agents only get Chargebee once you enable it, every background request is listed, and the browser profile is stored encrypted with AES-256-GCM, the cipher 1Password uses for its vaults. The AI model never sees a login, posts and messages wait for your OK, and Disable for agents cuts access in one click. Independent scanners grade cotlet.dev A+ on Qualys SSL Labs, securityheaders.com and Mozilla Observatory; live results are on https://cotlet.dev/security.

**Is a hosted server safer than a local one? My Chargebee sign-in would leave my computer.**

On Cotlet you sign in inside your own Cloud Browser, which only you open, and its profile is stored encrypted with AES-256-GCM in the EU. Agents get only the apps you enable, and every background request is listed. A local server keeps your Chargebee cookie in a plain file on your computer, readable by any program you run, and stops when your computer is off.

**Why does Cotlet send requests instead of clicking in my browser?**

To be fast, Cotlet doesn't click through Chargebee's pages. It sends the same requests your browser would, from your browser's IP with its cookies, without opening a window. Chargebee sees the same browser and IP you signed in with, and every request is listed in your Background activity.

**What if someone gets my Cotlet API key?**

The key holds no Chargebee login or cookies, it only asks Cotlet to run a tool. It can call only the apps and tools you gave it, and a read-only key changes nothing. Anything that reaches other people, like posts, comments or messages, waits for your OK in the dashboard by default, so a leaked key cannot post or message as you. When you switch approval off for a scheduled job, give that job its own key limited to that one tool. Every call is in your activity log, and deleting the key ends access at once.

**Why a signed-in browser and not OAuth, like other integration platforms?**

Chargebee offers no OAuth token you can simply grant for these tools: its official API leaves them out or needs a developer app, a plan or an approval first (see the official API section above). That is why Cotlet sets the limits itself: per key, per tool, with your approval before anything reaches other people. Cotlet is run by Take Group sp. z o.o., an EU company (VAT PL6342984273).

**Do I need a Chargebee API key or the custom MCP server?**

No. Cotlet works in your own Chargebee Billing login, so nobody has to create an API key under Settings > Configure Chargebee > API Keys and Webhooks or ask an admin to build a custom MCP server, which needs the Latest Product Catalog. The calls follow what your role may do in the console. The official API stays the right route if you need more than the default 150 calls per minute that Starter live sites get.

**Can a cancelled subscription be brought back?**

Sometimes. Chargebee lets you reactivate a cancelled subscription only if it has card information, and a decommissioned subscription can never be reactivated. cancel_subscription does not decommission, so a cancellation from your agent can be reactivated in the Chargebee console when the card is on file.

**Which credit note type can my agent create?**

The one the invoice status allows: refundable on a paid invoice, adjustment on a payment_due or not_paid invoice, either on a partially paid one. A refundable credit note starts with refund due and sends no money until someone clicks Issue a refund in Chargebee.

**Can my agent post or send messages in Chargebee without asking me?**

No. Every call to change_subscription_plan, cancel_subscription, create_credit_note, apply_coupon or record_invoice_payment waits for your OK by default. For scheduled automations you can switch confirmation off per tool in your dashboard, for example only for approvals.

**Can I use the Chargebee API in n8n?**

Yes. Add https://cotlet.dev/mcp/v1 with your API key in n8n's MCP Client node, or call its endpoints under https://cotlet.dev/api/v1/chargebee from the HTTP Request node.

---

Give your AI agents your signed-in browser.

**Product:** [Integrations](https://cotlet.dev/integrations.md) · [Use cases](https://cotlet.dev/use-cases.md) · [How it works](https://cotlet.dev/how-it-works.md) · [Pricing](https://cotlet.dev/pricing.md) · [Security](https://cotlet.dev/security.md)

**Resources:** [Blog](https://cotlet.dev/blog.md) · [API docs](https://cotlet.dev/docs.md) · [Help center](https://cotlet.dev/help.md) · [Changelog](https://cotlet.dev/changelog.md) · [GitHub](https://github.com/cotletdev/cotlet)

**Solutions:** [For developers](https://cotlet.dev/for-developers.md) · [For automation agencies](https://cotlet.dev/for-agencies.md)

**Company:** [About](https://cotlet.dev/about.md) · [AI info: company facts](https://cotlet.dev/ai-info.md) · [Contact](https://cotlet.dev/contact.md)

**Legal:** [Terms of service](https://cotlet.dev/terms) · [Privacy policy](https://cotlet.dev/privacy) · [Refund policy](https://cotlet.dev/refunds) · [Acceptable use](https://cotlet.dev/acceptable-use) · [Cookie policy](https://cotlet.dev/cookies) · [DPA](https://cotlet.dev/dpa) · [Subprocessors](https://cotlet.dev/subprocessors)

**Elsewhere:** [Status page](https://status.cotlet.dev) · [Cotlet on GitHub](https://github.com/cotletdev) · [Cotlet on X](https://x.com/cotletdev) · [Cotlet on LinkedIn](https://www.linkedin.com/company/cotletdev) · [Cotlet on Product Hunt](https://www.producthunt.com/products/cotlet) · [Cotlet on Crunchbase](https://www.crunchbase.com/organization/cotlet) · [Cotlet on SaaSHub](https://www.saashub.com/cotlet)

Cotlet is an independent service. It is not affiliated with, endorsed by or sponsored by any of the products listed on this site. Product names are trademarks of their respective owners.

## For AI agents: sign your user up

Is your user asking you to sign them up for Cotlet? You can do it for them, no account or key needed.

1. Read the fields and their allowed values: GET https://cotlet.dev/api/v1/access-requests
2. Ask the user for each value: email, apps, what you will do with them. If they leave the password to you, generate a strong one and show it to them.
3. Show the user what you will send, then POST it as JSON to https://cotlet.dev/api/v1/access-requests.

One call creates the account and sends the access request; we email the user when access is granted.
