KosmoKrator

data

Chargify CLI for AI Agents

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

Chargify CLI Setup

Chargify can be configured headlessly with `kosmokrator integrations:configure chargify`.

Install, configure, and verify
# 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 chargify --set api_key="$CHARGIFY_API_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor chargify --json
kosmokrator integrations:status --json

Credentials

Authentication type: basic auth api key basic_auth_api_key. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.

KeyEnv varTypeRequiredLabel
api_key CHARGIFY_API_KEY Secret secret yes API Key
api_password CHARGIFY_API_PASSWORD Secret secret no API Password
subdomain CHARGIFY_SUBDOMAIN Text string no Subdomain
url CHARGIFY_URL URL url no Base URL

Command Patterns

The generic command is stable across every integration. The provider shortcut is shorter for humans.

Generic CLI call
kosmo integrations:call chargify.chargify_list_subscriptions '{"page":1,"per_page":1,"state":"example_state"}' --json
Provider shortcut
kosmo integrations:chargify chargify_list_subscriptions '{"page":1,"per_page":1,"state":"example_state"}' --json

Discovery

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

Discovery commands
kosmo integrations:docs chargify --json
kosmo integrations:docs chargify.chargify_list_subscriptions --json
kosmo integrations:schema chargify.chargify_list_subscriptions --json
kosmo integrations:search "Chargify" --json
kosmo integrations:list --json

Automation Contexts

The same configured command surface works in these environments. The command does not change unless the host wrapper, credentials, or permissions change.

CLI Functions

Every function below can be called headlessly. Commands are highlighted, copyable, and scroll horizontally when payloads are long.

chargify.chargify_list_subscriptions

List subscriptions from Chargify. Supports filtering by state (active, past_due, canceled, expired, trial, etc.) and pagination.

Read read
Parameters
page, per_page, state
Generic call
kosmo integrations:call chargify.chargify_list_subscriptions '{"page":1,"per_page":1,"state":"example_state"}' --json
Shortcut
kosmo integrations:chargify chargify_list_subscriptions '{"page":1,"per_page":1,"state":"example_state"}' --json

chargify.chargify_get_subscription

Get detailed information for a single Chargify subscription by ID.

Read read
Parameters
subscription_id
Generic call
kosmo integrations:call chargify.chargify_get_subscription '{"subscription_id":1}' --json
Shortcut
kosmo integrations:chargify chargify_get_subscription '{"subscription_id":1}' --json

chargify.chargify_list_customers

List customers from Chargify. Supports pagination with page and per_page parameters.

Read read
Parameters
page, per_page
Generic call
kosmo integrations:call chargify.chargify_list_customers '{"page":1,"per_page":1}' --json
Shortcut
kosmo integrations:chargify chargify_list_customers '{"page":1,"per_page":1}' --json

chargify.chargify_get_customer

Get detailed information for a single Chargify customer by ID.

Read read
Parameters
customer_id
Generic call
kosmo integrations:call chargify.chargify_get_customer '{"customer_id":1}' --json
Shortcut
kosmo integrations:chargify chargify_get_customer '{"customer_id":1}' --json

chargify.chargify_list_products

List products available in Chargify. Supports pagination with page and per_page parameters.

Read read
Parameters
page, per_page
Generic call
kosmo integrations:call chargify.chargify_list_products '{"page":1,"per_page":1}' --json
Shortcut
kosmo integrations:chargify chargify_list_products '{"page":1,"per_page":1}' --json

chargify.chargify_list_invoices

List invoices from Chargify. Supports filtering by status (open, paid, pending, voided) and pagination.

Read read
Parameters
page, per_page, status
Generic call
kosmo integrations:call chargify.chargify_list_invoices '{"page":1,"per_page":1,"status":"example_status"}' --json
Shortcut
kosmo integrations:chargify chargify_list_invoices '{"page":1,"per_page":1,"status":"example_status"}' --json

chargify.chargify_get_invoice

Get detailed information for a single Chargify / Maxio Advanced Billing invoice by ID, UID, or invoice number.

Read read
Parameters
invoice_id
Generic call
kosmo integrations:call chargify.chargify_get_invoice '{"invoice_id":"example_invoice_id"}' --json
Shortcut
kosmo integrations:chargify chargify_get_invoice '{"invoice_id":"example_invoice_id"}' --json

chargify.chargify_get_current_user

Read the current Chargify / Maxio Advanced Billing site. Useful for verifying API credentials.

Read read
Parameters
none
Generic call
kosmo integrations:call chargify.chargify_get_current_user '{}' --json
Shortcut
kosmo integrations:chargify chargify_get_current_user '{}' --json

Function Schemas

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

chargify.chargify_list_subscriptions 3 parameters
Schema command
kosmo integrations:schema chargify.chargify_list_subscriptions --json
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).
per_page integer no Number of results per page, max 200 (default: 20).
state string no Filter by subscription state: active, past_due, canceled, expired, trial, on_hold, pending, deferred, etc.
chargify.chargify_get_subscription 1 parameters
Schema command
kosmo integrations:schema chargify.chargify_get_subscription --json
ParameterTypeRequiredDescription
subscription_id integer yes The Chargify subscription ID.
chargify.chargify_list_customers 2 parameters
Schema command
kosmo integrations:schema chargify.chargify_list_customers --json
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).
per_page integer no Number of results per page, max 200 (default: 20).
chargify.chargify_get_customer 1 parameters
Schema command
kosmo integrations:schema chargify.chargify_get_customer --json
ParameterTypeRequiredDescription
customer_id integer yes The Chargify customer ID.
chargify.chargify_list_products 2 parameters
Schema command
kosmo integrations:schema chargify.chargify_list_products --json
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).
per_page integer no Number of results per page, max 200 (default: 20).
chargify.chargify_list_invoices 3 parameters
Schema command
kosmo integrations:schema chargify.chargify_list_invoices --json
ParameterTypeRequiredDescription
page integer no Page number for pagination (default: 1).
per_page integer no Number of results per page, max 200 (default: 20).
status string no Filter by invoice status: open, paid, pending, voided.
chargify.chargify_get_invoice 1 parameters
Schema command
kosmo integrations:schema chargify.chargify_get_invoice --json
ParameterTypeRequiredDescription
invoice_id string yes The invoice UID, number, or ID.
chargify.chargify_get_current_user 0 parameters
Schema command
kosmo integrations:schema chargify.chargify_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.