Labsco
AStheTECH logo

MewCP Razorpay MCP

from AStheTECH

Hosted, Stateless & Multitenant Razorpay MCP server enables AI assistants to manage payments, customers, subscriptions, invoices, and financial operations through Razorpay.

πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedFreeQuick setup

Automate Razorpay payments, refunds, and settlements through AI.

A Model Context Protocol (MCP) server that exposes Razorpay's API for managing orders, payments, refunds, and settlements.

Overview

The Razorpay MCP Server provides full lifecycle payment management through AI:

  • Create and track orders, capture and update payments
  • Issue full or partial refunds with speed control
  • Query settlements and reconcile transaction history

Perfect for:

  • Automating refund workflows and customer support payment queries
  • Building AI-powered dashboards that pull live payment and settlement data
  • Triggering order creation and payment capture from conversational interfaces

Tools

<details> <summary><code>health_check</code> β€” Check server readiness</summary>

Returns a status object confirming the server is running and reachable.

Inputs: (none)

Output:

{
  "status": "ok",
  "server": "CL Razorpay MCP Server"
}
</details> <details> <summary><code>create_order</code> β€” Create a new Razorpay order</summary>

Creates a new order object. The returned order ID is passed to the Razorpay checkout SDK on the frontend to initiate payment.

Inputs:

- `amount`          (integer, required) β€” Amount in smallest currency unit (e.g. paise for INR)
- `currency`        (string, required)  β€” ISO 4217 currency code, e.g. 'INR'
- `receipt`         (string, optional)  β€” Merchant receipt number (max 40 chars)
- `notes`           (object, optional)  β€” Key-value notes to attach to the order
- `partial_payment` (boolean, optional) β€” Whether partial payments are allowed (default: false)

Output:

{
  "id": "order_XXXXXXXXXX",
  "entity": "order",
  "amount": 50000,
  "currency": "INR",
  "status": "created"
}
</details> <details> <summary><code>fetch_order</code> β€” Fetch a specific order</summary>

Retrieves full details of a single Razorpay order by its order ID.

Inputs:

- `order_id` (string, required) β€” Razorpay order ID (e.g. 'order_XXXXXXXXXX')

Output:

{
  "id": "order_XXXXXXXXXX",
  "entity": "order",
  "amount": 50000,
  "amount_paid": 0,
  "status": "created"
}
</details> <details> <summary><code>fetch_all_orders</code> β€” Fetch paginated list of orders</summary>

Returns a filtered, paginated list of all Razorpay orders. Supports Unix timestamp range filtering.

Inputs:

- `count`          (integer, optional) β€” Number of orders to fetch, max 100 (default: 10)
- `skip`           (integer, optional) β€” Number of orders to skip for pagination (default: 0)
- `from_timestamp` (integer, optional) β€” Unix timestamp β€” fetch orders created after this time
- `to_timestamp`   (integer, optional) β€” Unix timestamp β€” fetch orders created before this time

Output:

{
  "entity": "collection",
  "count": 10,
  "items": [...]
}
</details> <details> <summary><code>fetch_payments_for_order</code> β€” Fetch payments for a specific order</summary>

Returns all payments made against a given order ID.

Inputs:

- `order_id` (string, required) β€” Razorpay order ID (e.g. 'order_XXXXXXXXXX')

Output:

{
  "entity": "collection",
  "count": 1,
  "items": [...]
}
</details> <details> <summary><code>update_order</code> β€” Update notes on an order</summary>

Patches the notes field on an existing order. Only the notes field can be updated after creation.

Inputs:

- `order_id` (string, required) β€” Razorpay order ID (e.g. 'order_XXXXXXXXXX')
- `notes`    (object, required) β€” Key-value notes to update on the order

Output:

{
  "id": "order_XXXXXXXXXX",
  "notes": { "key": "value" }
}
</details> <details> <summary><code>fetch_payment</code> β€” Fetch a specific payment</summary>

