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.

25 functions 10 read 15 write API key auth

Stripe CLI Setup

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

# 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 use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
api_key STRIPE_API_KEY Secret secret yes Secret API Key

Call Stripe Headlessly

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

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

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

kosmo integrations:stripe stripe_create_customer '{
  "name": "example_name",
  "email": "example_email",
  "description": "example_description",
  "phone": "example_phone",
  "metadata": "example_metadata"
}' --json

Agent Discovery Commands

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

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

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 Stripe.

stripe.stripe_create_customer

Write write

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

Parameters
name, email, description, phone, metadata

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

stripe.stripe_get_customer

Read read

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

Parameters
id

Generic CLI call

kosmo integrations:call stripe.stripe_get_customer '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:stripe stripe_get_customer '{"id":"example_id"}' --json

stripe.stripe_update_customer

Write write

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

Parameters
id, name, email, description, phone, metadata

Generic CLI 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

Provider 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

Read read

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

Parameters
email, limit, starting_after

Generic CLI call

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

Provider shortcut

kosmo integrations:stripe stripe_list_customers '{"email":"example_email","limit":1,"starting_after":"example_starting_after"}' --json

stripe.stripe_delete_customer

Write write

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

Parameters
id

Generic CLI call

kosmo integrations:call stripe.stripe_delete_customer '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:stripe stripe_delete_customer '{"id":"example_id"}' --json

stripe.stripe_create_product

Write write

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

Parameters
name, description, active, metadata

Generic CLI call

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

Provider shortcut

kosmo integrations:stripe stripe_create_product '{"name":"example_name","description":"example_description","active":true,"metadata":"example_metadata"}' --json

stripe.stripe_list_products

Read read

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

Parameters
active, limit, starting_after

Generic CLI call

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

Provider shortcut

kosmo integrations:stripe stripe_list_products '{"active":true,"limit":1,"starting_after":"example_starting_after"}' --json

stripe.stripe_get_product

Read read

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

Parameters
id

Generic CLI call

kosmo integrations:call stripe.stripe_get_product '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:stripe stripe_get_product '{"id":"example_id"}' --json

stripe.stripe_create_price

Write write

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.

Parameters
product, unit_amount, currency, recurring_interval, recurring_interval_count, metadata

Generic CLI 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

Provider 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

Read read

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

Parameters
product, active, limit, starting_after

Generic CLI call

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

Provider 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

Write write

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

Parameters
amount, currency, customer, description, metadata, capture_method, automatic_payment_methods_enabled

Generic CLI 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

Provider 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

Read read

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

Parameters
id

Generic CLI call

kosmo integrations:call stripe.stripe_get_payment_intent '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:stripe stripe_get_payment_intent '{"id":"example_id"}' --json

stripe.stripe_update_payment_intent

Write write

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

Parameters
id, description, metadata

Generic CLI call

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

Provider shortcut

kosmo integrations:stripe stripe_update_payment_intent '{"id":"example_id","description":"example_description","metadata":"example_metadata"}' --json

stripe.stripe_confirm_payment_intent

Write write

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

Parameters
id, payment_method, return_url

Generic CLI call

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

Provider 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

Write write

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

Parameters
id, cancellation_reason

Generic CLI call

kosmo integrations:call stripe.stripe_cancel_payment_intent '{"id":"example_id","cancellation_reason":"example_cancellation_reason"}' --json

Provider shortcut

kosmo integrations:stripe stripe_cancel_payment_intent '{"id":"example_id","cancellation_reason":"example_cancellation_reason"}' --json

stripe.stripe_capture_payment_intent

Write write

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.

Parameters
id, amount_to_capture

Generic CLI call

kosmo integrations:call stripe.stripe_capture_payment_intent '{"id":"example_id","amount_to_capture":1}' --json

Provider shortcut

kosmo integrations:stripe stripe_capture_payment_intent '{"id":"example_id","amount_to_capture":1}' --json

stripe.stripe_create_invoice

Write write

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

Parameters
customer, description, subscription, metadata, auto_advance

Generic CLI call

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

Provider 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

Read read

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

Parameters
id

Generic CLI call

kosmo integrations:call stripe.stripe_get_invoice '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:stripe stripe_get_invoice '{"id":"example_id"}' --json

stripe.stripe_list_invoices

Read read

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

Parameters
customer, status, limit, starting_after

Generic CLI call

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

Provider 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

Write write

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

Parameters
id

Generic CLI call

kosmo integrations:call stripe.stripe_pay_invoice '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:stripe stripe_pay_invoice '{"id":"example_id"}' --json

stripe.stripe_void_invoice

Write write

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

Parameters
id

Generic CLI call

kosmo integrations:call stripe.stripe_void_invoice '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:stripe stripe_void_invoice '{"id":"example_id"}' --json

stripe.stripe_create_subscription

Write write

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

Parameters
customer, price, quantity, trial_period_days, metadata

Generic CLI call

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

Provider 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

Read read

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

Parameters
id

Generic CLI call

kosmo integrations:call stripe.stripe_get_subscription '{"id":"example_id"}' --json

Provider shortcut

kosmo integrations:stripe stripe_get_subscription '{"id":"example_id"}' --json

stripe.stripe_cancel_subscription

Write write

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

Parameters
id, prorate, invoice_now

Generic CLI call

kosmo integrations:call stripe.stripe_cancel_subscription '{"id":"example_id","prorate":true,"invoice_now":true}' --json

Provider shortcut

kosmo integrations:stripe stripe_cancel_subscription '{"id":"example_id","prorate":true,"invoice_now":true}' --json

stripe.stripe_get_balance

Read read

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

Parameters
none

Generic CLI call

kosmo integrations:call stripe.stripe_get_balance '{}' --json

Provider 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

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

Operation
Write write
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

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

Operation
Read read
Schema command
kosmo integrations:schema stripe.stripe_get_customer --json
ParameterTypeRequiredDescription
id string yes Stripe customer ID (e.g., "cus_...").

stripe.stripe_update_customer

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

Operation
Write write
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

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

Operation
Read read
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

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

Operation
Write write
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

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

Operation
Write write
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

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

Operation
Read read
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

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

Operation
Read read
Schema command
kosmo integrations:schema stripe.stripe_get_product --json
ParameterTypeRequiredDescription
id string yes Stripe product ID (e.g., "prod_...").

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.

Operation
Write write
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

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

Operation
Read read
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

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

Operation
Write write
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

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

Operation
Read read
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

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

Operation
Write write
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

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

Operation
Write write
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

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

Operation
Write write
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

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.

Operation
Write write
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

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

Operation
Write write
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

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

Operation
Read read
Schema command
kosmo integrations:schema stripe.stripe_get_invoice --json
ParameterTypeRequiredDescription
id string yes Invoice ID (e.g., "in_...").

stripe.stripe_list_invoices

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

Operation
Read read
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

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

Operation
Write write
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

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

Operation
Write write
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

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

Operation
Write write
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

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

Operation
Read read
Schema command
kosmo integrations:schema stripe.stripe_get_subscription --json
ParameterTypeRequiredDescription
id string yes Subscription ID (e.g., "sub_...").

stripe.stripe_cancel_subscription

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

Operation
Write write
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

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

Operation
Read read
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.