Install the Razorpay CLI
Install the Razorpay CLI on macOS, Linux or Windows to interact with Razorpay 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:
Select the tab for your operating system and follow the steps.
-
Download the binary.
Download the binary that matches your CPU architecture.
-
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.
Run the following command:
razorpay configure
You will be prompted to enter your Key ID and Key Secret:
Enter your Razorpay Key ID: rzp_test_xxxxxxxxxxxxEnter your Razorpay Key Secret: xxxxxxxxxxxxxxxxxxxx
Generate these from the
.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?