KosmoKrator

payments

Chargebee CLI for AI Agents

Use the Chargebee CLI from KosmoKrator to call Chargebee tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

7 functions 7 read 0 write Bearer token auth

Chargebee CLI Setup

Chargebee can be configured headlessly with `kosmokrator integrations:configure chargebee`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure chargebee --set access_token="$CHARGEBEE_ACCESS_TOKEN" --set site_name="$CHARGEBEE_SITE_NAME" --enable --read allow --write ask --json
kosmokrator integrations:doctor chargebee --json
kosmokrator integrations:status --json

Credentials

Authentication type: Bearer token bearer_token. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
access_token CHARGEBEE_ACCESS_TOKEN Secret secret yes Access Token
site_name CHARGEBEE_SITE_NAME Text string yes Site Name

Call Chargebee Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call chargebee.chargebee_list_subscriptions '{
  "limit": 1,
  "page": "example_page",
  "state": "example_state"
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:chargebee chargebee_list_subscriptions '{
  "limit": 1,
  "page": "example_page",
  "state": "example_state"
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs chargebee --json
kosmo integrations:docs chargebee.chargebee_list_subscriptions --json
kosmo integrations:schema chargebee.chargebee_list_subscriptions --json
kosmo integrations:search "Chargebee" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Chargebee.

chargebee.chargebee_list_subscriptions

Read read

List subscriptions from Chargebee. Supports filtering by state (active, cancelled, non_renewing, paused, in_trial, future) and pagination. Returns subscription details including plan, status, and billing period.

Parameters
limit, page, state

Generic CLI call

kosmo integrations:call chargebee.chargebee_list_subscriptions '{"limit":1,"page":"example_page","state":"example_state"}' --json

Provider shortcut

kosmo integrations:chargebee chargebee_list_subscriptions '{"limit":1,"page":"example_page","state":"example_state"}' --json

chargebee.chargebee_get_subscription

Read read

Retrieve detailed information about a specific Chargebee subscription by its ID, including plan details, billing period, status, and associated customer.

Parameters
id

Generic CLI call

kosmo integrations:call chargebee.chargebee_get_subscription '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:chargebee chargebee_get_subscription '{"id":"example_id"}' --json

chargebee.chargebee_list_customers

Read read

List customers from Chargebee with pagination. Returns customer details including email, name, company, and billing address.

Parameters
limit, page

Generic CLI call

kosmo integrations:call chargebee.chargebee_list_customers '{"limit":1,"page":"example_page"}' --json

Provider shortcut

kosmo integrations:chargebee chargebee_list_customers '{"limit":1,"page":"example_page"}' --json

chargebee.chargebee_get_customer

Read read

Retrieve detailed information about a specific Chargebee customer by their ID, including contact details, billing address, and payment method.

Parameters
id

Generic CLI call

kosmo integrations:call chargebee.chargebee_get_customer '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:chargebee chargebee_get_customer '{"id":"example_id"}' --json

chargebee.chargebee_list_invoices

Read read

List invoices from Chargebee. Supports filtering by status (paid, posted, payment_due, not_paid, voided, pending) and pagination.

Parameters
limit, page, status

Generic CLI call

kosmo integrations:call chargebee.chargebee_list_invoices '{"limit":1,"page":"example_page","status":"example_status"}' --json

Provider shortcut

kosmo integrations:chargebee chargebee_list_invoices '{"limit":1,"page":"example_page","status":"example_status"}' --json

chargebee.chargebee_get_invoice

Read read

Retrieve detailed information about a specific Chargebee invoice by its ID, including line items, totals, tax, and payment status.

Parameters
id

Generic CLI call

kosmo integrations:call chargebee.chargebee_get_invoice '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:chargebee chargebee_get_invoice '{"id":"example_id"}' --json

chargebee.chargebee_get_current_user

Read read

Retrieve the current authenticated user information from Chargebee. Use this to verify credentials are working and check user details.

Parameters
none

Generic CLI call

kosmo integrations:call chargebee.chargebee_get_current_user '{}' --json

Provider shortcut

kosmo integrations:chargebee chargebee_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

chargebee.chargebee_list_subscriptions

List subscriptions from Chargebee. Supports filtering by state (active, cancelled, non_renewing, paused, in_trial, future) and pagination. Returns subscription details including plan, status, and billing period.

Operation
Read read
Schema command
kosmo integrations:schema chargebee.chargebee_list_subscriptions --json
ParameterTypeRequiredDescription
limit integer no Number of subscriptions to return per page (max 100, default 10).
page string no Pagination cursor — pass the value from a previous response to get the next page.
state string no Filter by subscription state: active, cancelled, non_renewing, paused, in_trial, future.

chargebee.chargebee_get_subscription

Retrieve detailed information about a specific Chargebee subscription by its ID, including plan details, billing period, status, and associated customer.

Operation
Read read
Schema command
kosmo integrations:schema chargebee.chargebee_get_subscription --json
ParameterTypeRequiredDescription
id string yes The subscription ID.

chargebee.chargebee_list_customers

List customers from Chargebee with pagination. Returns customer details including email, name, company, and billing address.

Operation
Read read
Schema command
kosmo integrations:schema chargebee.chargebee_list_customers --json
ParameterTypeRequiredDescription
limit integer no Number of customers to return per page (max 100, default 10).
page string no Pagination cursor — pass the value from a previous response to get the next page.

chargebee.chargebee_get_customer

Retrieve detailed information about a specific Chargebee customer by their ID, including contact details, billing address, and payment method.

Operation
Read read
Schema command
kosmo integrations:schema chargebee.chargebee_get_customer --json
ParameterTypeRequiredDescription
id string yes The customer ID.

chargebee.chargebee_list_invoices

List invoices from Chargebee. Supports filtering by status (paid, posted, payment_due, not_paid, voided, pending) and pagination.

Operation
Read read
Schema command
kosmo integrations:schema chargebee.chargebee_list_invoices --json
ParameterTypeRequiredDescription
limit integer no Number of invoices to return per page (max 100, default 10).
page string no Pagination cursor — pass the value from a previous response to get the next page.
status string no Filter by invoice status: paid, posted, payment_due, not_paid, voided, pending.

chargebee.chargebee_get_invoice

Retrieve detailed information about a specific Chargebee invoice by its ID, including line items, totals, tax, and payment status.

Operation
Read read
Schema command
kosmo integrations:schema chargebee.chargebee_get_invoice --json
ParameterTypeRequiredDescription
id string yes The invoice ID.

chargebee.chargebee_get_current_user

Retrieve the current authenticated user information from Chargebee. Use this to verify credentials are working and check user details.

Operation
Read read
Schema command
kosmo integrations:schema chargebee.chargebee_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.