Razorpay MCP server for AI agents and assistants

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Razorpay MCP or direct API to create payment links, track payments, manage refunds, and review settlements through natural language.

Razorpay logoRazorpay
Api KeyOauth2

Razorpay is a payment gateway and financial services platform for Indian businesses. It helps companies accept payments, manage refunds, send invoices, and run payouts.

42 Tools

Try Razorpay now

Type what you want done — sign in and watch it run live in the Tool Router playground.

TOOL ROUTER PLAYGROUND
Razorpay
Try asking
TOOLS

Supported Tools

Every Razorpay action and event your agent gets out of the box.

Cancel Invoice

Tool to cancel an existing Razorpay invoice.

Cancel Payment Link

Tool to cancel a specific payment link.

Create an Order

Tool to create a Razorpay order with specified amount and currency.

Create Contact

Tool to create a contact for payouts in RazorpayX.

Create Customer

Tool to create a new customer in Razorpay.

Create an Invoice

Tool to create an invoice for billing customers.

Create Item

Tool to create an item that can be used in Razorpay invoices.

Create Payment Link

Tool to create a payment link for collecting payments via a shareable URL.

Delete Invoice

Tool to delete an invoice in Razorpay.

Delete item

Tool to delete an existing item from Razorpay.

Fetch All Customers

Tool to retrieve a paginated list of all customers from Razorpay.

Fetch All Invoices

Tool to fetch all invoices with pagination and filtering support.

Fetch All Payment Links

Tool to fetch all payment links with pagination and filtering support.

Fetch All Payments

Tool to retrieve all payments from your Razorpay account with pagination and time filtering support.

Fetch all refunds for a payment

Tool to retrieve all refunds for a specific payment using the Razorpay API.

Fetch a Payment Link

Tool to retrieve details of a specific payment link by its ID.

Fetch Invoice by ID

Tool to fetch a specific invoice by its ID from Razorpay.

Fetch All Orders

Tool to retrieve a paginated list of all orders from Razorpay.

Fetch Order by ID

Tool to fetch details of a specific Razorpay order using its order ID.

Fetch payments by order

Tool to fetch all payments made for a particular order.

Fetch All Refunds

Tool to retrieve all refunds created by you using the Razorpay API.

Get Contact

Tool to retrieve details of a specific contact by ID in RazorpayX.

Retrieve Customer

Tool to retrieve details of a specific customer by their ID.

Get Fund Account

Tool to retrieve details of a specific fund account by its ID.

Get Item

Tool to retrieve complete details of a specific Razorpay item by its ID.

Get Settlement Reconciliation Report

Tool to fetch settlement reconciliation report for a specific date or month from Razorpay.

Get Transfer Reversals

Tool to fetch all reversals for a specific transfer using the Razorpay Route API.

Issue an Invoice

Tool to issue a draft Razorpay invoice to send it to the customer.

List Customer Tokens

Tool to retrieve all tokens (saved payment methods) for a customer.

List Disputes

Tool to retrieve a list of all disputes with pagination support.

List Fund Accounts

Tool to retrieve a list of all fund accounts from RazorpayX with pagination support.

List Fund Validations

Tool to fetch all fund account validation transactions from RazorpayX with pagination support.

List Items

Tool to retrieve a list of all items from Razorpay with pagination support.

List Payment Downtimes

Tool to fetch all active payment method downtimes from Razorpay.

Notify Payment Link

Tool to send or resend notification for a payment link via SMS or email.

Send/Resend Invoice Notification

Tool to send or resend an invoice notification via email or SMS.

Update Contact

Tool to update an existing contact's details in RazorpayX.

Update Customer

Tool to update an existing customer's details in Razorpay.

Update Invoice

Tool to update an existing draft invoice in Razorpay.

Update Item

Tool to update an existing item's details in Razorpay.

Update Order

Tool to update an existing order in Razorpay.

Update payment link

Tool to update an existing payment link in Razorpay.

SETUP GUIDE

Connect Razorpay MCP Tool with your Agent

1

Install Composio

typescript
npm install @composio/core ai @ai-sdk/mcp @ai-sdk/openai
Install the Composio SDK and your agent framework
2

Create a session with MCP enabled

typescript
import { Composio } from "@composio/core";

const composio = new Composio();
const { mcp } = await composio.create("your-user-id", {
  toolkits: ["razorpay"],
  mcp: true,
});
Create a session scoped to Razorpay and read its MCP URL and headers
3

Connect your agent to the MCP server

typescript
import { createMCPClient } from "@ai-sdk/mcp";
import { openai } from "@ai-sdk/openai";
import { generateText, stepCountIs } from "ai";

const client = await createMCPClient({
  transport: { type: "http", url: mcp.url, headers: mcp.headers },
});

const { text } = await generateText({
  model: openai("gpt-5.6-sol"),
  tools: await client.tools(),
  prompt: "List the 10 most recent Razorpay payments and summarize any failed transactions",
  stopWhen: stepCountIs(10),
});

