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.

  1. Download the binary.

    Download the binary that matches your CPU architecture.

  2. Extract the archive.

    tar -xvf razorpay_mac-os_<arch>.tar.gz
  3. Make the binary executable and remove the macOS quarantine attribute.

    chmod +x ./razorpay
    xattr -d com.apple.quarantine ./razorpay
  4. Move the binary to your execution path.

    sudo mv razorpay /usr/local/bin/
  5. 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_xxxxxxxxxxxx
Enter 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?


razorpay cli
install razorpay cli
cli installation
command line interface
razorpay command line