Everything an AI agent can do with the Chargebee API.

A reference guide for building AI agents: every method, how to authenticate, and the permissions each one needs.

Endpoints38
API versionv2
Last updated23 June 2026
Orientation

How the Chargebee API works.

The Chargebee API is how an app or AI agent works with a Chargebee site: creating a subscription, charging an invoice, adding a customer, building the product catalog, or issuing a credit note. Access is granted through a site-specific API key, which is full-access because Chargebee has no granular scopes, so the key can reach every resource on its site. A change on the site emits an Event that Chargebee can deliver to a registered webhook.

38Endpoints
9Capability groups
18Read
20Write
1Permissions
Authentication
Chargebee authenticates every call with a site-specific API key, sent through HTTP Basic auth as the username with an empty password. There is no OAuth for first-party access. A key belongs to one site, either a live site or a test site, and a publishable key exists for safe client-side use that cannot read or change site data.
Permissions
Chargebee keys are full-access. The API has no granular per-resource scopes, so a key can call every API on its site, and access is all-or-nothing rather than read-only or per-resource. A 401 means the key is invalid, and a 403 means the operation is not allowed for the key or not enabled on the site. This is why a governing layer in front of the key matters: the key itself cannot be narrowed.
Versioning
The API is served at a single stable version, v2, with no dated version string to pin. Chargebee ships backward-compatible changes, like new parameters, resources, and event types, through dated entries in its API changelog rather than minting new versions. The earlier v1 API is superseded by v2. Product Catalog 1.0 (plans) and 2.0 (items and item prices) are catalog models a site is on, not API versions.
Data model
Chargebee is resource-oriented REST over HTTPS at https://{site}.chargebee.com/api/v2, with form-encoded requests and JSON responses wrapped in a named container. Recurring billing combines Customers, the catalog (Items and Item Prices in 2.0, or Plans in 1.0), Subscriptions, Invoices, Credit Notes, and Transactions, with Payment Sources holding stored payment methods. A change emits an Event, retrievable through the API and delivered by webhook. Lists are offset-paginated, and a write can be made safe to repeat with an idempotency key.
Connect & authenticate

Connection & authentication methods.

How an app or AI agent connects to Chargebee determines what it can reach. There is a route for making calls, a route for receiving events, and hosted servers that expose Chargebee tools to agents, and each is governed by the key behind it.

Ways to connect

REST API

The REST API answers at https://{site}.chargebee.com/api/v2, where {site} is the Chargebee site name. It takes form-encoded request bodies, returns JSON wrapped in a resource container, and pages through lists with an offset cursor. A call authenticates with HTTP Basic auth, using the API key as the username and an empty password.

Best forConnecting an app or AI agent to Chargebee.
Governed byThe API key, which carries full access to the site.
Docs ↗

Webhooks

Chargebee POSTs an Event as JSON to an HTTPS endpoint configured for the site. The endpoint is secured with HTTP Basic auth or a random key embedded in the URL, since Chargebee does not sign webhook bodies. Deliveries are asynchronous, can arrive out of order, and are retried for up to two days, so an integration deduplicates on the event id.

Best forReceiving Chargebee events at an app or AI agent.
Governed byThe Basic-auth credentials or secret key on the webhook URL.
Docs ↗

MCP servers (AgentKit)

Chargebee's AgentKit publishes hosted Model Context Protocol servers at https://{subdomain}.mcp.chargebee.com (with mcp.eu and mcp.au hosts for other data centers). Predefined servers cover a Knowledge Base server for docs and API references, a Data Lookup server that reads customer, subscription, invoice, and payment data, and an Onboarding server for catalogs and demo data on test sites, plus a Custom server that bundles chosen tools. Each server except the Knowledge Base authenticates with an API key generated on its configuration page. A separate local stdio package, @chargebee/mcp, is deprecated in favor of the hosted Knowledge Base server.

Best forConnecting an AI agent to Chargebee through MCP.
Governed byThe API key generated for the server.
Docs ↗
Authentication

API key (Basic auth)

Every API call authenticates with a site-specific API key, sent through HTTP Basic auth as the username with an empty password. A Chargebee key is full-access: it can call every API and resource on its site, because Chargebee has no granular per-resource scopes. A key belongs to one site, either a live site or a test site, and keys are managed under the site's API and webhook settings.

TokenSite-specific API key
Best forServer-side calls to a single Chargebee site.
Docs ↗

Publishable key

A publishable key is safe to use in client code. It is limited to a few client-side operations, like tokenizing payment details and opening hosted pages, and cannot read or change site data.

TokenPublishable key
Best forClient-side and front-end use.
Docs ↗
Capability map

