The official command-line interface for Dodo Payments — manage resources, run AI-powered queries, create checkout sessions, and test webhooks from your terminal.
Use this file to discover all available pages before exploring further.
Manage your Dodo Payments resources, run AI-powered queries against your account, create checkout sessions, and test webhooks — all from the terminal. The CLI ships with an interactive TUI, a built-in AI assistant powered by MCP, and offline webhook testing.
Interactive TUI — launch dodo with no arguments to open the full interactive interface with command palette, history, and live notifications.
AI assistant built in — ask questions or take actions in plain English with /ai. No extra setup, runs dodopayments-mcp locally.
Secure by default — API keys are stored in your OS secret store (macOS Keychain, Windows Credential Vault, Linux libsecret). No plaintext config on disk.
Auto update — the CLI checks for new versions on startup and notifies you in-app. Run /update to upgrade in place.
Webhook tooling — listen for live webhooks or trigger payloads offline for local development.
Before using authenticated commands, log in with your API key:
dodo login
Or, from inside the interactive TUI:
/login
The login flow will:
Open your browser to the Dodo Payments API Keys page.
Prompt you to paste your API Key.
Ask you to select an environment — Test Mode or Live Mode.
Store the credentials in your OS secret store (Keychain on macOS, Credential Vault on Windows, libsecret on Linux).
Because credentials are stored in the OS secret store, you may be prompted for your device password the first time the CLI reads or writes credentials. If you’re upgrading from an older version, any existing plaintext API key will be migrated to the secret store and the legacy file deleted automatically.
Ask questions or take actions in natural language. The assistant uses dodopayments-mcp running locally — no additional setup or OAuth flow required, and your AI traffic doesn’t leave your machine except to talk to the model provider.
Command
Description
/ai <query>
Ask the AI assistant a question or give it an instruction
(any non-slash text)
Sent to the AI assistant by default while in the TUI
Examples:
how much revenue did I make this week?/ai create a new customer named Acme Inc./ai find my last failed payment
The assistant respects your active environment (Test / Live), so it only operates on data from the environment you’re currently logged into.
The CLI includes two powerful tools for testing webhooks during development: a listener that forwards live test webhooks to your local server, and a trigger that sends mock webhook payloads to any endpoint.
Command
Description
dodo wh listen
Listen for webhooks in real time and forward them to your local dev server
dodo wh trigger
Trigger a test webhook event interactively — even while logged out
Forward webhooks from Dodo Payments directly to your local development server in real time.
dodo wh listen
1
Enter your local endpoint URL
Provide the local URL where you want to receive webhooks (e.g., http://localhost:3000/webhook).
2
Automatic setup
The CLI automatically creates a webhook endpoint on your Dodo Payments account if one doesn’t already exist, then opens a WebSocket connection to receive events in real time.
3
Receive and forward
When a webhook event fires (from a test payment, subscription change, etc.), the CLI receives it, logs the event type, and forwards the full request with headers and body to your local endpoint. The response from your endpoint is logged and sent back.
dodo wh listen requires a Test Mode API key. Live Mode keys are not supported by the listen flow.
The listener preserves the original webhook headers (webhook-id, webhook-signature, webhook-timestamp) when forwarding to your local endpoint, so you can test your signature verification logic.
Send mock webhook payloads to any endpoint for quick testing without needing to create real transactions.
dodo wh trigger
The /wh trigger flow guides you through:
Setting a destination endpoint URL
Selecting a specific event to trigger from an interactive menu
dodo wh trigger does not require login. It works as a local/offline webhook payload generator.
Triggered events are not signed. While testing, disable webhook signature verification on your endpoint — for example, use unsafe_unwrap() instead of unwrap() in your webhook handler during testing only.