Install the Razorpay Curlec CLI
Install the Razorpay Curlec CLI on macOS, Linux or Windows to interact with Razorpay Curlec APIs from your terminal.
The Razorpay CLI lets you interact with Razorpay APIs directly from your terminal. Use it to test integrations, trigger events, manage resources and automate workflows in your CI/CD pipelines.
To install the Razorpay CLI, you must complete the following actions:
Run the install script to automatically detect your OS and architecture, download the latest binary, and install it to ~/.local/bin:
curl -fsSL https://razorpay.com/cli/latest/install.sh | bash
Select the tab for your operating system and follow the steps.
-
Download the binary.
Download the binary that matches your CPU architecture.
Or download using curl:
Apple Silicon:
curl -fsSL https://razorpay.com/cli/latest/razorpay_mac-os_arm64.tar.gz | tar -xzIntel:
curl -fsSL https://razorpay.com/cli/latest/razorpay_mac-os_x86_64.tar.gz | tar -xz -
Extract the archive.
tar -xvf razorpay_mac-os_<arch>.tar.gz -
Make the binary executable and remove the macOS quarantine attribute.
chmod +x ./razorpayxattr -d com.apple.quarantine ./razorpay -
Move the binary to your execution path.
sudo mv razorpay /usr/local/bin/ -
Verify the installation.
razorpay --version
After installing the CLI, configure it with your API credentials to start making requests. Generate your keys from the
.You can configure credentials in two ways:
Option 1: Pass credentials directly in the command
razorpay configure --key-id rzp_test_xxxxxxxxxxxx --key-secret xxxxxxxxxxxxxxxxxxxx
Option 2: Use the interactive prompt
Run the command without arguments and enter your credentials when prompted:
razorpay configure
Enter your Razorpay Key ID: rzp_test_xxxxxxxxxxxxEnter your Razorpay Key Secret: xxxxxxxxxxxxxxxxxxxx
Test Mode and Live Mode
The CLI supports both Test Mode and Live Mode keys. Use Test Mode keys (prefixed with rzp_test_) while building and testing your integration.
Verify Your Setup
Once configured, run razorpay --version to confirm the CLI is installed and ready to use.
Was this page helpful?