KosmoKrator

productivity

Stripe CLI for AI Agents

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

Stripe CLI Setup

Stripe can be configured headlessly with `kosmokrator integrations:configure stripe`.

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 stripe --set api_key="$STRIPE_API_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor stripe --json
kosmokrator integrations:status --json

Credentials

Authentication type: API key api_key. Configure credentials once, then reuse the same stored profile from scripts, coding CLIs, Lua, and MCP.

KeyEnv varTypeRequiredLabel
api_key STRIPE_API_KEY Secret secret yes Secret API Key

Command Patterns

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

Generic CLI call
kosmo integrations:call stripe.stripe_create_customer '{"name":"example_name","email":"example_email","description":"example_description","phone":"example_phone","metadata":"example_metadata"}' --json
Provider shortcut
kosmo integrations:stripe stripe_create_customer '{"name":"example_name","email":"example_email","description":"example_description","phone":"example_phone","metadata":"example_metadata"}' --json

Discovery

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

Discovery commands
kosmo integrations:docs stripe --json
kosmo integrations:docs stripe.stripe_create_customer --json
kosmo integrations:schema stripe.stripe_create_customer --json
kosmo integrations:search "Stripe" --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.

stripe.stripe_create_customer

Create a new Stripe customer. Supports name, email, description, phone, and metadata. Returns the created customer object with ID.

Write write
Parameters
name, email, description, phone, metadata
Generic call
kosmo integrations:call stripe.stripe_create_customer '{"name":"example_name","email":"example_email","description":"example_description","phone":"example_phone","metadata":"example_metadata"}' --json
Shortcut
kosmo integrations:stripe stripe_create_customer '{"name":"example_name","email":"example_email","description":"example_description","phone":"example_phone","metadata":"example_metadata"}' --json

stripe.stripe_get_customer

Retrieve a Stripe customer by ID. Returns full customer details including email, name, metadata, and default payment method.

Read read
Parameters
id
Generic call
kosmo integrations:call stripe.stripe_get_customer '{"id":"example_id"}' --json
Shortcut
kosmo integrations:stripe stripe_get_customer '{"id":"example_id"}' --json

stripe.stripe_update_customer

Update an existing Stripe customer. Supports updating name, email, description, phone, and metadata.

Write write
Parameters
id, name, email, description, phone, metadata
Generic call
kosmo integrations:call stripe.stripe_update_customer '{"id":"example_id","name":"example_name","email":"example_email","description":"example_description","phone":"example_phone","metadata":"example_metadata"}' --json
Shortcut
kosmo integrations:stripe stripe_update_customer '{"id":"example_id","name":"example_name","email":"example_email","description":"example_description","phone":"example_phone","metadata":"example_metadata"}' --json

stripe.stripe_list_customers

List Stripe customers with optional filtering. Supports filtering by email, pagination with limit and starting_after cursor.

Read read
Parameters
email, limit, starting_after
Generic call
kosmo integrations:call stripe.stripe_list_customers '{"email":"example_email","limit":1,"starting_after":"example_starting_after"}' --json
Shortcut
kosmo integrations:stripe stripe_list_customers '{"email":"example_email","limit":1,"starting_after":"example_starting_after"}' --json

stripe.stripe_delete_customer

Delete a Stripe customer by ID. Permanently removes the customer and all associated data.

Write write
Parameters
id
Generic call
kosmo integrations:call stripe.stripe_delete_customer '{"id":"example_id"}' --json
Shortcut
kosmo integrations:stripe stripe_delete_customer '{"id":"example_id"}' --json

stripe.stripe_create_product

Create a new Stripe product. Products are the goods or services you sell. After creating a product, create a price for it.

Write write
Parameters
name, description, active, metadata
Generic call
kosmo integrations:call stripe.stripe_create_product '{"name":"example_name","description":"example_description","active":true,"metadata":"example_metadata"}' --json
Shortcut
kosmo integrations:stripe stripe_create_product '{"name":"example_name","description":"example_description","active":true,"metadata":"example_metadata"}' --json

stripe.stripe_list_products

List Stripe products with optional filtering. Supports filtering by active status and pagination.