What an AI agent can do in Chargebee.

The Chargebee API is split into areas an agent can act on, like subscriptions, customers, invoices, the product catalog, payment sources, and credit notes. Each area has its own methods, and writes in some areas charge customers, cancel billing, or move money.

Subscriptions

7 endpoints

Create, retrieve, list, update, cancel, pause, and resume subscriptions, modeled on items.

A write here starts, changes, or ends real recurring billing.
View endpoints

Customers

5 endpoints

Create, retrieve, list, update, and delete the customers that subscriptions and invoices belong to.

A write here changes real customer data.
View endpoints

Invoices

6 endpoints

Create, retrieve, list, and collect payment on invoices, and void or generate a PDF for one.

A write here charges a customer or changes a billing document.
View endpoints

Product catalog (Items & Plans)

6 endpoints

Create, retrieve, and list items and item prices in Product Catalog 2.0, and plans in Product Catalog 1.0.

A write here changes what can be sold and at what price.
View endpoints

Payment sources

4 endpoints

Store a payment source from a gateway token, retrieve, list, and delete payment sources for a customer.

A write here adds or removes a stored payment method.
View endpoints

Credit notes

3 endpoints

Create, retrieve, and list credit notes, and refund a refundable credit note.

A write here issues credit or refunds money to a customer.
View endpoints

Transactions

2 endpoints

Retrieve and list the payment and refund transactions recorded against invoices and customers.

A write here records a payment or refund movement.
View endpoints

Hosted pages

3 endpoints

Create a Chargebee-hosted checkout or self-serve page and retrieve one by id.

A write here opens a page that can take a payment or change a subscription.
View endpoints

Events

2 endpoints

Retrieve and list the events that record changes on a site and back the webhook feed.

A write here changes real event data.
View endpoints
Endpoint reference

Every Chargebee API method.

Filter by method, access, or permission, or search any path. Select a row for version detail, rate limits, the related webhook event, and the source.

MethodEndpointWhat it doesAccessPermissionVersion

Subscriptions

Create, retrieve, list, update, cancel, pause, and resume subscriptions, modeled on items.7

Chargebee keys are full-access; access is all-or-nothing, not per-resource. Idempotency is supported via an idempotency key header.

Acts onsubscription
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventsubscription_created
Rate limitStandard limits apply

Read-only call.

Acts onsubscription
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only call.

Acts onsubscription
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Can change what a customer is billed for and when.

Acts onsubscription
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Ends recurring billing; fires subscription_cancelled.

Acts onsubscription
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventsubscription_cancelled
Rate limitStandard limits apply

Halts billing until resumed.

Acts onsubscription
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Restarts billing on a paused subscription.

Acts onsubscription
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Customers

Create, retrieve, list, update, and delete the customers that subscriptions and invoices belong to.5

A core write; fires customer_created.

Acts oncustomer
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventcustomer_created
Rate limitStandard limits apply

Read-only call.

Acts oncustomer
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only call.

Acts oncustomer
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

A core write.

Acts oncustomer
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Removes the customer and its dependent records.

Acts oncustomer
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Invoices

Create, retrieve, list, and collect payment on invoices, and void or generate a PDF for one.6

Generates a billing document; fires invoice_generated.

Acts oninvoice
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventinvoice_generated
Rate limitStandard limits apply

Read-only call.

Acts oninvoice
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only call.

Acts oninvoice
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Charges the customer; fires payment_succeeded or payment_failed.

Acts oninvoice
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventpayment_succeeded
Rate limitStandard limits apply

Cancels the billing document.

Acts oninvoice
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Returns a temporary download link rather than changing data.

Acts oninvoice
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Product catalog (Items & Plans)

Create, retrieve, and list items and item prices in Product Catalog 2.0, and plans in Product Catalog 1.0.6

Defines what can be sold. Idempotency is supported on this endpoint.

Acts onitem
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only call.

Acts onitem
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Sets pricing used by subscriptions and invoices.

Acts onitem_price
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only call.

Acts onitem_price
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Only on sites using Product Catalog 1.0; items and item prices replace plans in 2.0.

Acts onplan
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only call; Product Catalog 1.0 only.

Acts onplan
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Payment sources

Store a payment source from a gateway token, retrieve, list, and delete payment sources for a customer.4

Adds a reusable payment method; the token is created client-side to keep card data off the integration's servers.

Acts onpayment_source
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only call.

Acts onpayment_source
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only call.

Acts onpayment_source
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Removes the payment method so it can no longer be charged.

Acts onpayment_source
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Credit notes

Create, retrieve, and list credit notes, and refund a refundable credit note.3

