A CLI for Dodo Payments
npm install dodopayments-cli
A powerful Command Line Interface for Dodo Payments
Installation •
Authentication •
Usage •
Webhooks •
Contributing
---
Manage your Dodo Payments resources and test webhooks directly from the terminal. Built for developers who prefer the command line.
We provide various ways to install the CLI:
> Note: If you have Node or Bun installed, it's highly recommended to use that installation method.
``bash`
npm install -g dodopayments-cli
`bash`
bun install -g dodopayments-cli
1. Download the latest release from GitHub Releases that matches your system.
2. Extract the downloaded file to a directory of your choice.
3. Rename the binary file to dodo:mv ./dodopayments-cli-* ./dodo
- Linux/macOS: ren .\dodopayments-cli-* .\dodo
- Windows:
4. Move the binary to a directory in your system's PATH:
- Linux/macOS: sudo mv ./dodo /usr/local/bin/move .\dodo C:\Windows\System32\dodo
- Windows: (requires admin mode)
Before using the CLI, you must authenticate:
`bash`
dodo login
This command will:
1. Open your browser to the Dodo Payments API Keys page
2. Prompt you to enter your API Key
3. Ask you to select the environment (Test Mode or Live Mode)
4. Store your credentials locally to ~/.dodopayments/api-key
The general syntax is:
`bash`
dodo
Manage your products catalog.
| Command | Description |
|---------|-------------|
| dodo products list | List all products |dodo products create
| | Open dashboard to create a product |dodo products info
| | View details for a specific product |
View payment transactions.
| Command | Description |
|---------|-------------|
| dodo payments list | List all payments |dodo payments info
| | Get information about a specific payment |
Manage your customer base.
| Command | Description |
|---------|-------------|
| dodo customers list | List all customers |dodo customers create
| | Create a new customer profile |dodo customers update
| | Update an existing customer's details |
Manage coupons and discounts.
| Command | Description |
|---------|-------------|
| dodo discounts list | List all discounts |dodo discounts create
| | Create a new percentage-based discount |dodo discounts delete
| | Remove a discount by ID |
Manage software licenses.
| Command | Description |
|---------|-------------|
| dodo licences list | List all licenses |
The CLI includes a robust tool for testing webhooks by simulating events.
`bash`
dodo wh
> Note: The webhook testing tool doesn't support signing requests yet. Please disable webhook signature verification while testing. A simple way to do this is using unsafe_unwrap() instead of unwrap() in the webhook endpoint during testing only.
This interactive tool guides you through:
1. Setting a destination endpoint URL
2. Configuring Business ID, Product ID, and Metadata
3. Selecting a specific Event to trigger
| Category | Events |
|----------|--------|
| Subscription | active, updated, on_hold, renewed, plan_changed, cancelled, failed, expired |success
| Payment | , failed, processing, cancelled |success
| Refund | , failed |opened
| Dispute | , expired, accepted, cancelled, challenged, won, lost |created` |
| License |
We welcome contributions from the community! Whether you're fixing bugs, adding new features, or improving documentation, your help is appreciated.
Please read our Contributing Guide to get started. We also have a Code of Conduct that we expect all contributors to follow.
- Report bugs and suggest features
- Improve documentation
- Add new CLI commands
- Write tests
- Review pull requests
- Discord Community - Get help and discuss with the community
- GitHub Issues - Report bugs or request features
- Documentation - Learn more about Dodo Payments
This project is licensed under the MIT License - see the LICENSE file for details.
---
Made with ❤️ by Dodo Payments