data
ChargeOver Lua API for KosmoKrator Agents
Agent-facing Lua documentation and function reference for the ChargeOver KosmoKrator integration.Lua Namespace
Agents call this integration through app.integrations.chargeover.*.
Use lua_read_doc("integrations.chargeover") inside KosmoKrator to discover the same reference at runtime.
Call Lua from the Headless CLI
Use kosmo integrations:lua when a shell script, CI job, cron job, or another coding CLI should run a deterministic
ChargeOver workflow without starting an interactive agent session.
kosmo integrations:lua --eval 'dump(app.integrations.chargeover.list_customers({limit = 1, offset = 1, where = "example_where", order = "example_order", expand = "example_expand", status = "example_status"}))' --json kosmo integrations:lua --eval 'print(docs.read("chargeover"))' --json
kosmo integrations:lua --eval 'print(docs.read("chargeover.list_customers"))' --json Workflow file
Put repeatable logic in a Lua file, then execute it with JSON output for the calling process.
local chargeover = app.integrations.chargeover
local result = chargeover.list_customers({limit = 1, offset = 1, where = "example_where", order = "example_order", expand = "example_expand", status = "example_status"})
dump(result) kosmo integrations:lua workflow.lua --json
kosmo integrations:lua workflow.lua --force --json integrations:lua exposes app.integrations.chargeover, app.mcp.*, docs.*, json.*, and regex.*. Use app.integrations.chargeover.default.* or app.integrations.chargeover.work.* when you configured named credential accounts.
MCP-only Lua
If the script only needs configured MCP servers and does not need ChargeOver, use the narrower mcp:lua command.
# Use mcp:lua for MCP-only scripts; use integrations:lua for this integration namespace.
kosmo mcp:lua --eval 'dump(mcp.servers())' --json Agent-Facing Lua Docs
This is the rendered version of the full Lua documentation exposed to agents when they inspect the integration namespace.
Integration: ChargeOver
ChargeOver tools access the REST API v3 for recurring billing records. The integration uses HTTP Basic Auth with an API username/key and API password/secret.
Namespace
chargeover
Available Tools
chargeover_list_customers- Query customers from/api/v3/customer.chargeover_get_customer- Fetch one customer bycustomer_id.chargeover_list_subscriptions- Query subscription package records from/api/v3/package.chargeover_list_invoices- Query invoices from/api/v3/invoice.chargeover_get_invoice- Fetch one invoice byinvoice_id.chargeover_list_transactions- Query transactions from/api/v3/transaction.chargeover_get_transaction- Fetch one transaction bytransaction_id.chargeover_get_current_user- Verify credentials with a lightweight customer query. ChargeOver REST API v3 does not expose a dedicated/meendpoint.
Configuration
Required credentials:
api_username- ChargeOver API username/key.api_password- ChargeOver API password/secret.subdomainorurl- either the ChargeOver subdomain such asexampleforhttps://example.chargeover.com, or a full instance URL.
For backward compatibility, hosts may still have an access_token value. The
integration treats that value as the API username only when api_username is
missing, but a matching api_password is still required.
Querying
List tools use ChargeOver’s documented query parameters:
limit- number of records to return, maximum 500.offset- zero-based record offset.where- filter expression, for examplecompany:CONTAINS:acme.order- sort expression, for examplecustomer_id:DESC.expand- endpoint-specific expansion, such asline_itemsfor packages orapplied_tofor transactions.
ChargeOver responses are returned in the upstream shape, typically with
code, status, message, details, and response.
Examples
local customers = chargeover.chargeover_list_customers({
limit = 25,
offset = 0,
where = "superuser_email:EQUALS:person@example.test",
order = "customer_id:DESC"
})
local packages = chargeover.chargeover_list_subscriptions({
customer_id = 123,
expand = "line_items"
})
local transactions = chargeover.chargeover_list_transactions({
where = "applied_to.invoice_id:EQUALS:456",
expand = "applied_to"
})Raw agent markdown
# Integration: ChargeOver
ChargeOver tools access the REST API v3 for recurring billing records. The
integration uses HTTP Basic Auth with an API username/key and API
password/secret.
## Namespace
`chargeover`
## Available Tools
- `chargeover_list_customers` - Query customers from `/api/v3/customer`.
- `chargeover_get_customer` - Fetch one customer by `customer_id`.
- `chargeover_list_subscriptions` - Query subscription package records from `/api/v3/package`.
- `chargeover_list_invoices` - Query invoices from `/api/v3/invoice`.
- `chargeover_get_invoice` - Fetch one invoice by `invoice_id`.
- `chargeover_list_transactions` - Query transactions from `/api/v3/transaction`.
- `chargeover_get_transaction` - Fetch one transaction by `transaction_id`.
- `chargeover_get_current_user` - Verify credentials with a lightweight customer query. ChargeOver REST API v3 does not expose a dedicated `/me` endpoint.
## Configuration
Required credentials:
- `api_username` - ChargeOver API username/key.
- `api_password` - ChargeOver API password/secret.
- `subdomain` or `url` - either the ChargeOver subdomain such as `example`
for `https://example.chargeover.com`, or a full instance URL.
For backward compatibility, hosts may still have an `access_token` value. The
integration treats that value as the API username only when `api_username` is
missing, but a matching `api_password` is still required.
## Querying
List tools use ChargeOver's documented query parameters:
- `limit` - number of records to return, maximum 500.
- `offset` - zero-based record offset.
- `where` - filter expression, for example `company:CONTAINS:acme`.
- `order` - sort expression, for example `customer_id:DESC`.
- `expand` - endpoint-specific expansion, such as `line_items` for packages or
`applied_to` for transactions.
ChargeOver responses are returned in the upstream shape, typically with
`code`, `status`, `message`, `details`, and `response`.
## Examples
```lua
local customers = chargeover.chargeover_list_customers({
limit = 25,
offset = 0,
where = "superuser_email:EQUALS:person@example.test",
order = "customer_id:DESC"
})
```
```lua
local packages = chargeover.chargeover_list_subscriptions({
customer_id = 123,
expand = "line_items"
})
```
```lua
local transactions = chargeover.chargeover_list_transactions({
where = "applied_to.invoice_id:EQUALS:456",
expand = "applied_to"
})
``` local result = app.integrations.chargeover.list_customers({limit = 1, offset = 1, where = "example_where", order = "example_order", expand = "example_expand", status = "example_status"})
print(result) Functions
list_customers Read
List customers from ChargeOver. Supports limit/offset pagination, where filters, sorting, and optional expansion. Use where expressions such as company:CONTAINS:acme or customer_status_state:EQUALS:a.
- Lua path
app.integrations.chargeover.list_customers- Full name
chargeover.chargeover_list_customers
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Number of customers to return per page (default: 10, max: 500). |
offset | integer | no | Record offset for pagination (default: 0). |
where | string | no | ChargeOver where expression, e.g. superuser_email:EQUALS:person@example.test. |
order | string | no | Sort expression, e.g. customer_id:DESC. |
expand | string | no | Optional ChargeOver expand value when supported by the endpoint. |
status | string | no | Legacy shortcut for customer_status_state; use "a" for active or "i" for inactive. |
get_customer Read
Get detailed information about a specific ChargeOver customer by ID, including contact details, billing address, account balance, and payment methods.
- Lua path
app.integrations.chargeover.get_customer- Full name
chargeover.chargeover_get_customer
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | yes | The customer ID. |
list_packages Read
List ChargeOver subscriptions, which the API exposes as package records at /api/v3/package. Supports customer filtering plus where/order/expand query parameters.
- Lua path
app.integrations.chargeover.list_packages- Full name
chargeover.chargeover_list_subscriptions
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Number of subscriptions to return per page (default: 10, max: 500). |
offset | integer | no | Record offset for pagination (default: 0). |
customer_id | integer | no | Filter subscriptions by customer ID. |
where | string | no | ChargeOver where expression, e.g. package_status_state:EQUALS:a. |
order | string | no | Sort expression, e.g. package_id:DESC. |
expand | string | no | Optional expansion such as line_items. |
list_invoices Read
List invoices from ChargeOver. Supports limit/offset pagination, where filters such as date:GTE:2026-01-01, sorting, and optional expansion.
- Lua path
app.integrations.chargeover.list_invoices- Full name
chargeover.chargeover_list_invoices
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Number of invoices to return per page (default: 10, max: 500). |
offset | integer | no | Record offset for pagination (default: 0). |
where | string | no | ChargeOver where expression, e.g. invoice_status_state:EQUALS:o or date:GTE:2026-01-01. |
order | string | no | Sort expression, e.g. invoice_id:DESC or total:ASC. |
expand | string | no | Optional ChargeOver expand value when supported by the endpoint. |
status | string | no | Legacy shortcut mapped to invoice_status_state:EQUALS:{status}. |
get_invoice Read
Get detailed information about a specific ChargeOver invoice by ID, including line items, totals, tax, applied payments, and invoice URL.
- Lua path
app.integrations.chargeover.get_invoice- Full name
chargeover.chargeover_get_invoice
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | yes | The invoice ID. |
list_transactions Read
List transactions from ChargeOver, including payments, refunds, and credits. Supports limit/offset pagination, where filters, sorting, and applied_to expansion.
- Lua path
app.integrations.chargeover.list_transactions- Full name
chargeover.chargeover_list_transactions
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Number of transactions to return per page (default: 10, max: 500). |
offset | integer | no | Record offset for pagination (default: 0). |
where | string | no | ChargeOver where expression, e.g. transaction_status.state:EQUALS:succeeded. |
order | string | no | Sort expression, e.g. transaction_id:DESC. |
expand | string | no | Optional expansion such as applied_to. |
get_transaction Read
Get detailed information about a specific ChargeOver transaction by transaction_id.
- Lua path
app.integrations.chargeover.get_transaction- Full name
chargeover.chargeover_get_transaction
| Parameter | Type | Required | Description |
|---|---|---|---|
id | integer | yes | The ChargeOver transaction_id. |
test_api_access Read
Verify ChargeOver API access with a lightweight authenticated customer query. ChargeOver does not expose a dedicated /me endpoint in REST API v3.
- Lua path
app.integrations.chargeover.test_api_access- Full name
chargeover.chargeover_get_current_user
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||