Retrieves full details of a single Razorpay payment by its payment ID.

Inputs:

- `payment_id` (string, required) β€” Razorpay payment ID (e.g. 'pay_XXXXXXXXXX')

Output:

{
  "id": "pay_XXXXXXXXXX",
  "entity": "payment",
  "amount": 50000,
  "currency": "INR",
  "status": "captured"
}
</details> <details> <summary><code>fetch_all_payments</code> β€” Fetch paginated list of payments</summary>

Returns a filtered, paginated list of all Razorpay payments. Supports Unix timestamp range filtering.

Inputs:

- `count`          (integer, optional) β€” Number of payments to fetch, max 100 (default: 10)
- `skip`           (integer, optional) β€” Number of payments to skip for pagination (default: 0)
- `from_timestamp` (integer, optional) β€” Unix timestamp β€” fetch payments created after this time
- `to_timestamp`   (integer, optional) β€” Unix timestamp β€” fetch payments created before this time

Output:

{
  "entity": "collection",
  "count": 10,
  "items": [...]
}
</details> <details> <summary><code>capture_payment</code> β€” Capture an authorized payment</summary>

Captures a payment that is in authorized state. The amount must exactly match the authorized amount.

Inputs:

- `payment_id` (string, required)  β€” Razorpay payment ID (e.g. 'pay_XXXXXXXXXX')
- `amount`     (integer, required) β€” Amount to capture in smallest currency unit (must match authorized amount)
- `currency`   (string, required)  β€” ISO 4217 currency code, e.g. 'INR'

Output:

{
  "id": "pay_XXXXXXXXXX",
  "status": "captured",
  "amount": 50000
}
</details> <details> <summary><code>update_payment</code> β€” Update notes on a payment</summary>

Patches the notes field on an existing payment.

Inputs:

- `payment_id` (string, required) β€” Razorpay payment ID (e.g. 'pay_XXXXXXXXXX')
- `notes`      (object, required) β€” Key-value notes to update on the payment

Output:

{
  "id": "pay_XXXXXXXXXX",
  "notes": { "key": "value" }
}
</details> <details> <summary><code>create_refund</code> β€” Create a refund for a payment</summary>

Issues a full or partial refund for a captured payment. Omit amount for a full refund. Speed optimum uses instant refund where available.

Inputs:

- `payment_id` (string, required)  β€” Razorpay payment ID to refund (e.g. 'pay_XXXXXXXXXX')
- `amount`     (integer, optional) β€” Refund amount in smallest currency unit; omit for full refund
- `speed`      (string, optional)  β€” Refund speed: 'normal' (default) or 'optimum'
- `notes`      (object, optional)  β€” Key-value notes to attach to the refund
- `receipt`    (string, optional)  β€” Unique merchant receipt number for the refund

Output:

{
  "id": "rfnd_XXXXXXXXXX",
  "entity": "refund",
  "amount": 50000,
  "speed_processed": "normal",
  "status": "processed"
}
</details> <details> <summary><code>fetch_refund</code> β€” Fetch a specific refund</summary>

Retrieves full details of a single Razorpay refund by its refund ID.

Inputs:

- `refund_id` (string, required) β€” Razorpay refund ID (e.g. 'rfnd_XXXXXXXXXX')

Output:

{
  "id": "rfnd_XXXXXXXXXX",
  "entity": "refund",
  "amount": 50000,
  "status": "processed"
}
</details> <details> <summary><code>fetch_all_refunds</code> β€” Fetch paginated list of refunds</summary>

Returns a filtered, paginated list of all Razorpay refunds. Supports Unix timestamp range filtering.

Inputs:

- `count`          (integer, optional) β€” Number of refunds to fetch, max 100 (default: 10)
- `skip`           (integer, optional) β€” Number of refunds to skip for pagination (default: 0)
- `from_timestamp` (integer, optional) β€” Unix timestamp β€” fetch refunds created after this time
- `to_timestamp`   (integer, optional) β€” Unix timestamp β€” fetch refunds created before this time