Issues credit that can offset future invoices or be refunded.

Acts oncredit_note
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only call.

Acts oncredit_note
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Moves real money back to the customer.

Acts oncredit_note
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Transactions

Retrieve and list the payment and refund transactions recorded against invoices and customers.2

Read-only call.

Acts ontransaction
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only call.

Acts ontransaction
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Hosted pages

Create a Chargebee-hosted checkout or self-serve page and retrieve one by id.3

Returns a URL where a customer can pay and start a subscription.

Acts onhosted_page
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Returns a self-serve URL for updating payment methods.

Acts onhosted_page
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only call.

Acts onhosted_page
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Events

Retrieve and list the events that record changes on a site and back the webhook feed.2

Read-only call.

Acts onevent
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply

Read-only call.

Acts onevent
Permission (capability)Full-access key
VersionAvailable since the API’s base version
Webhook eventNone
Rate limitStandard limits apply
No endpoints match those filters.
Webhooks

Webhook events.

Chargebee can notify an app when something happens on a site, like a subscription being created or a payment failing. It posts an Event describing what changed, so an integration learns about activity without polling.

EventWhat it signalsTriggered by
subscription_createdA new subscription was created on the site./customers/{customer-id}/subscription_for_items
subscription_cancelledA subscription was cancelled, immediately or at the end of its term./subscriptions/{subscription-id}/cancel_for_items
customer_createdA new customer was created on the site./customers
invoice_generatedAn invoice was generated for a customer./invoices/create_for_charge_items_and_charges
payment_succeededA payment against an invoice succeeded./invoices/{invoice-id}/collect_payment
payment_failedA payment attempt against an invoice failed, the point where dunning begins./invoices/{invoice-id}/collect_payment
No events match that search.
Rate limits & pagination

Rate limits, pagination & request size.

Chargebee limits how fast an app can call, by a per-minute request rate that depends on the plan and by separate caps on how many requests run at once.

Request rate

Chargebee meters requests per minute, with the ceiling set by the site's plan: 150 per minute on Starter and on test sites, 1,000 on Performance, and 3,500 by default on Enterprise, with no fixed upper limit on custom Enterprise plans. A separate concurrency limit caps how many requests run at once, at 50 simultaneous GET requests and 100 simultaneous POST requests, since GETs typically finish faster. Exceeding either limit returns HTTP 429 with an optional Retry-After header that says how long to wait, and higher limits can be requested from Chargebee support.

Pagination

List endpoints use offset pagination. The limit parameter sets the page size, defaulting to 10 and capping at 100, and a next_offset value in the response is passed back as the offset parameter to fetch the following page. When next_offset is absent, there are no more results.

Request size

A list endpoint returns at most 100 records per page. Requests are form-encoded and responses are JSON, with each resource wrapped in a named container and timestamps given as Unix epoch seconds.

Errors

Status codes & error handling.

The status codes an agent should handle, and what to do about each.

StatusCodeMeaningWhat to do
400payment / invalid_requestA client error. The body carries a type, like payment for a failed charge or invalid_request for a bad parameter, plus an api_error_code such as payment_processing_failed, param_wrong_value, or duplicate_entry.Read the api_error_code, type, and param fields, fix the request, and resend. A payment-type error means the charge failed, not the request.
401api_authentication_failedAuthentication failed: the API key is missing, invalid, or sent in the wrong format.Confirm a valid site-specific key is sent as the Basic-auth username with an empty password.
403api_authorization_failedThe key is valid but not allowed to perform this operation.Use a key permitted for the operation, or enable the feature on the site.
404resource_not_foundThe requested resource does not exist on the site.Verify the id and that it belongs to this site and mode.
409invalid_state_for_requestThe resource is in a state that does not allow this operation, like cancelling an already cancelled subscription.Refetch the resource state, then retry only when the operation is valid.
429api_request_limit_exceededA rate or concurrency limit was hit. A lock_timeout can also surface as 429 under contention.Honor the Retry-After header, back off with jitter, and smooth the request rate.
500internal_errorAn error on Chargebee's side. It is rare.Retry with backoff, and contact Chargebee support if it persists.
Versioning & freshness

Version history.

Chargebee serves a single stable version of its API, v2, and ships dated, backward-compatible changes through its API changelog rather than minting new version numbers.

Version history

What changed, and when

Latest versionv2
v2Current version
Current stable API

Chargebee serves a single stable version, v2, at https://{site}.chargebee.com/api/v2, superseding the earlier v1. There is no dated API version string to pin. Backward-compatible changes, like new parameters, resources, and event types, ship through dated entries in the API changelog. The dates below are recent changelog cuts, newest first.

