← Back to CLIs
Melvynx

stripe

Manage Stripe payments via CLI - listen for webhooks, trigger events, manage resources, view logs. Use when user mentions 'stripe', 'stripe cli', 'webhook testing', or wants to interact with Stripe API.

Install

$ npx api2cli install stripe

Details

Skill type: Official CLI
Auth type: bearer
Version: 1.0.0
Author: Melvynx
Views: 0

README

stripe

Setup

macOS:

brew install stripe/stripe-cli/stripe

Or download from https://stripe.com/docs/stripe-cli for other platforms.

Verify installation:

stripe --version

Always use --json flag when calling commands programmatically (where supported).

Authentication

stripe login

Resources

Webhooks

CommandDescription
stripe listen --forward-to localhost:3000/api/webhooksForward webhook events to local server
stripe listen --events payment_intent.succeeded,checkout.session.completed --forward-to localhost:3000/api/webhooksListen for specific events only
stripe trigger payment_intent.succeededTrigger a test webhook event
stripe trigger checkout.session.completedTrigger a checkout session event
stripe webhook_endpoints listList registered webhook endpoints

Customers

CommandDescription
stripe customers listList all customers
stripe customers list --limit 5List customers with limit
stripe customers create --email user@test.comCreate a customer
stripe customers retrieve <id>Get a customer by ID
stripe customers delete <id>Delete a customer

Payments

CommandDescription
stripe payments listList all payment intents
stripe charges list --limit 5List recent charges
stripe payment_intents create --amount 2000 --currency usdCreate a payment intent
stripe refunds create --charge <charge_id>Refund a charge

Products and Prices

CommandDescription
stripe products listList all products
stripe products create --name "My Product"Create a product
stripe prices listList all prices
stripe prices create --product <id> --unit-amount 2000 --currency usd --recurring[interval]=monthCreate a recurring price

Subscriptions

CommandDescription
stripe subscriptions listList all subscriptions
stripe subscriptions create --customer <id> --price <id>Create a subscription
stripe subscriptions cancel <id>Cancel a subscription

Events and Logs

CommandDescription
stripe events listList recent events
stripe events retrieve <id>Get event details
stripe logs tailTail API request logs in realtime

Resources

CommandDescription
stripe resourcesList all available API resources

Config

CommandDescription
stripe config --listShow current configuration

Global Flags

FlagDescription
--jsonOutput result as JSON
--api-key <key>Specify API key
--stripe-account <id>Specify connected account
--limit <n>Limit number of results
--color offDisable colored output
Sponsors