← Back to tools

Stripe CLI

Test and manage Stripe integrations from the terminal

Cloud & Services linuxmacoswindows Go Apache-2.0

Description

The Stripe CLI helps developers build, test, and manage Stripe integrations directly from the terminal. It can forward webhook events to a local server, trigger test events, tail API request logs, and interact with Stripe API resources for payments, subscriptions, customers, and more.

Install

homebrewbrew install stripe/stripe-cli/stripe

AI Summary

Test and manage Stripe payment integrations from the terminal. Forward webhooks to localhost, trigger test events, tail API logs, and manage Stripe resources like customers, subscriptions, and invoices.

Capabilities

  • + Forward webhook events to a local development server
  • + Trigger specific webhook test events
  • + Tail real-time API request logs
  • + Create and manage Stripe resources (customers, products, prices)
  • + Test payment flows without a running frontend
  • + View and resend past webhook events

Use When

  • Developing and testing Stripe payment integrations locally
  • Need to receive Stripe webhooks on localhost during development
  • Debugging failed webhook deliveries or API calls
  • Creating test data for Stripe integrations

Avoid When

  • x Production Stripe operations (use the Dashboard for critical actions)
  • x Not using Stripe for payments (use provider-specific tools)
  • x Automated production billing scripts (use the Stripe API directly)

Usage Patterns

Forward webhooks to local server

stripe listen --forward-to localhost:3000/api/webhooks

Forwards all Stripe webhook events to the local development server

Trigger a test event

stripe trigger payment_intent.succeeded

Creates a test PaymentIntent and fires the succeeded webhook event

Tail API logs

stripe logs tail

Streams real-time API request and response logs from Stripe

Create a test customer

stripe customers create --email test@example.com --name 'Test User'

Creates a new customer in the Stripe test environment

Input / Output

stdin: Not typically used
stdout: Webhook events, API logs, and resource details
Exit codes:
0 Success
1 Error

Typical Pipelines

stripe listen --forward-to localhost:3000/webhooks --events payment_intent.succeeded,invoice.paid
stripe customers list --limit 10 | jq '.data[] | {id, email}'
stripe logs tail --filter-status-code 400

Related Tools

View AGENTS.md for Stripe CLI