Stripe CLI Logs, Config, and Troubleshooting

Profiles, config, request logs, diagnostics, and troubleshooting patterns for the Stripe CLI.

View
StandardDetailedCompact
Export
Copy the compact sheet, download it, or print it.
Download
`D` dense toggle · `C` copy all

Profiles and Config

List current config

bashANYconfigprofiles
bash
stripe config --list

Show config help

bashANYconfighelp
bash
stripe config --help

Run with a named profile

bashANYprofileconfig
bash
stripe logs tail --profile sandbox-a

Use STRIPE_API_KEY from the environment

Run a command using the environment-provided key instead of interactive login.

bashANYenvapi-keyconfig
bash
STRIPE_API_KEY=sk_test_xxx stripe customers list --limit 3

Persist local project webhook secret example

bashANYlocal-devconfigwebhooks
bash
echo "STRIPE_WEBHOOK_SECRET=whsec_xxx" >> .env.local

Logs and Observability

Tail request logs

bashANYlogsobservability
bash
stripe logs tail

Tail live-mode request logs

bashANYlogslive
bash
stripe logs tail --live

Show only request failures with jq

bashANYlogserrorsjq
bash
stripe logs tail | jq "select(.status >= 400)"

Inspect recent pending webhook events

bashANYeventswebhooksjq
bash
stripe events list --limit 100 | jq ".data[] | select(.pending_webhooks > 0) | {id, type, pending_webhooks}"

Save a log stream to a file

bashANYlogsjsonldebugging
bash
stripe logs tail > stripe-request-log.jsonl

Troubleshooting Patterns

Inspect a failing command with --help

bashANYhelptroubleshooting
bash
stripe payment_intents create --help

Verify the listen output includes a signing secret

When local webhook signature checks fail, restart listen and copy the current whsec value.

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

Expand related objects to debug missing fields

bashANYexpanddebugging
bash
stripe checkout sessions retrieve cs_test_123 --expand payment_intent --expand customer

Retry a request on latest API version

bashANYapi-versioncompatibilitydebugging
bash
stripe customers create --email ada@example.com --latest

Export past-due subscriptions to CSV with jq

bashANYbillingjqautomation
bash
stripe subscriptions list --status past_due --expand data.customer | jq -r ".data[] | [.customer.name, .customer.email] | @csv"

Recommended next

No recommendations yet.