Read read
Parameters
active, limit, starting_after
Generic call
kosmo integrations:call stripe.stripe_list_products '{"active":true,"limit":1,"starting_after":"example_starting_after"}' --json
Shortcut
kosmo integrations:stripe stripe_list_products '{"active":true,"limit":1,"starting_after":"example_starting_after"}' --json

stripe.stripe_get_product

Retrieve a Stripe product by ID. Returns full product details including name, description, active status, and metadata.

Read read
Parameters
id
Generic call
kosmo integrations:call stripe.stripe_get_product '{"id":"example_id"}' --json
Shortcut
kosmo integrations:stripe stripe_get_product '{"id":"example_id"}' --json

stripe.stripe_create_price

Create a price for a Stripe product. Amounts are in cents (e.g., $10.00 = 1000). Supports one-time and recurring prices with configurable intervals.

Write write
Parameters
product, unit_amount, currency, recurring_interval, recurring_interval_count, metadata
Generic call
kosmo integrations:call stripe.stripe_create_price '{"product":"example_product","unit_amount":1,"currency":"example_currency","recurring_interval":"example_recurring_interval","recurring_interval_count":1,"metadata":"example_metadata"}' --json
Shortcut
kosmo integrations:stripe stripe_create_price '{"product":"example_product","unit_amount":1,"currency":"example_currency","recurring_interval":"example_recurring_interval","recurring_interval_count":1,"metadata":"example_metadata"}' --json

stripe.stripe_list_prices

List Stripe prices with optional filtering. Supports filtering by product, active status, and pagination.

Read read
Parameters
product, active, limit, starting_after
Generic call
kosmo integrations:call stripe.stripe_list_prices '{"product":"example_product","active":true,"limit":1,"starting_after":"example_starting_after"}' --json
Shortcut
kosmo integrations:stripe stripe_list_prices '{"product":"example_product","active":true,"limit":1,"starting_after":"example_starting_after"}' --json

stripe.stripe_create_payment_intent

Create a Stripe payment intent. Amounts are in cents (e.g., $10.00 = 1000). Supports automatic payment methods, manual capture, and metadata.

Write write
Parameters
amount, currency, customer, description, metadata, capture_method, automatic_payment_methods_enabled
Generic call
kosmo integrations:call stripe.stripe_create_payment_intent '{"amount":1,"currency":"example_currency","customer":"example_customer","description":"example_description","metadata":"example_metadata","capture_method":"example_capture_method","automatic_payment_methods_enabled":true}' --json
Shortcut
kosmo integrations:stripe stripe_create_payment_intent '{"amount":1,"currency":"example_currency","customer":"example_customer","description":"example_description","metadata":"example_metadata","capture_method":"example_capture_method","automatic_payment_methods_enabled":true}' --json

stripe.stripe_get_payment_intent

Retrieve a Stripe payment intent by ID. Returns full payment intent details including amount, status, and charges.

Read read
Parameters
id
Generic call
kosmo integrations:call stripe.stripe_get_payment_intent '{"id":"example_id"}' --json
Shortcut
kosmo integrations:stripe stripe_get_payment_intent '{"id":"example_id"}' --json

stripe.stripe_update_payment_intent

Update a Stripe payment intent. Supports updating description and metadata.

Write write
Parameters
id, description, metadata
Generic call
kosmo integrations:call stripe.stripe_update_payment_intent '{"id":"example_id","description":"example_description","metadata":"example_metadata"}' --json
Shortcut
kosmo integrations:stripe stripe_update_payment_intent '{"id":"example_id","description":"example_description","metadata":"example_metadata"}' --json

stripe.stripe_confirm_payment_intent

Confirm a Stripe payment intent. Provide a payment method and optional return URL to confirm the payment.

Write write
Parameters
id, payment_method, return_url
Generic call
kosmo integrations:call stripe.stripe_confirm_payment_intent '{"id":"example_id","payment_method":"example_payment_method","return_url":"example_return_url"}' --json
Shortcut
kosmo integrations:stripe stripe_confirm_payment_intent '{"id":"example_id","payment_method":"example_payment_method","return_url":"example_return_url"}' --json

stripe.stripe_cancel_payment_intent

Cancel a Stripe payment intent. Can only cancel payment intents that are in "requires_payment_method", "requires_capture", or "requires_confirmation" status.