console.log(text);
await client.close();
Pass the session's MCP URL and headers to your agent and run a Razorpay request
SETUP GUIDE

Connect Razorpay API Tool with your Agent

1

Install Composio

typescript
npm install @composio/core @composio/openai openai
Install the Composio SDK, the OpenAI provider, and the OpenAI SDK
2

Create a Composio session

typescript
import OpenAI from "openai";
import { Composio } from "@composio/core";
import { OpenAIResponsesProvider } from "@composio/openai";

const composio = new Composio({ provider: new OpenAIResponsesProvider() });
const client = new OpenAI();

const session = await composio.create("your-user-id", { toolkits: ["razorpay"] });
const tools = await session.tools();
Initialize Composio with the OpenAI Responses provider and create a session scoped to Razorpay
3

Run Razorpay tools with your agent

typescript
let response = await client.responses.create({
  model: "gpt-5.6-sol",
  tools,
  input: [{ role: "user", content: "List the 10 most recent Razorpay payments and summarize any failed transactions" }],
});

while (response.output.some((o) => o.type === "function_call")) {
  const outputs = await composio.provider.handleToolCalls(session, response.output);
  response = await client.responses.create({
    model: "gpt-5.6-sol",
    tools,
    previous_response_id: response.id,
    input: outputs,
  });
}

console.log(response.output_text);
Send a request, execute the Razorpay tool calls through the session, and print the final answer

Why Use Composio?

AI Native Razorpay Integration

  • Supports both Razorpay MCP and direct API based integrations
  • Structured, LLM-friendly schemas for reliable payment and refund workflows
  • Rich coverage for reading, writing, and querying Razorpay payment data without bespoke integration code

Managed Auth

  • Configure Razorpay API key or OAuth access with auth_configs.create()
  • Link user accounts securely with connected_accounts.link() instead of hard-coding keys
  • Composio handles secure credential storage and API request handling for each user and environment

Agent Optimized Design

  • Razorpay tools are tuned for AI agents, so payment, order, refund, and invoice actions are easier for models to understand
  • Comprehensive execution logs show what your agent ran, when it ran, and which Razorpay account it used
  • Works through Tool Router sessions and MCP flows, including mcp.create() based server workflows

Enterprise Grade Security

  • Fine-grained RBAC helps control which agents and users can access Razorpay actions
  • Scoped, least privilege access keeps sensitive payment operations under control
  • Full audit trail of agent actions supports finance reviews, incident checks, and compliance workflows
FRAMEWORKS

Use Razorpay with any AI Agent Framework

Choose a Framework you want to connect Razorpay with

Rolling this out across your team?

Give your team centralized access control across every framework with Composio’s MCP Gateway.

EXPLORE MCP GATEWAY
FAQ

Frequently asked questions

Razorpay requires connections to go through your own OAuth app. You register it once with Razorpay, add its client ID and secret in the Composio dashboard, and from then on everyone connects by signing in to Razorpay as usual. Composio handles the rest of the flow and the token refresh.

Yes! Composio's Tool Router enables agents to use multiple toolkits. Learn more.

Yes. Composio is SOC 2 Type II compliant and is built to keep your Razorpay connection and credentials secure. OAuth tokens and API keys are encrypted, and sensitive customer data is protected at rest and in transit.

Composio also undergoes independent security testing and continuously monitors its systems for security threats. You can review the latest reports and policies in the Composio Trust Center.

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

When you connect a Razorpay account through Composio, every action runs under that account, so anything the agent creates, sends, or changes shows up in Razorpay as done by you. Keep an approval step in your prompt for actions with side effects, such as sending or deleting, and have the agent draft first.

Exactly the ones Razorpay lists on its consent screen when you connect. Review that screen before approving. If you connect a work account, your Razorpay administrator may need to approve the app first, and you can revoke the access inside Razorpay whenever you want.

Yes. Composio supports multiple connected accounts for the same app, and that works in Claude, ChatGPT, or any other assistant you connect through Composio. Give each Razorpay connection a name such as work or personal, and the assistant uses the one you mention in the request. Each account keeps its own credentials and nothing is merged.

Composio refreshes Razorpay tokens automatically, so day to day you do nothing. If you revoke access inside Razorpay, or Razorpay invalidates the session, the connection shows as expired in Composio and the agent stops acting on that account until you reconnect it, which is a single sign-in.

Composio's free plan includes 100,000 tool calls per month with no credit card, which covers most personal Razorpay use. Paid plans add higher limits and team features. Your Razorpay plan and its API limits still apply as usual.

Built-in connectors usually give one AI access to a limited set of apps. Many people use Composio because it lets their AI connect to more apps than it normally supports, or connect to multiple accounts for the same app (e.g. connect Claude to multiple Razorpay accounts).

With Composio, you connect Razorpay once and then use it across different AI assistants without setting it up separately in each one. Connect your apps to Composio once, then connect Composio to whichever AI you use, whether that's Claude, ChatGPT, Hermes, or your own custom assistant.

Start with Razorpay.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Razorpay tool your agent needs.Free to start.

Start building