Stripe CLI reference ## Stripe CLI reference This reference documents every command and flag available in Stripe’s command-line interface. The Stripe CLI helps you build, test, and manage your Stripe integration right from the terminal. With the CLI, you can: - Create, retrieve, update, and delete API objects. - Tail API request logs in real time. - Securely test webhooks without relying on third-party tunneling software. - Send transfers to Stripe profiles with the stripe pay plugin. ## Install the Stripe CLI Install the Stripe CLI with npm. Once the CLI is installed, you can log in to Stripe, install agent tooling, or set up autocompletion. > For more installation options for Windows, macOS, Linux, and Docker, check the Stripe CLI readme on GitHub. ## Upgrade the Stripe CLI Keep your Stripe CLI up to date to access new features, improvements, and security updates. > If you used an alternate installation method, check the Stripe CLI readme for platform-specific upgrade options. ## Uninstall the Stripe CLI Uninstall the Stripe CLI with npm. Before uninstalling, run stripe logout --all to remove your login credentials. To remove configuration files, delete ~/.config/stripe on macOS and Linux, or %the related setting%\.config\stripe on Windows. If you set an the related setting environment variable, the directory is $the related setting/stripe. On Windows, delete the directory with rmdir /s /q "%the related setting%\.config\stripe" in Command Prompt, or Remove-Item -Recurse -Force "$env:the related setting\.config\stripe" in PowerShell. > If you installed the CLI using an alternate method, uninstall the same way. ## login Connect the CLI to your Stripe account with a browser-based login flow. The CLI displays a pairing code and opens the Stripe Dashboard, where you confirm the code and configure the CLI's access to accounts, sandboxes, and live mode. After approval, the CLI stores your credentials in your operating system's secure credential store (when available) and refreshes the session automatically. Use stripe login list to inspect authorized contexts and stripe switch context to select another context. To change permissions or add accounts or sandboxes, use stripe reauth. To revoke the session and clear its local credentials, use stripe logout. If you need to authenticate with an API key instead, use stripe login --interactive or one of the other API-key options. > If you're already authenticated, stripe login keeps your current session. Use stripe login --new-session to revoke the current authentication and log in to a new session. Command: stripe login ### Flags - -i, --interactive Use interactive configuration mode if you cannot open a browser and would like to manually provide an API key. - --non-interactive Print the browser URL, verification code, and next command as JSON, then exit. This behavior activates automatically when standard input isn't a terminal. Run the returned next_step command immediately after you approve access in the browser. - `--complete=
Poll the URL provided by thenext_stepoutput fromstripe login --non-interactiveuntil you approve access, then save the credentials. ---new-sessionRevoke the current authentication and log in to a new session. ### Examples **Basic login** ```sh stripe login ``` **Start login in a non-interactive environment** ```sh stripe login --non-interactive ``` ``` { "browser_url": "https://dashboard.stripe.com/stripecli/confirm?...", "verification_code": "the related setting-the related setting", "next_step": "stripe login --complete 'https://...'" } ``` **Log in using interactive mode** ```sh stripe login --interactive ``` ``` Enter your API key: Your API key is: sk_******************************p7dc ... ``` ## login list List the account and sandbox contexts authorized for the current session. Each context shows its available sandbox or live mode, and the active context is marked. Use [stripe switch context](./context.md) to select a different authorized context. To authorize more accounts or sandboxes, or to change permissions, use [stripe reauth](./reauth.md). **Command:**stripe login list### Examples **List authorized contexts** ```sh stripe login list ``` ## Switch context Select the account or sandbox that the CLI uses for subsequent commands. Run the command without an account ID to choose from an interactive list of authorized contexts. When you provide an account ID, the CLI selects a sandbox by default. Use--liveto select live mode. You can only select contexts authorized during [stripe login](./login.md) or [stripe reauth](./reauth.md). **Command:**stripe switch context### Arguments -[account_id]The ID of an authorized account or sandbox. Omit it to choose a context interactively. ### Flags ---liveSelect live mode for the specified account. Without this flag, the command selects a sandbox. ### Examples **Choose a context interactively** ```sh stripe switch context ``` **Switch to an account in a sandbox** ```sh stripe switch context acct_1234 ``` **Switch to an account in live mode** ```sh stripe switch context acct_1234 --live ``` ## reauth Reauthorize the current session to change its permissions or authorize additional accounts or sandboxes. The command opens the Stripe Dashboard, where you can update consent for the session. After reauthorization, use [stripe login list](./list.md) to inspect the authorized contexts and [stripe switch context](./context.md) to select one. If the current session expired or was revoked, use [stripe login](./login.md) instead. **Command:**stripe reauth### Examples **Change authorization** ```sh stripe reauth ``` ## logout Revoke the current session and clear its locally stored credentials and context information. After logging out, run [stripe login](./login.md) to authorize the CLI again. If you use legacy project profiles authenticated with API keys, use--allto clear credentials for every project profile. **Command:**stripe logout### Flags --a, --allClear credentials for all project profiles you're currently logged in to. ### Examples **Revoke the session and clear credentials** ```sh stripe logout ``` **Clear credentials for all project profiles** ```sh stripe logout --all ``` ## sandbox If your CLI isn't logged into Stripe, this command provisions a new sandbox with working test API keys, without requiring an account. This enables you, a coding agent, or an automated workflow to start building a Stripe integration immediately. Your temporary sandbox credentials are saved to your CLI profile so that other commands work without needing to log in. You can convert a sandbox into a full Stripe account within seven days with thesandbox claimcommand. If you're already [logged in](./login.md),sandbox createopens the sandbox management page in your Stripe Dashboard. > Sandbox environments expire after 7 days. Claim your sandbox before it expires by runningstripe sandbox claimto keep your account and data. **Command:**stripe sandbox
[flags]### Subcommands -createProvision a new sandbox environment with test API keys. Uses a proof-of-work challenge to verify the request, then saves the keys to your current CLI profile so subsequentstripecommands work immediately. -claimOpen the claim URL for your active sandbox in a browser. After claiming, runstripe loginto get permanent keys. ### Flags for sandbox create ---email
Your email address. Required unless--from-gitis used. Mutually exclusive with--from-git. - --from-gitInfer your email and full name fromgit config user.emailandgit config user.name. Mutually exclusive with --email. - --full-name
Your full name (optional). Automatically inferred if--from-gitis used. ---non-interactivePrint output directly without waiting for input. Useful for scripting and agent-assisted workflows. ### Flags for sandbox claim ---non-interactivePrint the claim URL directly without waiting for input. ### Examples **Create a sandbox with an email** ```sh stripe sandbox create --email ``` ``` Setting up your sandbox... done. { "secret_key": "rkcs_test_abc123", "publishable_key": "pk_test_def456", "claim_url": "https://dashboard.stripe.com/onboard_sandbox/0000000...", "account_id": "acct_ghi789", "expires_at": "2026-06-23" } Use the keys above to start building your integration. This sandbox expires 2026-06-23 (in 7 days). Claim it before then by using the above claim_url or runningstripe sandbox claim. ``` **Create a sandbox using git config** ```sh stripe sandbox create --from-git ``` ``` Using email: (from git config) Setting up your sandbox... done. { "secret_key": "rkcs_test_abc123", "publishable_key": "pk_test_def456", "claim_url": "https://dashboard.stripe.com/onboard_sandbox/0000000...", "account_id": "acct_ghi789", "expires_at": "2026-06-23" } Use the keys above to start building your integration. This sandbox expires 2026-06-23 (in 7 days). Claim it before then by using the above claim_url or running stripe sandbox claim. ``` **Claim your sandbox** ```sh stripe sandbox claim ``` ``` Claim your sandbox (acct_ghi789) by visiting the claim link below. Press Enter to open the browser or visit https://dashboard.stripe.com/onboard_sandbox/000000... ``` ## agent setup Set up tooling to help AI coding agents use Stripe. This command detects common agent harnesses and installs the relevant Stripe plugin, skills, and MCP server. > Supports Claude Code, Codex, and Cursor. **Command:** stripe agent setup### Flags ---client
Limit setup to a specific client. Supportsclaude-code, codex, and cursor. - --forceReinstall agent tooling even if it's already installed. ---jsonPrint machine-readable status and planned actions without making changes. ---skillsInstall Stripe skills directly, without an interactive prompt. ---skills-scope
Select where to install Stripe skills. Uselocalfor the current directory orglobalfor your home directory. Default islocal. - --statusSee the currently installed agent tooling. --y, --yesSkip interactive prompts and set up all detected clients. ### Examples **Set up detected AI coding clients interactively** ```sh stripe agent setup ``` ## Using Stripe API keys The recommended way to connect the Stripe CLI to your account is the browser-based login flow provided by [stripe login](./login.md). The CLI stores your credentials in your operating system's secure credential store (when available) and refreshes the session automatically. To authenticate with an [API key](https://docs.stripe.com/keys.md) instead, use one of these options: 1. [stripe login --interactive](./login.md) 1. [stripe config](./config.md) 1. The--api-keyflag 1. Environment variables Usestripe login --interactiveto enter an API key manually. Usingstripe configallows you to set persistent keys manually: -stripe config --set test_mode_api_key sk_test_123 --api-keyis a global flag that overrides your local configuration if you need to run one-off commands with a specific API key. You can set two environment variables, which take precedence over all other values: -the related setting: the API key to use for the CLI. - the related setting: the device name for the CLI, visible in the Dashboard. ## config Use the configcommand to manually set configuration options for the CLI. Theconfigcommand supports: * Setting options * Unsetting options * Listing all configured options * Opening the configuration file with your default editor All commands support the--project-nameglobal flag. You can define a unique configuration for individual projects. **Command:**stripe config### Flags --e, --editOpens the configuration file in your default editor. ---listLists all configured options (including defaults). ---set
Set a value for the specified configuration option. ---unset
Unset the configuration option and remove the key-value pair from the configuration file. ### Examples **Set a configuration option** ```sh stripe config --set color on ``` **Unset a configuration option** ```sh stripe config --unset color ``` **List the currently configured options** ```sh stripe config --list ``` ``` color = "on" [default] device_name = "st-stripe1" live_mode_api_key = "rk_live_abc123" live_mode_publishable_key = "pk_live_abc123" test_mode_api_key = "rk_test_abc123" test_mode_publishable_key = "pk_test_abc123" ``` ## completion The Stripe CLI supports autocompletion for macOS and Linux to make it easier to use the right commands with the CLI with the Bash and ZSH shells. Set up autocompletion by runningstripe completion. Depending on your platform and shell, relevant instructions will be displayed. Details about setting up autocompletion are available on this page. > Shell completion scripts are not currently supported on Windows. **Command:** stripe completion### Flags ---shell
The shell for which autocompletion commands will be generated. By default the CLI will attempt to autodetect the platform. -bashUse for Bash environments. -zshUse for ZSH environments. ### Examples **Basic usage** ```sh stripe completion ``` **Specifying a shell** ```sh stripe completion --shell zsh ``` ## Global Flags The Stripe CLI supports a number of flags for every command. **Command:**stripe {command}
### Flags ---api-key
Use the Stripe account associated with this Stripe API secret key. ---color
Enable or disable color output. -onEnable color output. -offDisable color output. -autoUse the default output color based on global settings. ---config
Use this file path for the CLI's configuration file (default:$the relevant part of the product). - --device-name
Run this command on behalf of another device. --h, --helpProvides the help documentation for a given command, including the supported flags and arguments. ---log-level
Set the level of detail for log messages (default:info) - debugUseful for development purposes. -infoShows standard logs that come up. -warnShows warnings that are detected. -errorShows every log including errors that arise. --p, --project-name
Define a project name for the CLI's current configuration. Using the--project-nameflag enables multiple configurations across Stripe accounts (stored within one configuration file), and any command can run in the context of a project (default:"default"). - -v, --versionPrints the version of the Stripe CLI. This flag is meant to run without any other flags or arguments set. ## docs Browse docs.stripe.com from the terminal. Read any documentation page by passing its path, or use theapiandsearchsubcommands to look up API reference pages and search documentation by keyword. **Command:**stripe docs### Arguments -
Path of the docs.stripe.com page to read (for example,/paymentsor/api/customers). ### Flags - --no-pagerWrite output directly to stdout instead of opening an interactive pager. ---non-interactiveWrite output directly to stdout without the interactive browser. ### Examples **Read a documentation page** ```sh stripe docs /payments ``` **Read an API reference page** ```sh stripe docs /api/customers ``` ## docs api Look up Stripe API reference documentation by resource name, HTTP method and path, or event type. **Command:**stripe docs api### Arguments -
Identifier used to look up an API reference page. -resourceResource name (for example,productorcustomer). -
HTTP method and path (for example,GET /v1/productsorPOST /v1/products/{id}). -
Event type (for example,charge.succeededorpayment_intent.created). ### Examples **Look up a resource** ```sh stripe docs api product ``` **Look up by HTTP method and path** ```sh stripe docs api GET /v1/products ``` **Look up an event type** ```sh stripe docs api charge.succeeded ``` ## docs search Search docs.stripe.com from the terminal by keyword or phrase. **Command:** stripe docs search### Arguments -
Keyword or phrase to search for on docs.stripe.com. ### Examples **Search by keyword** ```sh stripe docs search refund ``` **Search by phrase** ```sh stripe docs search "dispute evidence" ``` ## Webhook commands Listen for [webhook events](https://docs.stripe.com/webhooks.md) and forward them to your application. Trigger and resend webhook events. ## logs tail Establishes a direct connection to Stripe so you can tail Stripe API request logs from your sandbox in real time. Multiple filters can be used together and a log entry must match all filters to be shown. When specifying a filter, multiple values can be provided as a comma-separated list. A log entry only needs to match one of the values. >logs tailonly supports displaying request logs from a sandbox. **Command:**stripe logs tail### Flags ---filter-account
Filter request logs by the source and destination account. -connect_inIncoming Connect requests. -connect_outOutgoing Connect requests. -selfNon-Connect requests. ---filter-http-method
Filter request logs by HTTP method. -GETHTTP GET requests. -POSTHTTP POST requests. -DELETEHTTP DELETE requests. ---filter-ip-address
Filter request logs by IP address. ---filter-request-path
Filter request logs that directly match any Stripe path (e.g./v1/charges). - --filter-request-status
Filter request logs by the response status. -the related settingRequests that succeeded (HTTP 200, 201, 202 status codes). -the related settingRequests that failed (HTTP 4xx and 5xx status codes). ---filter-source
Filter request logs by the source of each request. -APIRequests created with the Stripe API. -the related settingRequests created from the Dashboard. ---filter-status-code
Filter request logs by HTTP status code. ---filter-status-code-type
Filter request logs by the type of HTTP status code. -2XXHTTP 2xx status codes. -4XXHTTP 4xx status codes. -5XXHTTP 5xx status codes. ---format
Specifies the output format for request logs. -JSONOutput logs in JSON format. ### Examples **Basic usage** ```sh stripe logs tail ``` ``` > Ready! You're now waiting to receive API request logs 2022-01-28 09:47:46 [200] POST /v1/customers [req_abc123] 2022-01-28 09:48:22 [200] POST /v1/charges [req_def456] 2022-01-28 09:48:58 [200] POST /v1/charges [req_ghi789] ... ``` **Use multiple log filters** ```sh stripe logs tail \ --filter-http-method POST \ --filter-status-code-type 4XX ``` **Use multiple values for log filters** ```sh stripe logs tail --filter-http-method GET,POST ``` ## listen Receive webhook events from Stripe on your local machine via a direct connection to Stripe's API. Thelistencommand can receive events based on your account's default API version or the latest version, filter by type of event, or forward events to an application running on a given port. By default,listenaccepts all snapshot webhook events and displays them in your terminal. In order to listen to thin events, you must pass them in via--thin-events. > You don't need to configure any webhook endpoints in your Dashboard to receive webhooks with the CLI. > > The webhook signing secret provided will not change between restarts to the listencommand. **Command:**stripe listen### Flags --e, --events
A comma-separated list of which snapshot events to listen for. The [event types documentation](https://docs.stripe.com/api/events/types.md) includes a complete list (default:[*]for all events). --f, --forward-to
The URL that snapshot webhook events will be forwarded to. Returns a [webhook signing secret](https://docs.stripe.com/webhooks/signatures.md) which you can add to your application's configuration. --H, --headers
A comma-separated list of custom HTTP headers to forward. Ex:"Key1:Value1, Key2:Value2"--c, --forward-connect-to
The URL that Connect webhook events will be forwarded to. By default, the same URL will be used for all snapshot webhook events. ---connect-headers
A comma-separated list of custom HTTP headers to forward to any connected accounts. This is useful when testing a [Connect](https://docs.stripe.com/connect.md) platform. Ex:"Key1:Value1, Key2:Value2"---thin-events
A comma-separated list of which thin events to listen for. The [event types documentation](https://docs.stripe.com/api/v2/core/events/event-types.md) includes a complete list. Use*for all events. (default: none). ---forward-thin-to
The URL that thin webhook events will be forwarded to. Returns a [webhook signing secret](https://docs.stripe.com/webhooks/signatures.md) which you can add to your application's configuration. ---forward-thin-connect-to
The URL that thin Connect webhook events will be forwarded to. By default, the same URL will be used for all thin webhook events. --l, --latestReceive events used in the latest API version. By default, webhook events received will depend on your account's default API version. ---liveMake a live request. Requests run in a sandbox by default. --a, --load-from-webhooks-apiListen for all webhook events based on your existing webhook endpoints configured in the Dashboard and API. --j, --print-jsonPrint JSON objects to stdout. ---print-secretOnly print the webhook signing secret and exit. ---skip-verifySkip certificate verification when forwarding to HTTPS endpoints. ### Examples **Basic usage** ```sh stripe listen ``` ``` > Ready! Your webhook signing secret is whsec_abcdefg1234567 2022-01-28 09:47:46 --> customer.created [evt_abc123] 2022-01-28 09:48:22 --> charge.succeeded [evt_def456] 2022-01-28 09:48:58 --> charge.succeeded [evt_ghi789] ``` **Forward webhook events to an application** ```sh stripe listen --forward-to http://localhost:4242 ``` **Filter webhook events by type** ```sh stripe listen --events=payment_intent.succeeded ``` ## trigger [Trigger example webhook events](./trigger.md) to conduct local testing. These test webhook events are based on real API objects and may trigger other webhook events as part of the test (for example, triggeringpayment_intent.succeededalso triggerspayment_intent.created). The [event types documentation](https://docs.stripe.com/api/events/types.md) includes a complete list of webhook events and when they would be triggered. > Events are triggered by issuing HTTP requests against the Stripe API. Because of this, triggering events causes side effects: all necessary API objects will be created in the process. **Command:** stripe trigger### Arguments -
The webhook events we currently support are listed below (or usingstripe help trigger): - account.application.deauthorizedOccurs whenever a user deauthorizes an application. Sent to the related application only. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-account.application.deauthorized). -account.updatedOccurs whenever an account status or property has changed. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-account.updated). -balance.availableOccurs whenever your Stripe balance has been updated (e.g., when a charge is available to be paid out). By default, Stripe automatically transfers funds in your balance to your bank account on a daily basis. This event is not fired for negative transactions. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-balance.available). -charge.capturedOccurs whenever a previously uncaptured charge is captured. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-charge.captured). -charge.dispute.createdOccurs whenever a customer disputes a charge with their bank. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-charge.dispute.created). -charge.failedOccurs whenever a failed charge attempt occurs. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-charge.failed). -charge.refundedOccurs whenever a charge is refunded, including partial refunds. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-charge.refunded). -charge.refund.updatedOccurs whenever a refund is updated, on selected payment methods. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-charge.refund.updated). -charge.succeededOccurs whenever a new charge is created and is successful. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-charge.succeeded). -checkout.session.async_payment_failedOccurs when a payment intent using a delayed payment method fails. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-checkout.session.async_payment_failed). -checkout.session.async_payment_succeededOccurs when a payment intent using a delayed payment method finally succeeds. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-checkout.session.async_payment_succeeded). -checkout.session.completedOccurs when a Checkout Session has been successfully completed. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-checkout.session.completed). -customer.createdOccurs whenever a new customer is created. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-customer.created). -customer.deletedOccurs whenever a customer is deleted. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-customer.deleted). -customer.source.createdOccurs whenever a new source is created for a customer. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-customer.source.created). -customer.source.updatedOccurs whenever a source's details are changed. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-customer.source.updated). -customer.subscription.createdOccurs whenever a customer is signed up for a new plan. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-customer.subscription.created). -customer.subscription.deletedOccurs whenever a customer's subscription ends. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-customer.subscription.deleted). -customer.subscription.updatedOccurs whenever a subscription changes (e.g., switching from one plan to another, or changing the status from trial to active). Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-customer.subscription.updated). -customer.updatedOccurs whenever any property of a customer changes. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-customer.updated). -invoice.createdOccurs whenever a new invoice is created. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-invoice.created). -invoice.finalizedOccurs whenever a draft invoice is finalized and updated to be an open invoice. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-invoice.finalized). -invoice.paidOccurs whenever an invoice payment attempt succeeds or an invoice is marked as paid out-of-band. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-invoice.paid). -invoice.payment_action_requiredOccurs whenever an invoice payment attempt requires further user action to complete. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-invoice.payment_action_required). -invoice.payment_failedOccurs whenever an invoice payment attempt fails, due either to a declined payment or to the lack of a stored payment method. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-invoice.payment_failed). -invoice.payment_succeededOccurs whenever an invoice payment attempt succeeds. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-invoice.payment_succeeded). -invoice.updatedOccurs whenever an invoice changes (e.g., the invoice amount). Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-invoice.updated). -issuing_authorization.requestRepresents a synchronous request for authorization. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-issuing_authorization.request). -issuing_card.createdOccurs whenever a card is created. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-issuing_card.created). -issuing_cardholder.createdOccurs whenever a cardholder is created. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-issuing_cardholder.created). -payment_intent.amount_capturable_updatedOccurs when a PaymentIntent has funds to be captured. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-payment_intent.amount_capturable_updated). -payment_intent.canceledOccurs when a PaymentIntent is canceled. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-payment_intent.canceled). -payment_intent.createdOccurs when a new PaymentIntent is created. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-payment_intent.created). -payment_intent.partially_fundedOccurs when funds are applied to a customer_balance PaymentIntent and theamount_remainingchanges. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-payment_intent.partially_funded). -payment_intent.payment_failedOccurs when a PaymentIntent has failed the attempt to create a payment method or a payment. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-payment_intent.payment_failed). -payment_intent.requires_actionOccurs when a PaymentIntent transitions to requires_action state. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-payment_intent.requires_action). -payment_intent.succeededOccurs when a PaymentIntent has successfully completed payment. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-payment_intent.succeeded). -payment_link.createdOccurs when a payment link is created. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-payment_link.created). -payment_link.updatedOccurs when a payment link is updated. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-payment_link.updated). -payment_method.attachedOccurs whenever a new payment method is attached to a customer. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-payment_method.attached). -payment_method.detachedOccurs whenever a new payment method is detached from a customer. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-payment_method.detached). -payout.createdOccurs whenever a payout is created. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-payout.created). -payout.updatedOccurs whenever a payout is updated. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-payout.updated). -plan.createdOccurs whenever a plan is created. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-plan.created). -plan.deletedOccurs whenever a plan is deleted. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-plan.deleted). -plan.updatedOccurs whenever a plan is updated. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-plan.updated). -price.createdOccurs whenever a price is created. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-price.created). -price.updatedOccurs whenever a price is updated. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-price.updated). -product.createdOccurs whenever a product is created. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-product.created). -product.deletedOccurs whenever a product is deleted. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-product.deleted). -product.updatedOccurs whenever a product is updated. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-product.updated). -quote.acceptedOccurs whenever a quote is accepted. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-quote.accepted). -quote.canceledOccurs whenever a quote is canceled. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-quote.canceled). -quote.createdOccurs whenever a quote is created. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-quote.created). -quote.finalizedOccurs whenever a quote is finalized. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-quote.finalized). -reporting.report_run.succeededOccurs whenever a requestedReportRuncompleted successfully. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-reporting.report_run.succeeded). -setup_intent.canceledOccurs when a SetupIntent is canceled. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-setup_intent.canceled). -setup_intent.createdOccurs when a new SetupIntent is created. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-setup_intent.created). -setup_intent.setup_failedOccurs when a SetupIntent has failed the attempt to setup a payment method. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-setup_intent.setup_failed). -setup_intent.succeededOccurs when an SetupIntent has successfully setup a payment method. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-setup_intent.succeeded). -subscription_schedule.canceledOccurs whenever a subscription schedule is canceled. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-subscription_schedule.canceled). -subscription_schedule.createdOccurs whenever a subscription schedule is created. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-subscription_schedule.created). -subscription_schedule.releasedOccurs whenever a subscription schedule is released. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-subscription_schedule.released). -subscription_schedule.updatedOccurs whenever a subscription schedule is updated. Read more in our [API documentation](https://docs.stripe.com/api/events/types.md#event_types-subscription_schedule.updated). ### Flags ---stripe-accountSet a header identifying the connected account. ---override [resource]:[path1].[path2]=[value]Override the param atpath1.path2for theresource. Example: --override plan:product.name=overrideName. To index into an array, use bracket notation: --override "checkout_session:line_items[0].quantity=10". In some shells, you may need to wrap the value in quotes to prevent shell interpretation of special characters like brackets. - --add [resource]:[path1].[path2]=[value]Add the parampath1.path2to theresource. Example: --add payment_intent:customer=customerId---remove [resource]:[path1].[path2]Remove the param atpath1.path2from theresource. Example: --remove customer:description---skip [param]Skip specific steps in the trigger. Example:--skip cus_jenny_rosen---editEdit the fixture directly in your default IDE before triggering. Cannot be used with--add, --remove, --override, or --skip. ### Examples **Triggering an event** ```sh stripe trigger invoice.payment_succeeded ``` ``` Setting up fixture for: customer Setting up fixture for: invoiceitem Setting up fixture for: invoice Setting up fixture for: invoice_pay Trigger succeeded! Check dashboard for event details. ``` **Listing supported events** ```sh stripe trigger --help ``` ``` Supported events: balance.available charge.captured charge.dispute.created charge.failed charge.refunded charge.succeeded ... ``` ## events resend Resend an event to the CLI's local webhook endpoint. You must pass --webhook-endpoint=we_123456to resend the event to a specific webhook endpoint. You can only resend events that have been created within the last 30 days. **Command:**stripe events resend### Arguments -
The ID of the event to resend. ### Flags ---account=
To resend an event that's sent to a Connect webhook endpoint on a platform, set this flag to the connected account ID associated with the event. You can't use the--stripe-accountparameter with Connect. --c, --confirmSkip the warning prompt and automatically confirm the command being entered. ---dark-styleUse a darker color scheme better suited for lighter command-line environments. --e, --expand
Response attributes to expand inline (target nested values withnested[param]=value). - -i, --idempotency
Set an idempotency key for the request, preventing the same request from replaying within 24 hours. ---liveMake a live request. Requests run in a sandbox by default. --s, --show-headersShow response HTTP headers. ---stripe-account
Specify the Stripe account to use for this request. --v, --stripe-version
Specify the Stripe API version to use for this request. ---webhook-endpoint=
Resend the event to the given webhook endpoint ID (we_123456). ### Examples **Basic usage** ```sh stripe events resend evt_1PH9HU2eZvKYlo2CrSrLx8y1 ``` **Response** ``` { "id": "evt_1PH9HU2eZvKYlo2CrSrLx8y1", "object": "event", "api_version": "2019-02-19", "created": 1715885036, "data": { "object": { "id": "card_1PH9HQ2eZvKYlo2CcwDOwdFV", "object": "card", "address_city": null, "address_country": null, "address_line1": null, "address_line1_check": null, "address_line2": null, "address_state": null, "address_zip": "12345", "address_zip_check": "pass", "brand": "Visa", "country": "US", "customer": "cus_Q7O3jQBjZLlpRL", "cvc_check": "pass", "dynamic_last4": null, "exp_month": 12, "exp_year": 2034, "fingerprint": "Xt5EWLLDS7FJjR1c", "funding": "credit", "last4": "4242", "metadata": {}, "name": "", "tokenization_method": null, "wallet": null } }, "livemode": false, "pending_webhooks": 0, "request": { "id": "req_nqyTqVZmNKel38", "idempotency_key": "4bbe6edd-6d4e-4770-bf5a-f006cdf0e394" }, "type": "customer.source.created" } ``` ## Resources & HTTP commands The Stripe CLI supports two ways to create, update, and list objects based on API resources: resource commands and HTTP commands. **Resource commands** directly manage API resources and provide different arguments, flags, and functionality based on which API resource is used. **HTTP commands** are convenient shorthand for HTTP requests to the Stripe API. These requests can operate on individual API objects or lists of objects. ## resources Resource commands make API requests using the CLI for a given resource. The Stripe CLI has commands to interact with all types of Stripe API resources. A complete list of available resources and examples are included in the [API Reference Guide](https://docs.stripe.com/api.md). Select **Stripe CLI** from the language dropdown to see a complete example for each resource. Use the helpcommand on any resource to see what operations you can perform. For example, runstripe customers --helpto see help for the [Customers](https://docs.stripe.com/api/customers.md) resource. Usestripe resourcesto see a complete list of available resources. > All commands support making live requests with the--liveflag. **Command:**stripe {resource command}### Arguments -
Operation to perform on API object. Each type of API resource includes a set of operations that you can perform (such asdelete, list, and retrieve). ### Flags - --param=valueParameters to attach to the operation being performed. --d, --data
Additional data to send with an API request. Supports setting nested values (e.gnested[param]=value). ### Examples **Listing supported operations** ```sh stripe customers --help ``` ``` Available Operations: create delete list ... ``` **Create a resource** ```sh stripe customers create \ --email= \ --name="Jenny Rosen" \ --description="My First Test Customer" ``` **Update a resource** ```sh stripe customers update cus_9s6XKzkNRiz8i3 \ -d "metadata[key]=value" ``` **Retrieve a resource** ```sh stripe customers retrieve cus_9s6XKzkNRiz8i3 ``` **Response** ``` { "id": "cus_9s6XKzkNRiz8i3", "object": "customer", "address": null, "balance": 0, "created": 1680893993, "currency": null, "default_source": null, "delinquent": false, "description": "My First Test Customer", "discount": null, "email": "", "invoice_prefix": "0759376C", "invoice_settings": { "custom_fields": null, "default_payment_method": null, "footer": null, "rendering_options": null }, "livemode": false, "metadata": {}, "name": "Jenny Rosen", "next_invoice_sequence": 1, "phone": null, "preferred_locales": [], "shipping": null, "tax_exempt": "none", "test_clock": null } ``` ## get Make GET HTTP requests to retrieve an individual API object (or set of objects). You can pipe the output of this command to other tools. For example, you could use [jq](https://stedolan.github.io/jq/) to extract information from JSON the API returns, and then use that information to trigger other API requests. See the [API reference](https://docs.stripe.com/api.md) for a complete list of supported URL paths. **Command:** stripe get### Arguments -
ID of the API object to retrieve. -
URL path of the API object or set of objects to fetch. ### Flags --c, --confirmSkip the warning prompt and automatically confirm the command being entered. ---dark-styleUse a darker color scheme better suited for lighter command-line environments. --d, --data
Additional data to send with an API request. Supports setting nested values (e.gnested[param]=value). - -b, --ending-before
Retrieve the previous page in the list. Pagination uses a cursor that depends on the ID of an object in the list. --e, --expand
Response attributes to expand inline (target nested values withnested[param]=value). - -i, --idempotency
Set an idempotency key for the request, preventing the same request from replaying within 24 hours. --l, --limit
Number of objects to return, between 1 and 100 (default: 10). ---liveMake a live request. Requests run in a sandbox by default. --s, --show-headersShow response HTTP headers. --a, --starting-after
Retrieve the next page in the list. Pagination uses a cursor that depends on the ID of an object in the list. ---stripe-account
Specify the Stripe account to use for this request. --v, --stripe-version
Specify the Stripe API version to use for this request. ### Examples **Get a specific charge by ID** ```sh stripe get ch_1OKcnt2eZvKYlo2C99k9lfXl ``` **Response** ``` { "id": "ch_1OKcnt2eZvKYlo2C99k9lfXl", "object": "charge", "amount": 1000, "amount_captured": 1000, "amount_refunded": 0, "application": null, "application_fee": null, "application_fee_amount": null, "balance_transaction": "txn_1032Rp2eZvKYlo2CpErRBj09", "billing_details": { "address": { "city": null, "country": null, "line1": null, "line2": null, "postal_code": null, "state": null }, "email": null, "name": null, "phone": null }, "calculated_statement_descriptor": "Stripe", "captured": true, "created": 1701937169, "currency": "usd", "customer": null, "description": "Created by docs.stripe.com/ demo", "disputed": false, "failure_balance_transaction": null, "failure_code": null, "failure_message": null, "fraud_details": {}, "invoice": null, "livemode": false, "metadata": { "order_id": "6735" }, "on_behalf_of": null, "outcome": { "network_status": "approved_by_network", "reason": null, "risk_level": "normal", "risk_score": 23, "seller_message": "Payment complete.", "type": "authorized" }, "paid": true, "payment_intent": "pi_1Gt0RG2eZvKYlo2CtxkQK2rm", "payment_method": "pm_1OKcns2eZvKYlo2CKsdIIi44", "payment_method_details": { "card": { "amount_authorized": 1000, "brand": "visa", "checks": { "address_line1_check": null, "address_postal_code_check": null, "cvc_check": "pass" }, "country": "US", "exp_month": 12, "exp_year": 2024, "extended_authorization": { "status": "disabled" }, "fingerprint": "Xt5EWLLDS7FJjR1c", "funding": "credit", "incremental_authorization": { "status": "unavailable" }, "installments": null, "last4": "4242", "mandate": null, "moto": null, "multicapture": { "status": "unavailable" }, "network": "visa", "network_token": { "used": false }, "overcapture": { "maximum_amount_capturable": 1000, "status": "unavailable" }, "three_d_secure": null, "wallet": null }, "type": "card" }, "radar_options": {}, "receipt_email": null, "receipt_number": "1684-0467", "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoVYWNjdF8xMDMyRDgyZVp2S1lsbzJDKP6nmbIGMga3cB9wS6A6LBZL8h0qdoMC7kO1KupX02DAl5VwFXa4PrlrciExsDqlMq4dJYzVswnEzUi4", "redaction": null, "refunded": false, "refunds": { "object": "list", "data": [], "has_more": false, "url": "/the relevant part of the product" }, "review": null, "shipping": null, "source_transfer": null, "statement_descriptor": null, "statement_descriptor_suffix": null, "status": "succeeded", "transfer_data": null, "transfer_group": null } ``` **List the most recent 50 charges** ```sh stripe get /v1/charges --limit 50 ``` **Cancel past due subscriptions** ```sh stripe get /v1/subscriptions -d status=past_due \ | jq ".data[].id" \ | xargs -I % -p stripe delete /subscriptions/%' ``` ## post Make POST HTTP requests to the Stripe API. Thepostcommand supports API features like idempotency keys and expandable objects. See the [API reference](https://docs.stripe.com/api.md) for a complete list of supported URL paths. **Command:**stripe post### Arguments -
URL path of the API object to either create or update. ### Flags --c, --confirmSkip the warning prompt and automatically confirm the command being entered. ---dark-styleUse a darker color scheme better suited for lighter command-line environments. --d, --data
Additional data to send with an API request. Supports setting nested values (e.gnested[param]=value). - -e, --expand
Response attributes to expand inline (target nested values withnested[param]=value). - -i, --idempotency
Set an idempotency key for the request, preventing the same request from replaying within 24 hours. ---liveMake a live request. Requests run in a sandbox by default. --s, --show-headersShow response HTTP headers. ---stripe-account
Specify the Stripe account to use for this request. --v, --stripe-version
Specify the Stripe API version to use for this request. ### Examples **Create a payment intent** ```sh stripe post /v1/payment_intents \ -d amount=2000 \ -d currency=usd \ -d "payment_method_types[]=card" ``` **Response** ``` { "id": "pi_1Gt0Ix2eZvKYlo2CwZBLZZfa", "object": "payment_intent", "amount": 2000, "amount_capturable": 0, "amount_details": { "tip": {} }, "amount_received": 0, "application": null, "application_fee_amount": null, "automatic_payment_methods": null, "canceled_at": null, "cancellation_reason": null, "capture_method": "automatic", "client_secret": "pi_1Gt0Ix2eZvKYlo2CwZBLZZfa_secret_3LwqYVg0STglik0tqpkBQodvA", "confirmation_method": "automatic", "created": 1591919971, "currency": "usd", "customer": null, "description": "Created by docs.stripe.com/ demo", "invoice": null, "last_payment_error": null, "latest_charge": null, "livemode": false, "metadata": {}, "next_action": null, "on_behalf_of": null, "payment_method": null, "payment_method_configuration_details": null, "payment_method_options": { "card": { "installments": null, "mandate_options": null, "network": null, "request_three_d_secure": "automatic" } }, "payment_method_types": [ "card" ], "processing": null, "receipt_email": null, "redaction": null, "review": null, "setup_future_usage": null, "shipping": null, "statement_descriptor": null, "statement_descriptor_suffix": null, "status": "requires_payment_method", "transfer_data": null, "transfer_group": null } ``` ## delete Make DELETE HTTP requests to the Stripe API. See the [API reference](https://docs.stripe.com/api.md) for a complete list of supported URL paths. **Command:**stripe delete### Arguments -
URL path of the API object to delete. ### Flags --c, --confirmSkip the warning prompt and automatically confirm the command being entered. ---dark-styleUse a darker color scheme better suited for lighter command-line environments. --d, --data
Additional data to send with an API request. Supports setting nested values (e.gnested[param]=value). - -e, --expand
Response attributes to expand inline (target nested values withnested[param]=value). - -i, --idempotency
Set an idempotency key for the request, preventing the same request from replaying within 24 hours. ---liveMake a live request. Requests run in a sandbox by default. --s, --show-headersShow response HTTP headers. ---stripe-account
Specify the Stripe account to use for this request. --v, --stripe-version
Specify the Stripe API version to use for this request. ### Examples **Delete a customer** ```sh stripe delete /the relevant part of the product ``` ``` Are you sure you want to perform the command: DELETE? Enter 'yes' to confirm: ``` **Response** ``` { "id": "cus_9s6XKzkNRiz8i3", "object": "customer", "deleted": true } ``` ## fixtures Use a JSON file to issue a series of API requests. This can be useful when generating sample data, executing specific flows, or testing API behavior. The structure of the JSON file outlines the set of requests to perform, known as _fixture requests_. When you specify a request'sname, the CLI stores the response so you can reference the output in subsequent requests. The pathproperty specifies the Stripe URL route for the API resource used in the request (e.g./v1/customers). For example, to reference the response for the request named json_path: - Accessing attributes in responses: ${name:json_path}- Accessing environment variables:${.env:the related setting|
}Fixture queries must start with${and end with}and can be included in fixture requests.name is the name of the request assigned as part of the fixture (fixtures[].name) and json_pathis a dot-path to the specific variable requested. For example: - Use${cus_jenny_rosen:id}to access a top-level attribute. - Use${cus_jenny_rosen:billing_details.address.country}to access nested data. - Use{cus_jenny_rosen:subscriptions.data.#.id}to access data within a list at index #. - Use${.env:the related setting}to access environment variables (supports.env files). Environment variables can specify default values with the pipe character (|). For example: - ${.env:the related setting|}-${.env:the related setting|cus_1234}**Command:**stripe fixtures### Arguments -
Use the JSON file at the given path that includes fixture requests to run. ### Fields -_metaMetadata used by CLI during execution. -template_versionVersion of the template that is running (enables us to support potentially backwards-incompatible changes). -fixturesList of requests to execute. -nameName of the request, used to later reference the response -expected_error_typeIndicates that this request is expected to return an error of the specified [error type](./error-codes.md). When set, the fixture continues executing subsequent requests even if this request returns an error matching the specified type. If the error type does not match, the fixture fails. Common values includecard_errorandinvalid_request_error. - pathStripe URL path for this request. URL paths can include variables from other fixture queries. -methodHTTP method for the request: GET, POST, or DELETE. -paramsParameters to include with the request. Accepted values include strings, integers, booleans, nested JSON structures, and fixture queries. ### Flags ---override [param]:[path1].[path2]=[value]Override parameters in the fixture. Example: --override plan:product.name=overrideName ---add [param]:[path1].[path2]=[value]Add parameters in the fixture. Example: --add customer:name=TestUser ---remove [param]:[path1].[path2]Remove parameters from the fixture. Example: --remove customer:description ---skip [param]Skip specific steps in the fixture. Example: --skip cus_jenny_rosen ### Examples **Sample fixture** ```sh { "_meta": { "template_version": 0 }, "fixtures": [ { "name": "cus_jenny_rosen", "path": "/v1/customers", "method": "post", "params": { "name": "Jenny Rosen" } }, { "name": "pi_jenny_rosen", "path": "/v1/payment_intents", "method": "post", "params": { "customer": "${cus_jenny_rosen:id}", "amount": 2000, "currency": "usd", "payment_method": "pm_card_visa", "capture_method": "manual", "return_url": "https://www.example.com", "confirm": true } }, { "name": "pi_jenny_rosen_capture", "path": "/v1/payment_intents/${pi_jenny_rosen:id}/capture", "method": "post" } ] } ``` **Run fixtures** ```sh stripe fixtures the relevant part of the product ``` ``` Setting up fixture for: cus_jenny_rosen Setting up fixture for: pi_jenny_rosen Setting up fixture for: pi_jenny_rosen_capture ``` ## Additional commands See additional functionality supported by the Stripe CLI. ## terminal quickstart Use theterminal quickstartcommand to get up and running fast with Stripe Terminal and the Verifone the related setting reader. **Command:**stripe terminal quickstart### Flags ---api-key=
This CLI command only supports using the --api-key flag. ### Examples **Terminal quickstart** ```sh stripe terminal quickstart ``` ## feedback Prints information about how to provide feedback for the Stripe CLI using [GitHub issues](https://github.com/stripe/stripe-cli/issues) and the [CLI feedback form](https://stri.pe/cli-feedback). **Command:**stripe feedback### Examples **Basic usage** ```sh stripe feedback ``` ``` We'd love to know what you think of the CLI: * Report bugs or issues on GitHub: https://github.com/stripe/stripe-cli/issues * Leave us feedback on features you would like to see: https://stri.pe/cli-feedback ``` ## help Get help for any command in CLI withstripe help [path to command]. > Every command will also accept the -hor--helpflag to see help for that command. **Command:**stripe help### Examples **Basic usage** ```sh stripe help login ``` ``` Login to your Stripe account to setup the CLI Usage: stripe login [flags] Flags: -h, --help help for login ... ``` ## version Get the version of the Stripe CLI and check if software updates are available. **Command:**stripe version### Examples **Basic usage** ```sh stripe version ``` ``` stripe version 1.3.0 A newer version of the Stripe CLI is available. ``` ## open Shortcut to open the Stripe documentation or Dashboard in your browser. > Any Dashboard pages (that include/test/in the URL) can be viewed in live mode with the--liveflag. **Command:**stripe open### Arguments -
Shortcut used to quickly open a page on [stripe.com](https://stripe.com). -apihttps://docs.stripe.com/api -apirefhttps://docs.stripe.com/api -clirefhttps://docs.stripe.com/cli -dashboardhttps://dashboard.stripe.com/test -dashboard/apikeyshttps://dashboard.stripe.com/test/apikeys -dashboard/atlashttps://dashboard.stripe.com/test/atlas -dashboard/balancehttps://dashboard.stripe.com/test/balance/overview -dashboard/billinghttps://dashboard.stripe.com/test/billing -dashboard/connecthttps://dashboard.stripe.com/test/connect/overview -the relevant part of the producthttps://dashboard.stripe.com/test/connect/accounts/overview -the relevant part of the producthttps://dashboard.stripe.com/test/connect/application_fees -the relevant part of the producthttps://dashboard.stripe.com/test/connect/transfers -dashboard/couponshttps://dashboard.stripe.com/test/coupons -dashboard/customershttps://dashboard.stripe.com/test/customers -dashboard/developershttps://dashboard.stripe.com/test/developers -dashboard/disputeshttps://dashboard.stripe.com/test/disputes -dashboard/eventshttps://dashboard.stripe.com/test/events -dashboard/invoiceshttps://dashboard.stripe.com/test/invoices -dashboard/logshttps://dashboard.stripe.com/test/logs -dashboard/ordershttps://dashboard.stripe.com/test/orders -the relevant part of the producthttps://dashboard.stripe.com/test/orders/products -dashboard/paymentshttps://dashboard.stripe.com/test/payments -dashboard/payoutshttps://dashboard.stripe.com/test/payouts -dashboard/radarhttps://dashboard.stripe.com/test/radar -the relevant part of the producthttps://dashboard.stripe.com/test/radar/list -the relevant part of the producthttps://dashboard.stripe.com/test/radar/reviews -the relevant part of the producthttps://dashboard.stripe.com/test/radar/rules -dashboard/settingshttps://dashboard.stripe.com/settings -dashboard/subscriptionshttps://dashboard.stripe.com/test/subscriptions -dashboard/productshttps://dashboard.stripe.com/test/products -dashboard/taxhttps://dashboard.stripe.com/test/tax-rates -dashboard/terminalhttps://dashboard.stripe.com/test/terminal -the relevant part of the producthttps://dashboard.stripe.com/test/terminal/hardware_orders -the relevant part of the producthttps://dashboard.stripe.com/test/terminal/locations -dashboard/topupshttps://dashboard.stripe.com/test/topups -dashboard/transactionshttps://dashboard.stripe.com/test/balance -dashboard/webhookshttps://dashboard.stripe.com/test/webhooks -docshttps://docs.stripe.com/ ### Flags ---listList all supported shortcuts. ---liveOpen the Dashboard for your live integration (by default, runs in a sandbox). ### Examples **Basic usage** ```sh stripe open dashboard/webhooks ``` **Open the Dashboard in live mode** ```sh stripe open dashboard/apikeys --live ``` **List available shortcuts in live mode** ```sh stripe open --live --list ``` ``` open supports the following shortcuts: shortcut url -------- --------- api => https://docs.stripe.com/api apiref => https://docs.stripe.com/api cliref => https://docs.stripe.com/cli dashboard => https://dashboard.stripe.com dashboard/apikeys => https://dashboard.stripe.com/apikeys dashboard/atlas => https://dashboard.stripe.com/atlas ... ``` ## Stripe Projects Stripe Projects is a CLI plugin that lets you provision and manage third-party services such as databases, hosting, and AI providers directly from your terminal. Credentials are encrypted and stored in a project vault, and environment variables are automatically synced to your local.env. For full documentation, see [Stripe Projects](https://docs.stripe.com/projects.md). Install or upgrade the plugin with: ```sh stripe plugin install projects ``` ```sh stripe plugin upgrade projects ``` > Stripe Projects is currently in developer preview. Commands and flags might change. Run stripe projects --helporstripe projects
--helpto view the latest reference for your installed version. ## projects init Initialize a new Stripe Projects workspace in the current directory. This creates project state files, anthe related setting.mdcontext document for AI agents, and adds credential paths to.gitignoreautomatically. Files created: -the relevant part of the product: Shared project state (safe to commit) - the relevant part of the product: Local machine associations (do not commit) - the relevant part of the product: Encrypted credential cache (do not commit) - .env: Plaintext environment variables for local development (do not commit) - the related setting.md: LLM context file listing provider docs and env var names **Command:** stripe projects init### Arguments -
Optional name for the project. Defaults to the current directory name. ### Flags ---from
Initialize from a shared stack URL generated bystripe projects share. This provisions the same set of services into a new project. ### Examples **Initialize a new project** ```sh stripe projects init my-app ``` **Initialize from a shared stack URL** ```sh stripe projects init --from https://projects.dev/s/abc123 ``` ## projects list List all Stripe projects associated with your Stripe account. Returns each project's name, ID, and creation date. Use the project ID with stripe projects pull. **Command:** stripe projects list### Examples **List all projects** ```sh stripe projects list ``` ``` the related setting ID the related setting my-app proj_abc123 2026-05-01 staging-env proj_def456 2026-04-15 ``` ## projects pull Pull an existing Stripe Project into a new local directory. Creates local state files and writes a.envfile populated with the project's credentials. Run this from an empty directory. To find a project ID, runstripe projects list. **Command:** stripe projects pull### Arguments -
The ID of the project to pull. Retrieve project IDs withstripe projects list. ### Examples **Pull a project into a new directory** ```sh stripe projects pull proj_abc123 ``` ## projects status Show the current status of your project, which includes linked providers, provisioned resources, plan tiers, and service health. **Command:** stripe projects status### Examples **Show project status** ```sh stripe projects status ``` ``` Project: my-app (proj_abc123) the related setting the related setting the related setting the related setting vercel project hobby ✓ healthy supabase project free ✓ healthy openrouter api free ✓ healthy ``` ## projects catalog Browse the full service catalog, or inspect a specific provider's available services and plan tiers. Use this to discover service identifiers and plan names before runningstripe projects add. **Command:** stripe projects catalog### Arguments -
Optional provider name to inspect. Omit to list all available providers. ### Examples **List all available providers** ```sh stripe projects catalog ``` **Inspect a provider's services and plans** ```sh stripe projects catalog supabase ``` **Return the catalog as structured JSON** ```sh stripe projects catalog supabase --json ``` ## projects search Search the service catalog by keyword. Returns providers and services matching the search term. **Command:**stripe projects search### Arguments -
The search term to match against provider and service names. ### Examples **Search for database services** ```sh stripe projects search database ``` ## projects add Provision a service from a provider into your current project. The CLI authenticates with the provider, provisions the resource, saves encrypted credentials tothe relevant part of the product, and writes environment variables to .env. Run stripe projects billing addbefore provisioning paid plan tiers. **Command:**stripe projects add### Arguments -
/
The provider and service to provision, for examplevercel/projectorsupabase/project. Run stripe projects catalogto browse available providers and services. ### Flags ---config
Pass a provider-specific configuration as a JSON string. Use it to specify plan tiers or provider options in non-interactive mode. ### Examples **Add a service (interactive)** ```sh stripe projects add vercel/project ``` **Add a service with a specific plan tier (non-interactive)** ```sh stripe projects add amplitude/analytics \ --config '{"plan_tier":"plus-v3-10k-mtu-monthly"}' \ --no-interactive \ --accept-tos ``` **Add a service and return JSON output** ```sh stripe projects add openrouter/api \ --no-interactive \ --json \ --auto-confirm ``` ## projects link Associate an existing provider account with your project without provisioning a new resource. Use this when you already have an account with a provider and want to connect it to your project. The recommended first step in agent-driven workflows is to establish provider connections before runningstripe projects add. **Command:** stripe projects link### Arguments -
The provider to associate, for examplevercelorsupabase. ### Examples **Associate a provider account** ```sh stripe projects link vercel ``` ## projects remove Remove a provisioned service from your project. This deprovisions the resource in the provider's system and removes it from your project state. > This is a destructive operation. It deprovisions and deletes the resource in the provider's system. Back up any data before proceeding. You can't undo this action. **Command:** stripe projects remove### Arguments -
/
|
The service to remove, specified as
/
or by resource ID. ### Examples **Remove by provider and service** ```sh stripe projects remove supabase/project ``` **Remove by resource ID** ```sh stripe projects remove res_abc123 ``` ## projects upgrade Upgrade a provisioned service to a higher plan tier. You'll receive a prompt to select a plan and confirm billing using the payment method on file. Runstripe projects billing addfirst if you haven't set up billing. **Command:**stripe projects upgrade### Arguments -
/
|
|
The service to upgrade, specified as
/
, by resource ID, or by provider name. ### Examples **Upgrade a specific service** ```sh stripe projects upgrade vercel/project ``` **Upgrade by provider name** ```sh stripe projects upgrade supabase ``` ## projects open Open the provider's dashboard in your default browser. **Command:** stripe projects open### Arguments -
The provider whose dashboard to open. ### Examples **Open the Supabase dashboard** ```sh stripe projects open supabase ``` **Open the Vercel dashboard** ```sh stripe projects open vercel ``` ## projects rotate Rotate credentials for a provisioned service. This generates new API keys or secrets at the provider and updates the project vault. After rotating, runstripe projects env --pullto refresh your local.envwith the new credentials. **Command:**stripe projects rotate### Arguments -
/
|
The service whose credentials to rotate, specified as
/
or by resource ID. ### Examples **Rotate credentials by provider and service** ```sh stripe projects rotate supabase/project ``` **Rotate credentials by resource ID** ```sh stripe projects rotate res_abc123 ``` ## projects env Manage project environment variables, named environments, and environment resource membership. Runningstripe projects envwithout flags or subcommands lists environment variable names with their values redacted. Use--pullto sync credentials for the active environment to that environment's configured output file. Run--pullmanually when: - You're setting up the project on a new machine, or after cloning the repo. - A teammate provisioned or rotated a resource and you need the updated credentials. - Your environment output file was deleted or corrupted and you need to restore it. - You switched environments or changed environment membership and need to refresh local credentials. >the relevant part of the productand environment output files, such as.env, are added to .gitignorebystripe projects init. Never commit either file. **Command:** stripe projects env### Subcommands -env listList project environments and mark the active environment. -env showShow the active environment, its output file, and resource membership. -env create
--output
Create an environment and make it active. -env use
Switch the active environment for this checkout. -env update --name
Rename the active environment. -env update --output
Change the active environment's output file. -env delete
Delete an environment. -env add
Add an existing project resource to the active environment. -env remove
Remove a project resource from the active environment. ### Flags ---pullSync credentials for the active environment to that environment's configured output file. ---output
Set the output file when creating an environment or changing the active environment's output file. ---name
Rename the active environment. ### Examples **List project environments** ```sh stripe projects env list ``` **Create an environment and make it active** ```sh stripe projects env create development --output .env.dev ``` **Add an existing resource to the active environment** ```sh stripe projects env add dev-db ``` ## projects billing Manage the payment method and spend limits used for paid provider plans under Stripe Projects. We associate the payment methods with your Stripe account. **Command:**stripe projects billing### Subcommands -billing showDisplay the payment method currently on file for Stripe Projects billing. -billing addAdd or update the payment method used for Stripe Projects billing. We require it before you can provision any paid plan tier. -billing updateSet or update global or per-provider monthly spend limits. ### Flags for billing update ---limit
Set a monthly spend cap in USD. It applies globally unless you also specify--provider. - --provider
Scope the spend limit to a specific provider. Per-provider limits take precedence over the global limit. ### Examples **View the payment method on file** ```sh stripe projects billing show ``` **Add or update a payment method** ```sh stripe projects billing add ``` **Set a global 50 USD per month spend cap** ```sh stripe projects billing update --limit 50 ``` **Set a 20 USD per month cap for Supabase only** ```sh stripe projects billing update --limit 20 --provider supabase ``` ## projects spend View the current and previous month's spend, broken down by provider. **Command:**stripe projects spend### Examples **View spend by provider** ```sh stripe projects spend ``` ``` the related setting the related setting the related setting the related setting the related setting vercel 0.00 USD 0.00 USD supabase 0.00 USD 0.00 USD openrouter 1.24 USD 3.87 USD ──────────────────────────────────── the related setting 1.24 USD 3.87 USD ``` ## projects share Generate a shareable URL that encodes your project's service stack—providers and services only. Credentials are _never_ included in shared URLs. Teammates can recreate the same stack in a new directory usingstripe projects init --from
, or merge it into an existing project using stripe projects import. **Command:** stripe projects share### Examples **Generate a share URL** ```sh stripe projects share ``` ``` Share URL: https://projects.dev/s/abc123 ``` ## projects import Add services from a shared stack URL to your existing project. Unlikestripe projects init --from, this command merges the imported services into your current project's state without creating a new project. **Command:** stripe projects import### Arguments -
A shared stack URL generated bystripe projects share. ### Examples **Import services from a shared stack URL** ```sh stripe projects import https://projects.dev/s/abc123 ``` ## projects llm-context Generate an the related setting.mdcontext document for the current project. The file includes provider documentation, quickstart instructions, and environment variable names, formatted for use by AI coding agents (Claude, Codex, Gemini, Cursor, and similar tools). **Command:**stripe projects llm-context### Examples **Generate the the related setting.md context file** ```sh stripe projects llm-context ``` ## Stripe pay Thestripe payplugin sends instant business-to-business transfers. The sender needs a funded financial account, and the recipient needs a financial account linked to their Stripe profile. Identify the recipient using a Stripe profile handle, such as@recipient, or a profile network ID, such as profile_.... If the user doesn't provide an exact handle or network ID, use [Stripe Directory](https://docs.stripe.com/directory.md#agents) to find and verify candidate businesses. Ask the user to choose the exact recipient before continuing. Don't guess the recipient. Authenticate with stripe login. Use stripe whoamito verify the active account before sending money. If the authenticated account doesn't have a Stripe profile, an interactive session can help create one. For non-interactive use, pass--create-profile-if-missingwith--profile-handle, --profile-display-name, and --profile-email. This command can move money. Use --agentor--jsonto review transfer details in machine-readable output. Only add--yesafter the user confirms the recipient, amount, currency, and source financial account. Use--dry-runto validate the flow without creating or sending the transfer. ## pay Send an instant transfer from your financial account to another business identified by a Stripe profile handle or network ID. In an interactive terminal, you can omit the recipient, amount, and currency and enter them in the interactive form. With--agentor--json, you must provide all three arguments. The command lists your eligible open financial accounts. If one account is eligible, the command selects it automatically. If multiple accounts are eligible, interactive sessions show a selector. Agent and scripted runs should pass --financial-account. For agent or scripted use: 1. Run stripe whoamito verify the active Stripe account. If authentication fails, ask the user to runstripe login. 2. Run stripe pay @recipient 10.00 usd --agentwith the exact recipient, amount, and currency that the user requested. Include--financial-account fa_...if the user supplied a source financial account. Agent and JSON modes return aconfirmation_requiredresponse before sending money. 3. Review the returned source financial account, recipient, amount, currency, fee, delivery timing, internal note, and memo with the user. 4. Only after the user confirms those details, rerun the same command with--yes. Explicitly pass --financial-accountwith thefinancial_accountvalue from the review response, even if the review command selected it automatically. Preserve the exact recipient, amount, currency, and source financial account. If the result hasstatus: approval_required, follow the contract in the returned JSON: - If the result includes approval_urlandnext_step.command, give the user the approval link and wait for them to approve or reject the request. After the user confirms approval, run the exact command in next_step.command. Don't change its recipient, amount, currency, or financial account. - If the result includes approvals_dashboard_urlwithoutnext_step, tell the user that the request was submitted for review. Stripe sends the transfer automatically after approval, so don't rerun the pay command or poll it. A resume command checks approval once. If the request is still pending, return the approval link and wait instead of polling. Resumable approval requests expire after 5 minutes. If a request expires or is rejected, report that no transfer was sent and don't reuse its --approval-id. Only start a new transfer from the review step if the user explicitly asks to start over. To verify the workflow without sending money, run stripe pay @recipient 10.00 usd --financial-account fa_... --agent --dry-run. Review the returned details with the user. If they want to complete the dry run, rerun the same command with --agent --dry-run --yes. The completed dry run resolves the profile, source financial account, recipient, transfer rail, and confirmation details, but doesn't create or send the transfer. Supported currencies are usd, gbp, and usdc. **Command:** stripe pay [recipient] [amount] [currency]### Arguments -[recipient]Destination Stripe profile handle, such as@recipient, or profile network ID, such as profile_.... Optional in an interactive terminal and required with --agentor--json. - [amount]Positive decimal amount in major units, for example10.00. Optional in an interactive terminal and required with --agentor--json. Precision is currency-specific. - [currency]Currency code to transfer. Supported values areusd, gbp, and usdc. Optional in an interactive terminal and required with --agentor--json. ### Flags - --internal-note, -n
Optional internal note that isn't shown to the recipient. Must contain only ASCII characters and be 50 characters or fewer. ---memo, -m
Optional recipient-facing memo. Must contain only ASCII characters and be 22 characters or fewer. ---financial-account
Source financial account ID, such asfa_.... The account must be open, eligible for network transfers, and support the selected currency. - --yes, -yConfirm the transfer without an interactive prompt. Review the transfer details before using this option. ---agent, --jsonUse non-interactive, machine-readable JSON output. Without--yes, the command returns confirmation_requiredand doesn't send money. ---dry-runValidate and review the transfer without creating a profile, recipient, approval request, or outbound payment. ---approval-id
Resume a previously approved request. Use the exact command returned innext_step.command; the recipient, amount, currency, and financial account must match the approval. - --create-profile-if-missingCreate a Stripe profile if the authenticated account doesn't have one. Requires--profile-handle, --profile-display-name, and --profile-email. - --profile-handle
Stripe profile handle to create with--create-profile-if-missing. - --profile-display-name
Display name for the Stripe profile created with--create-profile-if-missing. - --profile-email
Email address for the Stripe profile created with--create-profile-if-missing. ### Examples **Enter transfer details interactively** ```sh stripe pay ``` **Send a transfer to a Stripe profile handle** ```sh stripe pay @profile-username 10.00 usd ``` **Send a transfer using a profile network ID** ```sh stripe pay profile_... 10.00 usd ``` **Review a transfer without sending money** ```sh stripe pay @profile-username 10.00 usd \ --financial-account fa_... \ --internal-note "Invoice 1234" \ --memo "the related setting PAY" \ --dry-run ``` **Review a transfer as JSON** ```sh stripe pay @profile-username 10.00 usd \ --financial-account fa_... \ --agent ``` ## Stripe Tools The stripe toolsplugin lets you manage and configure certain aspects of your Stripe account directly from the command line. It provides access to account operations that aren't available through the standard Stripe CLI. Each operation is a direct subcommand with named flags. Runstripe toolsto list all operations, orstripe tools
--helpto view parameters. Thestripe toolsplugin requires Stripe CLI version 1.43.5 or later. > Thestripe toolsCLI plugin is in [public preview](https://docs.stripe.com/release-phases.md). ## tools search Search for supported account operations by keyword or description. Runstripe tools
--helpto view full parameter details for any result. **Command:**stripe tools search### Arguments -
Keyword to match against operation names and descriptions. ### Examples **Search for branding operations** ```sh stripe tools search "branding" ``` ``` Found 2 matching operations: ## get_brand_settings Lists all branding settings. → stripe tools get_brand_settings --help ## update_brand_settings Body params: checkout_background_color*, checkout_border_style, checkout_button_color, ... Updates branding settings. → stripe tools update_brand_settings --help ``` ## tools operations Operations are direct subcommands ofstripe tools. Each operation accepts named flags for its parameters. Use stripe toolsto see all available operations. Usestripe tools
--helpto view parameter details for a specific operation. Usestripe tools search
to find operations by keyword or description. > All operations support making live requests with the--liveflag. **Command:**stripe tools### Arguments -
The operation to run, for exampleget_brand_settingsorupdate_brand_settings. Run stripe toolsto see all available operations. ### Flags ---param=valueNamed flags for operation parameters. Each parameter becomes a flag with a hyphenated name (for example,--primary-colorfor theprimary_colorAPI parameter). ---body
Pass parameters as a JSON object instead of named flags. Named flags override values in--body. - --jsonOutput the API response as structured JSON. ---live` Make a live request. Requests run in a sandbox by default. ### Examples List available operations sh stripe tools ``` Usage: stripe tools
[options] Search and execute Stripe API operations from the command line. Run `stripe tools
--helpfor parameter details. Runstripe tools search
` to find commands by keyword or description. Commands: get_brand_settings Lists all branding settings. update_brand_settings Updates branding settings. search
Search operations by keyword or description Options: --color Turn on/off color output (on, off, auto) [string] --log-level Log level (debug, info, trace, warn, error) [default: "info"] --version Show plugin version --help Show this help message **View parameters for an operation**sh stripe tools get_brand_settings --help Lists all merchant branding settings for hosted surfaces and receipts. Usage: stripe tools get_brand_settings [--param=value] [flags] Required Parameters: (none) Optional Parameters: --expand
Specifies which fields in the response should be expanded. --use-default-styles true|false If true, returns Stripe's default branding styles if unset on merchant instead of nil. Defaults to true. Flags: --body
JSON parameters (escape hatch) --json Output structured JSON --live Use live-mode API key **Run a read operation**sh stripe tools get_brand_settings --live --json **Update with named flags**sh stripe tools update_brand_settings \ --live \ --primary-color "rgb(82, 95, 127)" \ --contrast-color "rgb(80, 93, 124)" \ --font-color "rgb(0, 0, 0)" \ --checkout-background-color "rgb(255, 255, 255)" \ --checkout-use-brand-colors false \ --use-logo-instead-of-icon false **Update with JSON body (scripting)**sh stripe tools update_brand_settings \ --live \ --body '{"primary_color":"rgb(82,95,127)","contrast_color":"rgb(80,93,124)","font_color":"rgb(0,0,0)","checkout_background_color":"rgb(255,255,255)","checkout_use_brand_colors":false,"use_logo_instead_of_icon":false}' ## Further information See additional information how the Stripe CLI operates. ## Using with Docker A [Docker image](https://hub.docker.com/r/stripe/stripe-cli) allows you to run the Stripe CLI in a container. You can set two environment variables that the CLI will use: - `the related setting`: the API key to use for the CLI. - `the related setting`: the device name for the CLI, visible in the Dashboard. Since Docker containers are ephemeral, `stripe-cli login` cannot be used without defining a data volume. You can use the `--api-key` flag instead. ## Telemetry The Stripe CLI includes a telemetry feature that collects usage data to help us improve the developer experience. This feature is **enabled by default**. ## What data is collected The Stripe CLI collects: - Command usage patterns (which commands are run, how often) - Error rates and types to help identify issues - Performance metrics (command execution times) - Operating system and CLI version information - If detected, the name of AI coding agents invoking the CLI (such as Claude Code, Cursor, or Cline) ## What is NOT collected We do **not** collect: - API keys or authentication credentials - Personal information or identifiable data - File names, paths, or source code - Command arguments or flag values - Any data from your Stripe account ## Why we collect this data Telemetry data helps us: - Prioritize which features and commands to improve - Identify and fix bugs more quickly - Understand how developers use the CLI in different environments - Optimize performance for common workflows ## How to opt out To disable telemetry, set the `the related setting` environment variable to `1` or `true`:bash # Opt out for a single session the related setting=1 stripe [command] # Opt out permanently (add to your shell profile) export the related setting=1 ``` After opting out, the CLI will not send any telemetry data. ## License The Stripe CLI is licensed under the Apache License 2.0 and verified on GitHub as being owned by Stripe.
