# Razorpay — how to use (mcp.ai)

Connect your Razorpay account and use 42 tools for payment processing straight from your AI agent. Connect with your own API key. Payment gateway and financial services platform for businesses in India.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_razorpay?ms=1787291280000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `razorpay_cancel_invoice`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/razorpay`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/razorpay/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/razorpay/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.
  - body: { invoice_id: string }
- `POST https://api.mcp.ai/api/razorpay/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.
  - body: { plink_id: string }
- `POST https://api.mcp.ai/api/razorpay/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 parameter
  - body: { notes?: object, amount: integer, receipt?: string, currency: string, partial_payment?: boolean }
- `POST https://api.mcp.ai/api/razorpay/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.
  - body: { name: string, type: string, email?: string, notes?: object, contact?: string, reference_id?: string }
- `POST https://api.mcp.ai/api/razorpay/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.
  - body: { name?: string, email?: string, gstin?: string, notes?: object, contact?: string }
- `POST https://api.mcp.ai/api/razorpay/create/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 issu
  - body: { type?: string, notes?: object, terms?: string, amount?: integer, tax_id?: string, comment?: string, receipt?: string, currency?: string, customer?: object, order_id?: string, tax_rate?: integer, expire_by?: integer, issued_at?: integer, short_url?: boolean, view_less?: boolean, line_items: object[], payment_id?: string, sms_notify?: integer, billing_end?: integer, customer_id?: string, description?: string, email_notify?: integer, billing_start?: integer, invoice_number?: string, idempotency_key?: string, partial_payment?: boolean, group_taxes_discounts?: boolean }
- `POST https://api.mcp.ai/api/razorpay/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.
  - body: { name: string, amount: integer, currency: string, description?: string }
- `POST https://api.mcp.ai/api/razorpay/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.
  - body: { notes?: object, amount: integer, notify?: object, currency: string, customer?: object, expire_by?: integer, description?: string, callback_url?: string, reference_id?: string, callback_method?: string, reminder_enable?: boolean }
- `POST https://api.mcp.ai/api/razorpay/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, pai
  - body: { invoice_id: string }
- `POST https://api.mcp.ai/api/razorpay/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.
  - body: { item_id: string }
- `POST https://api.mcp.ai/api/razorpay/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.
  - body: { plink_id: string }
- `POST https://api.mcp.ai/api/razorpay/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.
  - body: { skip?: integer, count?: integer }
- `POST https://api.mcp.ai/api/razorpay/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.
  - body: { to?: integer, from?: integer, skip?: integer, type?: string, count?: integer, receipt?: string, payment_id?: string, customer_id?: string }
- `POST https://api.mcp.ai/api/razorpay/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.
  - body: { to?: integer, from?: integer, skip?: integer, count?: integer, payment_id?: string, reference_id?: string }
- `POST https://api.mcp.ai/api/razorpay/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 payment
  - body: { to?: integer, from?: integer, skip?: integer, count?: integer }
- `POST https://api.mcp.ai/api/razorpay/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.
  - body: { skip?: integer, count?: integer, payment_id: string, to_timestamp?: integer, from_timestamp?: integer }
- `POST https://api.mcp.ai/api/razorpay/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.
  - body: { invoice_id: string }
- `POST https://api.mcp.ai/api/razorpay/fetch/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.
  - body: { skip?: integer, count?: integer, receipt?: string, authorized?: integer, to_timestamp?: integer, from_timestamp?: integer }
- `POST https://api.mcp.ai/api/razorpay/fetch/orders/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.
  - body: { order_id: string }
- `POST https://api.mcp.ai/api/razorpay/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.
  - body: { order_id: string }
- `POST https://api.mcp.ai/api/razorpay/fetch/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.
  - body: { skip?: integer, count?: integer, to_timestamp?: integer, from_timestamp?: integer }
- `POST https://api.mcp.ai/api/razorpay/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.
  - body: { contact_id: string }
- `POST https://api.mcp.ai/api/razorpay/get/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.
  - body: { customer_id: string }
- `POST https://api.mcp.ai/api/razorpay/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.
  - body: { fund_account_id: string }
- `POST https://api.mcp.ai/api/razorpay/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.
  - body: { item_id: string }
- `POST https://api.mcp.ai/api/razorpay/get/settlement/recon` — 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
  - body: { day?: integer, skip?: integer, year: integer, count?: integer, month: integer }
- `POST https://api.mcp.ai/api/razorpay/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
  - body: { skip?: integer, count?: integer, transfer_id: string, to_timestamp?: integer, from_timestamp?: integer }
- `POST https://api.mcp.ai/api/razorpay/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.
  - body: { invoice_id: string }
- `POST https://api.mcp.ai/api/razorpay/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.
  - body: { customer_id: string }
- `POST https://api.mcp.ai/api/razorpay/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 eff
  - body: { to?: integer, from?: integer, skip?: integer, count?: integer }
- `POST https://api.mcp.ai/api/razorpay/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
  - body: { skip?: integer, count?: integer, contact_id?: string, account_type?: string }
- `POST https://api.mcp.ai/api/razorpay/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 validatio
  - body: { to?: integer, from?: integer, skip?: integer, count?: integer }
- `POST https://api.mcp.ai/api/razorpay/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 stat
  - body: { skip?: integer, count?: integer, active?: boolean, to_timestamp?: integer, from_timestamp?: integer }
- `POST https://api.mcp.ai/api/razorpay/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.
- `POST https://api.mcp.ai/api/razorpay/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.
  - body: { medium: string, plink_id: string }
- `POST https://api.mcp.ai/api/razorpay/send/or/resend/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.
  - body: { medium: string, invoice_id: string }
- `POST https://api.mcp.ai/api/razorpay/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.
  - body: { name?: string, type?: string, email?: string, notes?: object, contact?: string, contact_id: string, reference_id?: string }
- `POST https://api.mcp.ai/api/razorpay/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.
  - body: { name?: string, email?: string, contact?: string, customer_id: string }
- `POST https://api.mcp.ai/api/razorpay/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 
  - body: { date?: integer, type?: string, notes?: object, terms?: string, amount?: integer, tax_id?: string, comment?: string, receipt?: string, currency?: string, customer?: object, order_id?: string, tax_rate?: integer, expire_by?: integer, issued_at?: integer, short_url?: boolean, view_less?: boolean, invoice_id: string, line_items?: object[], payment_id?: string, sms_notify?: integer, billing_end?: integer, customer_id?: string, description?: string, email_notify?: integer, billing_start?: integer, invoice_number?: string, idempotency_key?: string, partial_payment?: boolean, group_taxes_discounts?: boolean }
- `POST https://api.mcp.ai/api/razorpay/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 re
  - body: { name?: string, amount?: integer, item_id: string, description?: string }
- `POST https://api.mcp.ai/api/razorpay/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.
  - body: { notes?: object, order_id: string }
- `POST https://api.mcp.ai/api/razorpay/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.
  - body: { notes?: object, plink_id: string, expire_by?: integer, reference_id?: string, accept_partial?: boolean, reminder_enable?: boolean }

## Example prompts
- "What can I do in Razorpay?"
- "Show me a summary of my Razorpay account"

## More
- Page: https://mcp.ai/razorpay
- Agent spec (llms.txt): https://mcp.ai/razorpay/llms.txt
- Postman collection: https://mcp.ai/razorpay/postman.json
