# Stripe CLI for webhook testing and payment development
A practical CLI for testing Stripe webhooks, creating test events, and debugging payment integrations.
Agent Readiness Score: 84/100
Strong for local payment testing when limited to test mode and webhook workflows.
## Install

- Homebrew: `brew install stripe/stripe-cli/stripe`
- Docker: `docker run --rm -it stripe/stripe-cli`

## Structured output

Supported output formats: json, text.
Prefer structured output flags such as `--json`, `--format json`, or equivalent when available.

## Safe commands

- Listen for webhooks: `stripe listen --forward-to localhost:3000/api/webhooks/stripe` — Forwards test webhooks to local development.
- Trigger checkout event: `stripe trigger checkout.session.completed` — Creates a test event for webhook validation.

## Commands requiring approval

- Create live refund: `stripe refunds create --charge ch_...` — destructive; require explicit user approval.

## Agent instructions

- Claude Code: Use Stripe CLI in test mode to trigger webhook events and verify handlers. Never run live refund or cancellation commands without approval.

## Safety notes

- Listen and trigger commands are good for local webhook testing.
- Commands that create, refund, or cancel live resources must require explicit approval.
- Use test mode keys for agent-driven development work.

## Metadata

Official URL: https://stripe.com/docs/stripe-cli
GitHub: https://github.com/stripe/stripe-cli
Docs: https://stripe.com/docs/stripe-cli