Write write
Parameters
id, cancellation_reason
Generic call
kosmo integrations:call stripe.stripe_cancel_payment_intent '{"id":"example_id","cancellation_reason":"example_cancellation_reason"}' --json
Shortcut
kosmo integrations:stripe stripe_cancel_payment_intent '{"id":"example_id","cancellation_reason":"example_cancellation_reason"}' --json

stripe.stripe_capture_payment_intent

Capture a Stripe payment intent that was created with capture_method="manual". Optionally specify an amount_to_capture to capture less than the original amount. Amounts are in cents.

Write write
Parameters
id, amount_to_capture
Generic call
kosmo integrations:call stripe.stripe_capture_payment_intent '{"id":"example_id","amount_to_capture":1}' --json
Shortcut
kosmo integrations:stripe stripe_capture_payment_intent '{"id":"example_id","amount_to_capture":1}' --json

stripe.stripe_create_invoice

Create a Stripe invoice for a customer. Requires a customer ID. Supports description, subscription, metadata, and auto_advance.

Write write
Parameters
customer, description, subscription, metadata, auto_advance
Generic call
kosmo integrations:call stripe.stripe_create_invoice '{"customer":"example_customer","description":"example_description","subscription":"example_subscription","metadata":"example_metadata","auto_advance":true}' --json
Shortcut
kosmo integrations:stripe stripe_create_invoice '{"customer":"example_customer","description":"example_description","subscription":"example_subscription","metadata":"example_metadata","auto_advance":true}' --json

stripe.stripe_get_invoice

Retrieve a Stripe invoice by ID. Returns full invoice details including line items, totals, and status.

Read read
Parameters
id
Generic call
kosmo integrations:call stripe.stripe_get_invoice '{"id":"example_id"}' --json
Shortcut
kosmo integrations:stripe stripe_get_invoice '{"id":"example_id"}' --json

stripe.stripe_list_invoices

List Stripe invoices with optional filtering. Supports filtering by customer, status, and pagination.

Read read
Parameters
customer, status, limit, starting_after
Generic call
kosmo integrations:call stripe.stripe_list_invoices '{"customer":"example_customer","status":"example_status","limit":1,"starting_after":"example_starting_after"}' --json
Shortcut
kosmo integrations:stripe stripe_list_invoices '{"customer":"example_customer","status":"example_status","limit":1,"starting_after":"example_starting_after"}' --json

stripe.stripe_pay_invoice

Pay a Stripe invoice. The invoice must be in "open" status and the customer must have a payment method.

Write write
Parameters
id
Generic call
kosmo integrations:call stripe.stripe_pay_invoice '{"id":"example_id"}' --json
Shortcut
kosmo integrations:stripe stripe_pay_invoice '{"id":"example_id"}' --json

stripe.stripe_void_invoice

Void a Stripe invoice. Marks the invoice as void. The invoice must be in "draft" or "open" status.

Write write
Parameters
id
Generic call
kosmo integrations:call stripe.stripe_void_invoice '{"id":"example_id"}' --json
Shortcut
kosmo integrations:stripe stripe_void_invoice '{"id":"example_id"}' --json

stripe.stripe_create_subscription

Create a Stripe subscription for a customer. Requires a customer ID and a price ID. Supports quantity, trial periods, and metadata.

Write write
Parameters
customer, price, quantity, trial_period_days, metadata
Generic call
kosmo integrations:call stripe.stripe_create_subscription '{"customer":"example_customer","price":"example_price","quantity":1,"trial_period_days":1,"metadata":"example_metadata"}' --json
Shortcut
kosmo integrations:stripe stripe_create_subscription '{"customer":"example_customer","price":"example_price","quantity":1,"trial_period_days":1,"metadata":"example_metadata"}' --json

stripe.stripe_get_subscription

Retrieve a Stripe subscription by ID. Returns full subscription details including status, plan, billing cycle, and trial info.

Read read
Parameters
id
Generic call
kosmo integrations:call stripe.stripe_get_subscription '{"id":"example_id"}' --json
Shortcut
kosmo integrations:stripe stripe_get_subscription '{"id":"example_id"}' --json

stripe.stripe_cancel_subscription

Cancel a Stripe subscription by ID. Supports proration and immediate invoicing options.

