{"id":26949,"date":"2026-05-27T17:44:27","date_gmt":"2026-05-27T12:14:27","guid":{"rendered":"https:\/\/blog.razorpay.in\/blog\/?p=26949"},"modified":"2026-05-27T17:46:32","modified_gmt":"2026-05-27T12:16:32","slug":"razorpay-cli-interact-with-razorpay-from-terminal","status":"publish","type":"post","link":"https:\/\/razorpay.com\/blog\/razorpay-cli-interact-with-razorpay-from-terminal\/","title":{"rendered":"Razorpay CLI: Interact With Razorpay From Your Terminal"},"content":{"rendered":"<div class=\"cl-preview-section\">\n<p>For most teams, working with Razorpay means opening a browser, logging into the dashboard, and navigating through a UI. But developers who live in their terminals should not have to context-switch to a browser for any Razorpay tasks.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>Today, we are launching the <a href=\"https:\/\/github.com\/razorpay\/razorpay-cli\" rel=\"nofollow noopener\" target=\"_blank\">Razorpay Command Line Interface (CLI)<\/a>, a tool that lets developers build, test, and manage their Razorpay integrations entirely from the command line.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_80 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a173a5340666\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a173a5340666\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/razorpay.com\/blog\/razorpay-cli-interact-with-razorpay-from-terminal\/#What_The_CLI_Does\" >What The CLI Does<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/razorpay.com\/blog\/razorpay-cli-interact-with-razorpay-from-terminal\/#Razorpay_Going_Headless\" >Razorpay Going Headless<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/razorpay.com\/blog\/razorpay-cli-interact-with-razorpay-from-terminal\/#The_Timing_AI_Agents_And_The_Terminal\" >The Timing: AI Agents And The Terminal<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/razorpay.com\/blog\/razorpay-cli-interact-with-razorpay-from-terminal\/#Who_This_Is_Built_For\" >Who This Is Built For<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/razorpay.com\/blog\/razorpay-cli-interact-with-razorpay-from-terminal\/#Use_Cases\" >Use Cases<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/razorpay.com\/blog\/razorpay-cli-interact-with-razorpay-from-terminal\/#What_Comes_Next\" >What Comes Next<\/a><\/li><\/ul><\/nav><\/div>\n<h2 id=\"what-the-cli-does\"><span class=\"ez-toc-section\" id=\"What_The_CLI_Does\"><\/span>What The CLI Does<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>The CLI gives you direct access to Razorpay operations without touching the dashboard. It talks to the <a href=\"https:\/\/razorpay.com\/docs\/api\/\">Razorpay API<\/a>\u00a0under the hood and covers the operations developers reach for most:<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>&#8211; Create and fetch payments, orders, and refunds from the command line<br \/>\n&#8211; Build terminal-based automations for recurring workflows<br \/>\n&#8211; Integrate Razorpay actions into CI\/CD pipelines<br \/>\n&#8211; Use with AI coding agents to take Razorpay actions mid-session \u2013 no context switching, no browser<br \/>\n&#8211; Onboard new developers with a single `razorpay configure` command, and they are good to go<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<h3 id=\"a-quick-example-of-what-that-looks-like-in-practice\"><strong>A quick example of what that looks like in practice:<\/strong><\/h3>\n<\/div>\n<div class=\"cl-preview-section\">\n<pre># configure credentials once \r\nrazorpay configure\r\n\r\n# fetch a payment \r\nrazorpay payments fetch pay_XXXXXX\r\n\r\n# create an order \r\nrazorpay orders create --amount 50000 --currency INR<\/pre>\n<p>The output is structured and machine-readable in JSON, YAML, or TOML, which means it composes naturally with the rest of your shell toolchain.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<h3 id=\"why-this-matters-for-automation\">Why This Matters For Automation<\/h3>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>The real value of a CLI is not interactive use. It is scripting. Developers reach for CLIs when they need to automate repetitive tasks, chain operations together, or wire a tool into a larger workflow. A CLI fits naturally into shell scripts, Makefiles, CI pipelines, and cron jobs in a way that a dashboard simply cannot.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>If your team currently automates Razorpay interactions by constructing raw API calls with `curl` and parsing the output with `jq`, the CLI gives you a cleaner and more maintainable interface to the same operations.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<h2 id=\"razorpay-going-headless\"><span class=\"ez-toc-section\" id=\"Razorpay_Going_Headless\"><\/span>Razorpay Going Headless<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>The dashboard is built for humans. It is useful, but it assumes someone is sitting in front of a browser making decisions. That assumption breaks down quickly when workflows are automated, infrastructure is code-driven, and your team expects every tool in the stack to be scriptable.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>Going headless means operating Razorpay entirely through code \u2013 no UI dependency, no manual steps, no browser required. The API has always made this possible at the integration level, but outside of application code, the dashboard remained the only way to interact with Razorpay directly. That created a gap: scripts could not easily run ad hoc operations, pipelines could not query live state, and agents had no clean interface to reach for.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>The CLI closes that gap. It\u2019s what makes Razorpay fully headless, not just in your application, but across your entire workflow.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>Whether it\u2019s a developer debugging from a remote server, a script running in a CI job, or an agent working through a task, everything can now interact with Razorpay the same way: from the terminal, with plain text output, without a browser in sight.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<h2 id=\"the-timing-ai-agents-and-the-terminal\"><span class=\"ez-toc-section\" id=\"The_Timing_AI_Agents_And_The_Terminal\"><\/span>The Timing: AI Agents And The Terminal<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>There is a more specific reason we are shipping this now.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>Coding agents such as\u00a0<a href=\"https:\/\/claude.ai\/code\" rel=\"nofollow noopener\" target=\"_blank\">Claude Code<\/a>\u00a0or\u00a0<a href=\"https:\/\/cursor.com\/\" rel=\"nofollow noopener\" target=\"_blank\">Cursor<\/a>, and others are increasingly doing real work in development workflows. They write code, run commands, and take actions on behalf of the developer. And agents are well-suited to CLIs: CLIs are predictable, composable, and text-native. An agent can call a CLI command, read the output, and continue without needing special integration work.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>With Razorpay CLI, an agent working on your codebase can look up a payment, create a test order, or verify a refund status as part of a larger task. The developer does not need to leave the editor or switch context. The agent reaches for the CLI the same way it would reach for `git` or `npm`.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>Payment infrastructure becomes something your automation stack can reason about directly. That\u2019s a bigger deal than it sounds.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<h2 id=\"who-this-is-built-for\"><span class=\"ez-toc-section\" id=\"Who_This_Is_Built_For\"><\/span>Who This Is Built For<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>This is primarily built for dev teams using Razorpay \u2013 engineers who are terminal-native and find the dashboard a detour for tasks they would rather script or automate. If you are already writing shell scripts to interact with Razorpay, or wish you could, the CLI is built for you.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>The secondary audience, and the one that will likely grow faster, is developers building with AI coding agents. As agentic development becomes a normal part of engineering workflows, the CLI becomes the interface between the agent and Razorpay\u2019s infrastructure. Agents do not use dashboards. They use tools that are scriptable, composable, and text-native. The CLI is exactly that.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>The product is not trying to win over non-technical merchants. It is purpose-built for developers who want Razorpay to fit into their workflow, not the other way around.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<h2 id=\"use-cases\"><span class=\"ez-toc-section\" id=\"Use_Cases\"><\/span>Use Cases<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<\/div>\n<div class=\"cl-preview-section\">\n<h3 id=\"debugging-transactions-without-a-browser\">Debugging Transactions Without A Browser<\/h3>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>When a payment fails in production, you can fetch the full transaction object from the terminal in seconds. No login, no navigation, no context switching. For a developer already deep in a debugging session, staying in the terminal means staying in flow.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<h3 id=\"scripted-reconciliation\">Scripted Reconciliation<\/h3>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>Teams that run nightly reconciliation jobs can pull transaction data directly as part of existing shell pipelines. The CLI replaces brittle, hand-rolled `curl` commands with a consistent, predictable interface across environments.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<h3 id=\"integration-testing-in-ci\">Integration Testing In CI<\/h3>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>Create test orders, trigger payment flows, and assert on transaction states as part of your CI pipeline. The CLI fits into any shell-based test harness without additional SDKs or language-specific wrappers.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<h3 id=\"local-development-and-api-exploration\">Local Development And API Exploration<\/h3>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>When you are building a new integration and want to understand how the API behaves, the CLI is faster than writing throwaway scripts. Run a command, inspect the output, and iterate quickly. It is the same workflow developers use with database CLIs and cloud provider tools.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<h3 id=\"agentic-development-workflows\">Agentic Development Workflows<\/h3>\n<\/div>\n<div class=\"cl-preview-section\">\n<p>A developer using\u00a0<a href=\"https:\/\/claude.ai\/code\" rel=\"nofollow noopener\" target=\"_blank\">Claude Code<\/a>\u00a0or\u00a0<a href=\"https:\/\/cursor.com\/\" rel=\"nofollow noopener\" target=\"_blank\">Cursor<\/a>\u00a0to build a Razorpay integration can let the agent fetch live data, create test transactions, and verify API responses, all without leaving the editor. The agent treats the CLI the same way it would treat `git` or any other shell tool.<\/p>\n<\/div>\n<div class=\"cl-preview-section\">\n<h2 id=\"what-comes-next\"><span class=\"ez-toc-section\" id=\"What_Comes_Next\"><\/span>What Comes Next<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<\/div>\n<div class=\"cl-preview-section\">\n<div>\n<div data-test-render-count=\"1\">\n<div class=\"group\">\n<div class=\"contents\">\n<div class=\"group relative relative pb-3\" data-is-streaming=\"false\">\n<div class=\"font-claude-response relative leading-[1.65rem] [&amp;_pre&gt;div]:bg-bg-000\/50 [&amp;_pre&gt;div]:border-0.5 [&amp;_pre&gt;div]:border-border-400 [&amp;_.ignore-pre-bg&gt;div]:bg-transparent [&amp;_.standard-markdown_:is(p,blockquote,h1,h2,h3,h4,h5,h6)]:pl-2 [&amp;_.standard-markdown_:is(p,blockquote,ul,ol,h1,h2,h3,h4,h5,h6)]:pr-8 [&amp;_.progressive-markdown_:is(p,blockquote,h1,h2,h3,h4,h5,h6)]:pl-2 [&amp;_.progressive-markdown_:is(p,blockquote,ul,ol,h1,h2,h3,h4,h5,h6)]:pr-8\">\n<div>\n<div class=\"standard-markdown grid-cols-1 grid [&amp;_&gt;_*]:min-w-0 gap-3 standard-markdown\">\n<p class=\"font-claude-response-body break-words whitespace-normal leading-[1.7]\">The CLI is available today. Install it, run <code class=\"bg-text-200\/5 border border-0.5 border-border-300 text-danger-000 whitespace-pre-wrap rounded-[0.4rem] px-1 py-px text-[0.9rem]\">razorpay configure<\/code>, and you have the full Razorpay API at your fingertips from the terminal. If you hit a missing operation or a workflow the current version does not support well, <a href=\"https:\/\/github.com\/razorpay\/razorpay-cli\/issues\" rel=\"nofollow noopener\" target=\"_blank\">file an issue<\/a>. The roadmap is driven by what developers actually need, and the best way to shape it is to use it and tell us what is missing.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>For most teams, working with Razorpay means opening a browser, logging into the dashboard, and navigating through a UI. But developers who live in their terminals should not have to context-switch to a browser for any Razorpay tasks. Today, we are launching the Razorpay Command Line Interface (CLI), a tool that lets developers build, test,<\/p>\n","protected":false},"author":177,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[1136],"tags":[],"class_list":{"0":"post-26949","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-ai-payments"},"_links":{"self":[{"href":"https:\/\/razorpay.com\/blog\/wp-json\/wp\/v2\/posts\/26949","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/razorpay.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/razorpay.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/razorpay.com\/blog\/wp-json\/wp\/v2\/users\/177"}],"replies":[{"embeddable":true,"href":"https:\/\/razorpay.com\/blog\/wp-json\/wp\/v2\/comments?post=26949"}],"version-history":[{"count":1,"href":"https:\/\/razorpay.com\/blog\/wp-json\/wp\/v2\/posts\/26949\/revisions"}],"predecessor-version":[{"id":26950,"href":"https:\/\/razorpay.com\/blog\/wp-json\/wp\/v2\/posts\/26949\/revisions\/26950"}],"wp:attachment":[{"href":"https:\/\/razorpay.com\/blog\/wp-json\/wp\/v2\/media?parent=26949"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/razorpay.com\/blog\/wp-json\/wp\/v2\/categories?post=26949"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/razorpay.com\/blog\/wp-json\/wp\/v2\/tags?post=26949"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}