# How to integrate Razorpay MCP with Codex

```json
{
  "title": "How to integrate Razorpay MCP with Codex",
  "toolkit": "Razorpay",
  "toolkit_slug": "razorpay",
  "framework": "Codex",
  "framework_slug": "codex",
  "url": "https://composio.dev/toolkits/razorpay/framework/codex",
  "markdown_url": "https://composio.dev/toolkits/razorpay/framework/codex.md",
  "updated_at": "2026-06-18T10:03:14.260Z"
}
```

## Introduction

Codex is one of the most popular coding harnesses out there. And MCP makes the experience even better. With Razorpay MCP integration, you can draft, triage, summarise emails, and much more, all without leaving the terminal or the app, whichever you prefer.

## Also integrate Razorpay with

- [Claude Cowork](https://composio.dev/toolkits/razorpay/framework/claude-cowork)

## TL;DR

### Why use Composio?
Apart from a managed and hosted MCP server, you will get:
- CodeAct: A dedicated workbench that allows GPT to write its code to handle complex tool chaining. Reduces to-and-fro with LLMs for frequent tool calling.
- Large tool responses: Handle them to minimise context rot.
- Dynamic just-in-time access to 20,000 tools across 1000+ other Apps for cross-app workflows. It loads the tools you need, so GPTs aren't overwhelmed by tools you don't need.

## Connect Razorpay to Codex

### How to install Razorpay MCP in Codex
### Run the setup command
Run this command in your terminal to add the Composio MCP server to Codex.

```bash
codex mcp add composio --url https://connect.composio.dev/mcp
```

## What is the Razorpay MCP server, and what's possible with it?

The Razorpay MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Razorpay account. It provides structured and secure access so your agent can perform Razorpay operations on your behalf.

## Supported Tools

| Tool slug | Name | Description |
|---|---|---|
| `RAZORPAY_CANCEL_INVOICE` | Cancel Invoice | Tool to cancel an existing Razorpay invoice. Use this when you need to cancel an invoice that has been issued but not yet paid. Only invoices in 'issued' status can be cancelled. |
| `RAZORPAY_CANCEL_PAYMENT_LINK` | Cancel Payment Link | Tool to cancel a specific payment link. Use when you need to cancel an active payment link before it expires. The payment link cannot be used after cancellation. |
| `RAZORPAY_CREATE_AN_ORDER` | Create an Order | Tool to create a Razorpay order with specified amount and currency. Use when you need to initiate a payment order before collecting payment from a customer. Amount and currency are mandatory parameters; receipt and notes are optional for internal tracking. |
| `RAZORPAY_CREATE_CONTACT` | Create Contact | Tool to create a contact for payouts in RazorpayX. Use when you need to add a new contact (employee, vendor, or customer) for making payouts. |
| `RAZORPAY_CREATE_CUSTOMER` | Create Customer | Tool to create a new customer in Razorpay. Use when you need to register a customer for recurring payments or saved cards. Returns a customer_id that can be used for future transactions. |
| `RAZORPAY_CREATE_INVOICE` | Create an Invoice | Tool to create an invoice for billing customers. Use when you need to generate an invoice with customer details and line items. You can create a blank invoice in draft state, update it later, and issue it when ready. |
| `RAZORPAY_CREATE_ITEM` | Create Item | Tool to create an item that can be used in Razorpay invoices. Use when you need to create a new product or service entry for invoicing purposes. |
| `RAZORPAY_CREATE_PAYMENT_LINK` | Create Payment Link | Tool to create a payment link for collecting payments via a shareable URL. Use when you need to generate a payment link for a customer to complete payment online. |
| `RAZORPAY_DELETE_INVOICE` | Delete Invoice | Tool to delete an invoice in Razorpay. Use when you need to permanently remove an invoice from the system. Note: Only invoices in 'draft' status can be deleted. Invoices in other statuses (issued, paid, cancelled) cannot be deleted. |
| `RAZORPAY_DELETE_ITEM` | Delete item | Tool to delete an existing item from Razorpay. Use when you need to permanently remove an item from the system. Items can only be deleted if they are not associated with any invoices. |
| `RAZORPAY_FETCH_ALL_CUSTOMERS` | Fetch All Customers | Tool to retrieve a paginated list of all customers from Razorpay. Use when you need to get customer details for multiple customers or iterate through the customer base. |
| `RAZORPAY_FETCH_ALL_INVOICES` | Fetch All Invoices | Tool to fetch all invoices with pagination and filtering support. Use when you need to retrieve a list of invoices, optionally filtered by payment ID, customer ID, receipt, or date range. |
| `RAZORPAY_FETCH_ALL_PAYMENT_LINKS` | Fetch All Payment Links | Tool to fetch all payment links with pagination and filtering support. Use when you need to retrieve a list of payment links, optionally filtered by payment ID, reference ID, or date range. |
| `RAZORPAY_FETCH_ALL_PAYMENTS` | Fetch All Payments | Tool to retrieve all payments from your Razorpay account with pagination and time filtering support. Use when you need to list payments, audit transactions, or analyze payment history. Returns payments in descending order by creation time (newest first). |
| `RAZORPAY_FETCH_ALL_REFUNDS_FOR_A_PAYMENT` | Fetch all refunds for a payment | Tool to retrieve all refunds for a specific payment using the Razorpay API. Use when you need to check refund status, track refund history, or list all refunds associated with a particular payment. |
| `RAZORPAY_FETCH_A_PAYMENT_LINK` | Fetch a Payment Link | Tool to retrieve details of a specific payment link by its ID. Use when you need to check the status, amount, customer details, or other attributes of an existing payment link. |
| `RAZORPAY_FETCH_INVOICE_BY_ID` | Fetch Invoice by ID | Tool to fetch a specific invoice by its ID from Razorpay. Use when you need to retrieve complete details of an invoice including customer information, line items, amounts, and payment status. |
| `RAZORPAY_FETCH_ORDERS` | Fetch All Orders | Tool to retrieve a paginated list of all orders from Razorpay. Use when you need to fetch multiple orders, filter by date range, receipt, or authorization status. |
| `RAZORPAY_FETCH_ORDERS_BY_ID` | Fetch Order by ID | Tool to fetch details of a specific Razorpay order using its order ID. Use when you need to retrieve order information, check order status, or verify payment details. |
| `RAZORPAY_FETCH_PAYMENTS_BY_ORDER` | Fetch payments by order | Tool to fetch all payments made for a particular order. Use when you need to retrieve payment details associated with a specific order ID. |
| `RAZORPAY_FETCH_REFUNDS` | Fetch All Refunds | Tool to retrieve all refunds created by you using the Razorpay API. Use when you need to list refunds, track refund status, or analyze refund history with pagination support. |
| `RAZORPAY_GET_CONTACT` | Get Contact | Tool to retrieve details of a specific contact by ID in RazorpayX. Use when you need to fetch information about an existing contact including their name, email, contact details, and metadata. |
| `RAZORPAY_GET_CUSTOMER` | Retrieve Customer | Tool to retrieve details of a specific customer by their ID. Use when you need to fetch customer information including name, email, contact details, and custom notes. |
| `RAZORPAY_GET_FUND_ACCOUNT` | Get Fund Account | Tool to retrieve details of a specific fund account by its ID. Use when you need to fetch fund account information including associated contact, account type, and payment details. |
| `RAZORPAY_GET_ITEM` | Get Item | Tool to retrieve complete details of a specific Razorpay item by its ID. Use when you need to fetch information about an item including its name, description, amount, tax details, and other metadata. |
| `RAZORPAY_GET_SETTLEMENT_RECON` | Get Settlement Reconciliation Report | Tool to fetch settlement reconciliation report for a specific date or month from Razorpay. Use when you need to retrieve detailed settlement transaction data for accounting and reconciliation purposes. |
| `RAZORPAY_GET_TRANSFER_REVERSALS` | Get Transfer Reversals | Tool to fetch all reversals for a specific transfer using the Razorpay Route API. Use when you need to check reversal status, track reversal history, or list all reversals associated with a particular transfer. |
| `RAZORPAY_ISSUE_AN_INVOICE` | Issue an Invoice | Tool to issue a draft Razorpay invoice to send it to the customer. Use when you need to issue an invoice that has been created in draft status. Only invoices in 'draft' status can be issued. |
| `RAZORPAY_LIST_CUSTOMER_TOKENS` | List Customer Tokens | Tool to retrieve all tokens (saved payment methods) for a customer. Use when you need to fetch the list of saved payment methods associated with a specific customer ID. |
| `RAZORPAY_LIST_DISPUTES` | List Disputes | Tool to retrieve a list of all disputes with pagination support. Use when you need to view chargebacks, fraud claims, or other payment disputes. Supports filtering by date range and pagination for efficient retrieval of dispute records. |
| `RAZORPAY_LIST_FUND_ACCOUNTS` | List Fund Accounts | Tool to retrieve a list of all fund accounts from RazorpayX with pagination support. Use when you need to fetch payout destinations, view beneficiary accounts, or manage fund account records. Supports filtering by contact and account type for efficient retrieval. |
| `RAZORPAY_LIST_FUND_VALIDATIONS` | List Fund Validations | Tool to fetch all fund account validation transactions from RazorpayX with pagination support. Use when you need to retrieve validation records, check account verification status, or monitor validation transactions. |
| `RAZORPAY_LIST_ITEMS` | List Items | Tool to retrieve a list of all items from Razorpay with pagination support. Use when you need to fetch invoice items, view available products, or manage item catalog. Supports filtering by active status and date range for efficient retrieval. |
| `RAZORPAY_LIST_PAYMENT_DOWNTIMES` | List Payment Downtimes | Tool to fetch all active payment method downtimes from Razorpay. Use when you need to check the current status of payment methods and identify any ongoing or scheduled downtimes. |
| `RAZORPAY_NOTIFY_PAYMENT_LINK` | Notify Payment Link | Tool to send or resend notification for a payment link via SMS or email. Use when you need to notify a customer about a payment link. |
| `RAZORPAY_SEND_OR_RESEND_NOTIFICATION` | Send/Resend Invoice Notification | Tool to send or resend an invoice notification via email or SMS. Use when you need to notify customers about an invoice through their preferred communication channel. |
| `RAZORPAY_UPDATE_CONTACT` | Update Contact | Tool to update an existing contact's details in RazorpayX. Use when you need to modify contact information such as name, email, phone number, type, reference ID, or notes. |
| `RAZORPAY_UPDATE_CUSTOMER` | Update Customer | Tool to update an existing customer's details in Razorpay. Use when you need to modify customer information such as name, email, or contact number. |
| `RAZORPAY_UPDATE_INVOICE` | Update Invoice | Tool to update an existing draft invoice in Razorpay. Use when you need to modify invoice details such as customer information, line items, description, notes, or other fields. Only invoices in draft state can be updated. |
| `RAZORPAY_UPDATE_ITEM` | Update Item | Tool to update an existing item's details in Razorpay. Use when you need to modify the name, description, or amount of an item. Only the fields provided in the request will be updated; other fields remain unchanged. |
| `RAZORPAY_UPDATE_ORDER` | Update Order | Tool to update an existing order in Razorpay. Use when you need to modify the notes field of an order to store or update additional metadata. |
| `RAZORPAY_UPDATE_PAYMENT_LINK` | Update payment link | Tool to update an existing payment link in Razorpay. Use when you need to modify payment link details such as reference ID, expiry time, partial payment settings, notes, or reminder preferences. |

## Supported Triggers

None listed.

## Creating MCP Server - Stand-alone vs Composio SDK

The Razorpay MCP server provides comprehensive access to Razorpay operations through Composio. Once connected, you can perform all major Razorpay actions directly from Codex using natural language commands.

## Complete Code

None listed.

## Conclusion

### Conclusion
You've successfully integrated Razorpay with Codex using Composio's MCP server. Now you can interact with Razorpay directly from your terminal, VS Code, or the Codex App using natural language commands.
Key benefits of this setup:
- Seamless integration across CLI, VS Code, and standalone app
- Natural language commands for Razorpay operations
- Managed authentication through Composio
- Access to 20,000+ tools across 1000+ apps for cross-app workflows
- CodeAct workbench for complex tool chaining
Next steps:
- Try asking Codex to perform various Razorpay operations
- Explore cross-app workflows by connecting more toolkits
- Build automation scripts that leverage Codex's AI capabilities

## How to build Razorpay MCP Agent with another framework

- [Claude Cowork](https://composio.dev/toolkits/razorpay/framework/claude-cowork)

## Related Toolkits

- [Stripe](https://composio.dev/toolkits/stripe) - Stripe is a global online payments platform offering APIs for managing payments, customers, and subscriptions. Trusted by businesses for secure, efficient, and scalable payment processing worldwide.
- [Alpaca](https://composio.dev/toolkits/alpaca) - Alpaca is a stock and crypto trading platform for commission-free trading, real-time market data, and algorithmic strategies. Use it to build brokerage apps, trading bots, and portfolio workflows with market connectivity.
- [Alpha vantage](https://composio.dev/toolkits/alpha_vantage) - Alpha Vantage is a financial data platform offering real-time and historical stock market APIs. Get instant, reliable access to equities, forex, and technical analysis data for smarter trading decisions.
- [Altoviz](https://composio.dev/toolkits/altoviz) - Altoviz is a cloud-based billing and invoicing platform for businesses. It streamlines online payments, expense tracking, and customizable invoice management.
- [Benzinga](https://composio.dev/toolkits/benzinga) - Benzinga provides real-time financial news and data APIs for market coverage. It helps you track breaking news and actionable market insights instantly.
- [Brex](https://composio.dev/toolkits/brex) - Brex provides corporate credit cards and spend management tailored for startups and tech businesses. It helps optimize company cash flow, streamline accounting, and accelerate business growth.
- [Chaser](https://composio.dev/toolkits/chaser) - Chaser is accounts receivable automation software that sends invoice reminders and helps businesses get paid faster. It streamlines the collections process to save time and improve cash flow.
- [Clientary](https://composio.dev/toolkits/clientary) - Clientary is a platform for managing clients, invoices, projects, proposals, and more. It streamlines client work and saves you serious admin time.
- [Coinbase](https://composio.dev/toolkits/coinbase) - Coinbase is a platform for buying, selling, and storing cryptocurrency. It makes exchanging and managing crypto simple and secure for everyone.
- [Coinranking](https://composio.dev/toolkits/coinranking) - Coinranking is a comprehensive cryptocurrency market data platform offering access to real-time coin prices, market caps, and historical data. Get accurate, up-to-date stats for thousands of digital assets in one place.
- [Coupa](https://composio.dev/toolkits/coupa) - Coupa is a business spend management platform for procurement, invoicing, and expenses. It helps organizations streamline purchasing, control costs, and gain complete visibility over financial operations.
- [CurrencyScoop](https://composio.dev/toolkits/currencyscoop) - CurrencyScoop is a developer-friendly API for real-time and historical currency exchange rates. Easily access fiat and crypto data for smart, up-to-date financial applications.
- [Daffy](https://composio.dev/toolkits/daffy) - Daffy is a modern charitable giving platform with a donor-advised fund. Easily set aside funds, grow them tax-free, and donate to over 1.7 million U.S. charities.
- [Eagle doc](https://composio.dev/toolkits/eagle_doc) - Eagle doc is an AI-powered OCR API for invoices and receipts. It delivers fast, reliable, and accurate document data extraction for seamless automation.
- [Elorus](https://composio.dev/toolkits/elorus) - Elorus is an online invoicing and time-tracking software for freelancers and small businesses. Easily manage finances, bill clients, and track work in one place.
- [Eodhd apis](https://composio.dev/toolkits/eodhd_apis) - Eodhd apis delivers comprehensive financial data, including live and historical stock prices, via robust APIs. Easily access reliable, up-to-date market insights to power your apps, dashboards, and analytics.
- [Fidel api](https://composio.dev/toolkits/fidel_api) - Fidel api is a secure platform for linking payment cards to web and mobile apps. It enables real-time card transaction monitoring and event-based automation for businesses.
- [Finage](https://composio.dev/toolkits/finage) - Finage is a secure API platform delivering real-time and historical financial data for stocks, forex, crypto, indices, and commodities. It empowers developers and businesses to access, analyze, and act on market data instantly.
- [Finmei](https://composio.dev/toolkits/finmei) - Finmei is an invoicing tool that simplifies billing, invoice management, and expense tracking. Ideal for automating and organizing your business finances in one place.
- [Fixer](https://composio.dev/toolkits/fixer) - Fixer is a currency data API offering real-time and historical exchange rates for 170 currencies. Instantly access accurate, up-to-date forex data for your applications and workflows.

## Frequently Asked Questions

### What are the differences in Tool Router MCP and Razorpay MCP?

With a standalone Razorpay MCP server, the agents and LLMs can only access a fixed set of Razorpay tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from Razorpay and many other apps based on the task at hand, all through a single MCP endpoint.

### Can I use Tool Router MCP with Codex?

Yes, you can. Codex fully supports MCP integration. You get structured tool calling, message history handling, and model orchestration while Tool Router takes care of discovering and serving the right Razorpay tools.

### Can I manage the permissions and scopes for Razorpay while using Tool Router?

Yes, absolutely. You can configure which Razorpay scopes and actions are allowed when connecting your account to Composio. You can also bring your own OAuth credentials or API configuration so you keep full control over what the agent can do.

### How safe is my data with Composio Tool Router?

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your Razorpay data and credentials are handled as safely as possible.

---
[See all toolkits](https://composio.dev/toolkits) · [Composio docs](https://docs.composio.dev/llms.txt)