Write write
Parameters
id, prorate, invoice_now
Generic call
kosmo integrations:call stripe.stripe_cancel_subscription '{"id":"example_id","prorate":true,"invoice_now":true}' --json
Shortcut
kosmo integrations:stripe stripe_cancel_subscription '{"id":"example_id","prorate":true,"invoice_now":true}' --json

stripe.stripe_get_balance

Get the Stripe account balance. Returns available and pending balances with amounts per currency.

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

Function Schemas

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

stripe.stripe_create_customer 5 parameters
Schema command
kosmo integrations:schema stripe.stripe_create_customer --json
ParameterTypeRequiredDescription
name string no Customer display name.
email string no Customer email address.
description string no Internal description for this customer.
phone string no Customer phone number.
metadata object no Key-value pairs for additional metadata.
stripe.stripe_get_customer 1 parameters
Schema command
kosmo integrations:schema stripe.stripe_get_customer --json
ParameterTypeRequiredDescription
id string yes Stripe customer ID (e.g., "cus_...").
stripe.stripe_update_customer 6 parameters
Schema command
kosmo integrations:schema stripe.stripe_update_customer --json
ParameterTypeRequiredDescription
id string yes Stripe customer ID (e.g., "cus_...").
name string no Updated customer display name.
email string no Updated customer email address.
description string no Updated internal description.
phone string no Updated phone number.
metadata object no Key-value pairs for additional metadata.
stripe.stripe_list_customers 3 parameters
Schema command
kosmo integrations:schema stripe.stripe_list_customers --json
ParameterTypeRequiredDescription
email string no Filter by customer email address.
limit integer no Number of customers to return (1–100, default 10).
starting_after string no Cursor for pagination — customer ID to start after.
stripe.stripe_delete_customer 1 parameters
Schema command
kosmo integrations:schema stripe.stripe_delete_customer --json
ParameterTypeRequiredDescription
id string yes Stripe customer ID to delete (e.g., "cus_...").
stripe.stripe_create_product 4 parameters
Schema command
kosmo integrations:schema stripe.stripe_create_product --json
ParameterTypeRequiredDescription
name string yes Product name.
description string no Product description.
active boolean no Whether the product is active. Default: true.
metadata object no Key-value pairs for additional metadata.
stripe.stripe_list_products 3 parameters
Schema command
kosmo integrations:schema stripe.stripe_list_products --json
ParameterTypeRequiredDescription
active boolean no Filter by active status.
limit integer no Number of products to return (1–100, default 10).
starting_after string no Cursor for pagination — product ID to start after.
stripe.stripe_get_product 1 parameters
Schema command
kosmo integrations:schema stripe.stripe_get_product --json
ParameterTypeRequiredDescription
id string yes Stripe product ID (e.g., "prod_...").
stripe.stripe_create_price 6 parameters
Schema command
kosmo integrations:schema stripe.stripe_create_price --json
ParameterTypeRequiredDescription
product string yes Product ID this price belongs to (e.g., "prod_...").
unit_amount integer yes Price in cents (e.g., 1000 = $10.00).
currency string yes Three-letter currency code (e.g., "usd", "eur").
recurring_interval string no Recurring interval: "day", "week", "month", or "year". Omit for one-time prices.
recurring_interval_count integer no Number of intervals between billings (e.g., 3 for every 3 months). Default: 1.
metadata object no Key-value pairs for additional metadata.
stripe.stripe_list_prices 4 parameters
Schema command
kosmo integrations:schema stripe.stripe_list_prices --json
ParameterTypeRequiredDescription
product string no Filter by product ID.
active boolean no Filter by active status.
limit integer no Number of prices to return (1–100, default 10).
starting_after string no Cursor for pagination — price ID to start after.
stripe.stripe_create_payment_intent 7 parameters
Schema command
kosmo integrations:schema stripe.stripe_create_payment_intent --json
ParameterTypeRequiredDescription
amount integer yes Amount in cents (e.g., 1000 = $10.00).
currency string yes Three-letter currency code (e.g., "usd", "eur").
customer string no Stripe customer ID to associate with this payment.
description string no Description for this payment.
metadata object no Key-value pairs for additional metadata.
capture_method string no Capture method: "automatic" (default) or "manual".
automatic_payment_methods_enabled boolean no Enable automatic payment methods. Default: true.
stripe.stripe_get_payment_intent 1 parameters
Schema command
kosmo integrations:schema stripe.stripe_get_payment_intent --json
ParameterTypeRequiredDescription
id string yes Payment intent ID (e.g., "pi_...").
stripe.stripe_update_payment_intent 3 parameters
Schema command
kosmo integrations:schema stripe.stripe_update_payment_intent --json
ParameterTypeRequiredDescription
id string yes Payment intent ID (e.g., "pi_...").
description string no Updated description for this payment.
metadata object no Key-value pairs for additional metadata.
stripe.stripe_confirm_payment_intent 3 parameters
Schema command
kosmo integrations:schema stripe.stripe_confirm_payment_intent --json
ParameterTypeRequiredDescription
id string yes Payment intent ID (e.g., "pi_...").
payment_method string no Payment method ID (e.g., "pm_...") or token.
return_url string no URL to redirect after payment completion.
stripe.stripe_cancel_payment_intent 2 parameters
Schema command
kosmo integrations:schema stripe.stripe_cancel_payment_intent --json
ParameterTypeRequiredDescription
id string yes Payment intent ID (e.g., "pi_...").
cancellation_reason string no Reason for cancellation: "abandoned", "automatic", "duplicate", or "requested_by_customer".
stripe.stripe_capture_payment_intent 2 parameters
Schema command
kosmo integrations:schema stripe.stripe_capture_payment_intent --json
ParameterTypeRequiredDescription
id string yes Payment intent ID (e.g., "pi_...").
amount_to_capture integer no Amount to capture in cents. Defaults to full amount if omitted.
stripe.stripe_create_invoice 5 parameters
Schema command
kosmo integrations:schema stripe.stripe_create_invoice --json
ParameterTypeRequiredDescription
customer string yes Stripe customer ID (e.g., "cus_...").
description string no Invoice description.
subscription string no Subscription ID to invoice for.
metadata object no Key-value pairs for additional metadata.
auto_advance boolean no Automatically finalize the invoice. Default: true.
stripe.stripe_get_invoice 1 parameters
Schema command
kosmo integrations:schema stripe.stripe_get_invoice --json
ParameterTypeRequiredDescription
id string yes Invoice ID (e.g., "in_...").
stripe.stripe_list_invoices 4 parameters
Schema command
kosmo integrations:schema stripe.stripe_list_invoices --json
ParameterTypeRequiredDescription
customer string no Filter by customer ID.
status string no Filter by status: "draft", "open", "paid", "uncollectible", or "void".
limit integer no Number of invoices to return (1–100, default 10).
starting_after string no Cursor for pagination — invoice ID to start after.
stripe.stripe_pay_invoice 1 parameters
Schema command
kosmo integrations:schema stripe.stripe_pay_invoice --json
ParameterTypeRequiredDescription
id string yes Invoice ID to pay (e.g., "in_...").
stripe.stripe_void_invoice 1 parameters
Schema command
kosmo integrations:schema stripe.stripe_void_invoice --json
ParameterTypeRequiredDescription
id string yes Invoice ID to void (e.g., "in_...").
stripe.stripe_create_subscription 5 parameters
Schema command
kosmo integrations:schema stripe.stripe_create_subscription --json
ParameterTypeRequiredDescription
customer string yes Stripe customer ID (e.g., "cus_...").
price string yes Price ID to subscribe to (e.g., "price_...").
quantity integer no Quantity for the subscription. Default: 1.
trial_period_days integer no Number of trial days before billing starts.
metadata object no Key-value pairs for additional metadata.
stripe.stripe_get_subscription 1 parameters
Schema command
kosmo integrations:schema stripe.stripe_get_subscription --json
ParameterTypeRequiredDescription
id string yes Subscription ID (e.g., "sub_...").
stripe.stripe_cancel_subscription 3 parameters
Schema command
kosmo integrations:schema stripe.stripe_cancel_subscription --json
ParameterTypeRequiredDescription
id string yes Subscription ID to cancel (e.g., "sub_...").
prorate boolean no Whether to prorate unused time. Default: true.
invoice_now boolean no Whether to generate a final invoice immediately. Default: true.
stripe.stripe_get_balance 0 parameters
Schema command
kosmo integrations:schema stripe.stripe_get_balance --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.