agent-stripe
Stripe incident triage CLI for AI agents
- Language
- Go
- Version
- 0.18.0
- License
- PolyForm Perimeter 1.0.0
- Category
- CLI Tool
A read-heavy Stripe investigation CLI for AI agents: payments, invoices, subscriptions, disputes, refunds, balances, Connect transfers and payouts, checkout, catalog and pricing, Radar warnings — across both account namespaces, Connect v1 and Accounts v2 (UA2). Compact structured output, sensitive fields redacted by default, and no direct access to Stripe secrets.
Features
Both account namespaces — Connect v1 accounts and Accounts v2 / UA2, including v2 configurations, capabilities, requirement entries, persons and v2 core events
The /v2 transport handled for you — Bearer auth, its own API version, indexed array parameters and token pagination
Scenario investigations, not just endpoints — invoice payment evidence, checkout completion, card-last4 lookup, renewal summaries, collection risk, refund, dispute and fraud triage, ledger reconciliation, Connect money-movement failures and connected-account health
Redacted by default — sensitive values become [REDACTED] and the object carries an @redacted list naming each path and how to expose it
--expose is deliberate and scoped — comma-separated or repeated, applies to responses and debug bodies, and never reveals a stored profile key
Stripe context aware — Stripe-Context for organization keys and related-account requests, stored on the profile
Keychain-first credentials — API keys live in the keychain, never in config.json, and are never printed back
Only the credential type is stored as metadata — rk_test or sk_live, so auth list can tell you what a profile is without touching the secret
Bounded retries — 429s retry with exponential backoff and jitter, then return fixable_by: retry with Stripe's own rate-limit reason header
Debug without leaks — --debug emits client setup, credential source, request URLs, status codes, request IDs and redacted bodies, but never a raw key
Multi-profile — sandbox, live, organization and holding-account workflows side by side, selected with -p
GET-only raw API escape hatch for anything not yet wrapped
Install
Homebrew
$ brew install shhac/tap/agent-stripe AI Agent Skill
$ npx skills add shhac/agent-skills --skill agent-stripe --global GitHub Release (macOS)
$ curl -L https://github.com/shhac/agent-stripe/releases/latest/download/agent-stripe-darwin-arm64.tar.gz | tar xz Go Install
$ go install github.com/shhac/agent-stripe/cmd/agent-stripe@latest Build from Source
$ git clone https://github.com/shhac/agent-stripe.git && cd agent-stripe && make build Getting Started
agent-stripe needs a Stripe API key, stored in a named profile. When an LLM is guiding setup, prefer --form over --api-key: a native OS dialog asks the user for the key and the CLI returns only a redacted receipt.
01 · Add a profile without the key passing through chat
$ agent-stripe auth add sandbox --form Add --context acct_platform/acct_connected for an organization key or a related-account request; the context is stored as non-secret metadata on the profile.
02 · Check what the profile is
$ agent-stripe auth check sandbox Reports credential_type — rk_test, sk_live and so on. Rotate a key later with auth update <profile> --form, again without exposing it.
03 · Persist your defaults
$ agent-stripe config set max_retries 3 max_retries and timeout_ms persist globally; command-line flags still override them.
04 · Start from recent events
$ agent-stripe events list --type charge.failed --limit 20 Lists stream NDJSON. Every group has a usage page — payments usage, subscriptions usage, connect usage, investigate usage.
Usage
$ agent-stripe investigate invoice-payment in_... $ agent-stripe investigate customer-card-payment --customer cus_... --last4 4242 $ agent-stripe investigate collection-risk --days 30 $ agent-stripe investigate account-health acct_... $ agent-stripe payment-intents get pi_... --expand latest_charge $ agent-stripe subscriptions invoices sub_... --status open $ agent-stripe early-fraud-warnings list --charge ch_... $ agent-stripe payment-intents get pi_... --expose client_secret