Output:

{
  "entity": "collection",
  "count": 10,
  "items": [...]
}
</details> <details> <summary><code>fetch_refunds_for_payment</code> β€” Fetch all refunds for a payment</summary>

Returns all refunds issued against a specific payment ID, with pagination support.

Inputs:

- `payment_id` (string, required)  β€” Razorpay payment ID (e.g. 'pay_XXXXXXXXXX')
- `count`      (integer, optional) β€” Number of refunds to fetch, max 100 (default: 10)
- `skip`       (integer, optional) β€” Number of refunds to skip for pagination (default: 0)

Output:

{
  "entity": "collection",
  "count": 2,
  "items": [...]
}
</details> <details> <summary><code>update_refund</code> β€” Update notes on a refund</summary>

Patches the notes field on an existing refund.

Inputs:

- `refund_id` (string, required) β€” Razorpay refund ID (e.g. 'rfnd_XXXXXXXXXX')
- `notes`     (object, required) β€” Key-value notes to update on the refund

Output:

{
  "id": "rfnd_XXXXXXXXXX",
  "notes": { "key": "value" }
}
</details> <details> <summary><code>fetch_all_settlements</code> β€” Fetch paginated list of settlements</summary>

Returns a filtered, paginated list of all Razorpay settlements. Supports Unix timestamp range filtering.

Inputs:

- `count`          (integer, optional) β€” Number of settlements to fetch, max 100 (default: 10)
- `skip`           (integer, optional) β€” Number of settlements to skip for pagination (default: 0)
- `from_timestamp` (integer, optional) β€” Unix timestamp β€” fetch settlements created after this time
- `to_timestamp`   (integer, optional) β€” Unix timestamp β€” fetch settlements created before this time

Output:

{
  "entity": "collection",
  "count": 10,
  "items": [...]
}
</details> <details> <summary><code>fetch_settlement</code> β€” Fetch a specific settlement</summary>

Retrieves full details of a single Razorpay settlement by its settlement ID.

Inputs:

- `settlement_id` (string, required) β€” Razorpay settlement ID (e.g. 'setl_XXXXXXXXXX')

Output:

{
  "id": "setl_XXXXXXXXXX",
  "entity": "settlement",
  "amount": 1000000,
  "status": "processed"
}
</details>

API Parameters Reference

<details> <summary><strong>Common Parameters</strong></summary>
  • count β€” Number of records to return per request (max 100, default 10)
  • skip β€” Number of records to skip; use with count for pagination
  • from_timestamp β€” Unix epoch timestamp (seconds); filters records created at or after this time
  • to_timestamp β€” Unix epoch timestamp (seconds); filters records created at or before this time
</details> <details> <summary><strong>Resource ID Formats</strong></summary>

Orders:

order_{alphanumeric}
Example: order_OGN1lSF2fk1JNW

Payments:

pay_{alphanumeric}
Example: pay_OGN1lSF2fk1JNW

Refunds:

rfnd_{alphanumeric}
Example: rfnd_OGN1lSF2fk1JNW

Settlements:

setl_{alphanumeric}
Example: setl_OGN1lSF2fk1JNW
</details> <details> <summary><strong>Amount Formatting</strong></summary>

All amounts are in the smallest currency unit:

  • INR β†’ paise (β‚Ή500.00 = 50000)
  • USD β†’ cents ($10.00 = 1000)
  • EUR β†’ cents (€10.00 = 1000)
</details>

Getting Your Razorpay API Keys

<details> <summary><strong>Steps</strong></summary>
  1. Go to the Razorpay Dashboard
  2. Navigate to Settings β†’ API Keys
  3. Click Generate Test Key (for test mode) or Generate Live Key (for production)
  4. Copy the Key ID and Key Secret β€” the secret is only shown once; store it securely

Use test mode keys (prefixed rzp_test_) during development and live keys (rzp_live_) in production.

</details>