What changed
  • Authentication is a site-specific API key over HTTP Basic auth; keys are full-access with no granular scopes.
  • Product Catalog 2.0 (items and item prices) and 1.0 (plans) are catalog models a site is on, not API versions.
  • Changes are additive and dated rather than versioned.
2026-06-12Feature update
June 2026 changelog cut

A backward-compatible dated update to the v2 API.

What changed
  • New resources: grant_blocks, ledger_account_balances, ledger_operations, promotional_grants.
  • Added a notes attribute to credit notes and a layout attribute to hosted pages.
  • Deprecated the update-payment-method endpoint.
2026-05-04Feature update
May 2026 changelog cut

A backward-compatible dated update to the v2 API.

What changed
  • New alert endpoints for creating, retrieving, updating, and deleting alerts.
  • New payment gateways (Payway, Moyasar) and many new payment methods, including Twint, Swish, and GrabPay.
  • Added absolute and percentage threshold modes.
2026-03-27Feature update
March 2026 changelog cut

A backward-compatible dated update to the v2 API.

What changed
  • New resources: alerts, alert_statuses.
  • New event type alert_status_changed.
  • New payment method Pix and new einvoice reference attributes.
2025-10-28Feature update
October 2025 changelog cut

A backward-compatible dated update to the v2 API.

What changed
  • New resources for personalized offers and fulfillments.
  • New webhooks: dunning_updated and omnichannel_subscription_moved_in.
  • Added a processor_advice_code to transaction error details.

Build against v2 and adopt new dated changes as they ship.

Chargebee API changelog ↗
Questions

Chargebee API, answered.

How does Chargebee authenticate API calls?+
Every call uses HTTP Basic auth. The site-specific API key goes in as the username and the password is left empty. Requests must be over HTTPS, and the key must never appear in client-side code. A separate publishable key is the only key safe to expose in a browser, and it cannot read or change site data.
Does Chargebee support granular API scopes or permissions?+
No. Chargebee keys are full-access, so a single key can call every API and resource on its site. There is no built-in way to issue a read-only key or a key limited to certain resources. That makes a governing layer in front of the key the practical way to give an agent narrow, least-privilege access, since the key itself cannot be scoped down.
What are the rate limits?+
Chargebee limits requests per minute by plan: 150 on Starter and test sites, 1,000 on Performance, and 3,500 by default on Enterprise, with custom Enterprise plans uncapped. On top of that, a concurrency limit allows 50 simultaneous GET requests and 100 simultaneous POST requests. Going over either returns HTTP 429 with an optional Retry-After header, and support can raise the limits.
How do I receive events instead of polling?+
Configure a webhook URL on the site. Chargebee POSTs each Event as JSON when something happens, like a subscription being created or a payment failing. The endpoint is secured with HTTP Basic auth or a random key in the URL, because Chargebee does not sign webhook bodies. Deliveries are asynchronous and retried for up to two days, so an integration deduplicates on the event id and can re-fetch any event through the Events API.
What is the difference between Product Catalog 1.0 and 2.0?+
They are two catalog models, not API versions. Product Catalog 1.0 sells through Plans, Addons, and Coupons. Product Catalog 2.0 replaces plans with Items and Item Prices, so a subscription is built from items, and the subscription endpoints use the for_items variants. A site is on one model, and the right catalog endpoints depend on which.
How does pagination work?+
List endpoints use offset pagination. The limit parameter sets the page size, defaulting to 10 and topping out at 100. Each response includes a next_offset value when more records remain, which is passed back as the offset parameter on the next request. When next_offset is absent, the list is fully read.
Are write requests safe to retry?+
Yes, on endpoints that support it. Chargebee accepts an idempotency key on supported write calls, so a retry after a network blip replays the original result instead of creating a duplicate, like a second subscription or charge. The create-item and create-subscription endpoints document idempotency support.
Related

More finance API guides for agents

What is Bollard AI?

Control what every AI agent can do in Chargebee.

Bollard AI sits between a team's AI agents and Chargebee. Grant each agent exactly the access it needs, read or write, resource by resource, and every call is checked and logged.

  • Set read, write, or full access per agent, never a shared Chargebee key.
  • Denied by default, so an agent reaches only what has been explicitly allowed.
  • Every call recorded in plain English: who, what, where, and the decision.
Chargebee
Billing Agent
View subscriptions ResourceOffReadFull use
Cancel subscriptions ActionOffReadFull use
Customers ResourceOffReadFull use
Issue credit notes ActionOffReadFull use
Per-agent access, set in Bollard AI, not in Chargebee