stripe-logs
Tail live Stripe API request logs
TLDR
SYNOPSIS
stripe logs tail [options]
DESCRIPTION
stripe logs tail is a subcommand of the Stripe CLI. It opens a direct connection to Stripe and prints API request logs from the current sandbox as they arrive, similar to the Logs view in the Dashboard.Each default line includes a timestamp, status, method, path, and a request id that links to the Dashboard log. Combine filters; an entry is shown only when it matches every filter. A single filter may take several values as a comma-separated list.Use --format JSON when piping into jq or other tools.
PARAMETERS
tail
Stream API request logs in real time. This is the only logs subcommand.--filter-http-method GET|POST|DELETE
Keep requests with these HTTP methods. Repeat or comma-separate for several values.--filter-request-path path
Keep requests whose path matches a Stripe API path (e.g. `/v1/charges`).--filter-status-code code
Keep requests with this HTTP status code.--filter-status-code-type 2XX|4XX|5XX
Keep requests whose status falls in that class.--filter-request-status SUCCEEDED|FAILED
SUCCEEDED is HTTP 200, 201, or 202. FAILED is 4xx and 5xx.--filter-source API|DASHBOARD
Keep requests that came from the Stripe API or from the Dashboard.--filter-ip-address address
Keep requests from this client IP.--filter-account connectin|connectout|self
Connect only: incoming Connect, outgoing Connect, or non-Connect (`self`) traffic.--format JSON
Print each log entry as JSON.
INSTALL
CAVEATS
Requires stripe login. stripe logs tail works only in sandboxes. In live mode the command errors and tells you to stripe switch to a sandbox.Logs appear only while the process is running. Historical logs are not replayed.Filter values are validated: unknown HTTP methods, status classes, sources, or request-status tokens are rejected before the stream starts.
HISTORY
The Stripe CLI was released by Stripe in 2019. logs tail was added so developers can watch API traffic from the same terminal they use for stripe listen and resource commands.
SEE ALSO
stripe(1), stripe-listen(1), jq(1)
