Skip to content

Commit c23dadf

Browse files
feat: add settlement tools (#23)
* feat: fetch_settlement_with_id * feat: fetch_settlement_recon_details * docs: adding doc links * feat: fetch_all_settlements * feat: create_instant_settlement * feat: fetch_all_instant_settlements * feat: fetch_instant_settlement_with_id * feat: fetch_all_settlements expand options * feat: add fluent validator * fix: lints * fix: changes after review
1 parent 27e788e commit c23dadf

File tree

5 files changed

+1160
-19
lines changed

5 files changed

+1160
-19
lines changed

README.md

+25-18
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,31 @@ The Razorpay MCP Server is a [Model Context Protocol (MCP)](https://modelcontext
66

77
Currently, the Razorpay MCP Server provides the following tools:
88

9-
| Tool | Description | API
10-
|:----------------------|:------------------------------------------------|:-----------------------------------
11-
| `fetch_payment` | Fetch payment details with ID | [Payment](https://razorpay.com/docs/api/payments/fetch-with-id)
12-
| `create_payment_link` | Creates a new payment link (standard) | [Payment Link](https://razorpay.com/docs/api/payments/payment-links/create-standard)
13-
| `fetch_payment_link` | Fetch details of a payment link (standard) | [Payment Link](https://razorpay.com/docs/api/payments/payment-links/fetch-id-standard/)
14-
| `create_order` | Creates an order | [Order](https://razorpay.com/docs/api/orders/create/)
15-
| `fetch_order` | Fetch order with ID | [Order](https://razorpay.com/docs/api/orders/fetch-with-id)
16-
| `fetch_all_orders` | Fetch all orders | [Order](https://razorpay.com/docs/api/orders/fetch-all)
17-
| `create_refund` | Creates a refund | [Refund](https://razorpay.com/docs/api/refunds/create-instant/)
18-
| `fetch_refund` | Fetch refund details with ID | [Refund](https://razorpay.com/docs/api/refunds/fetch-with-id/)
19-
| `update_refund` | Update refund notes with ID | [Refund](https://razorpay.com/docs/api/refunds/update/)
20-
| `create_qr_code` | Creates a QR Code | [QR Code](https://razorpay.com/docs/api/qr-codes/create/)
21-
| `fetch_qr_code` | Fetch QR Code with ID | [QR Code](https://razorpay.com/docs/api/qr-codes/fetch-with-id/)
22-
| `fetch_all_qr_codes` | Fetch all QR Codes | [qr code](https://razorpay.com/docs/api/qr-codes/fetch-all/)
23-
| `fetch_qr_codes_by_customer_id` | Fetch QR Codes with Customer ID | [qr code](https://razorpay.com/docs/api/qr-codes/fetch-customer-id/)
24-
| `fetch_qr_codes_by_payment_id` | Fetch QR Codes with Payment ID | [qr code](https://razorpay.com/docs/api/qr-codes/fetch-payment-id/)
25-
| `fetch_payments_for_qr_code` | Fetch Payments for a QR Code | [qr code](https://razorpay.com/docs/api/qr-codes/fetch-payments/)
26-
| `close_qr_code` | Closes a QR Code | [qr code](https://razorpay.com/docs/api/qr-codes/close/)
9+
| Tool | Description | API
10+
|:-----------------------------------|:-------------------------------------------|:-----------------------------------
11+
| `fetch_payment` | Fetch payment details with ID | [Payment](https://razorpay.com/docs/api/payments/fetch-with-id)
12+
| `create_payment_link` | Creates a new payment link (standard) | [Payment Link](https://razorpay.com/docs/api/payments/payment-links/create-standard)
13+
| `fetch_payment_link` | Fetch details of a payment link (standard) | [Payment Link](https://razorpay.com/docs/api/payments/payment-links/fetch-id-standard/)
14+
| `create_order` | Creates an order | [Order](https://razorpay.com/docs/api/orders/create/)
15+
| `fetch_order` | Fetch order with ID | [Order](https://razorpay.com/docs/api/orders/fetch-with-id)
16+
| `fetch_all_orders` | Fetch all orders | [Order](https://razorpay.com/docs/api/orders/fetch-all)
17+
| `create_refund` | Creates a refund | [Refund](https://razorpay.com/docs/api/refunds/create-instant/)
18+
| `fetch_refund` | Fetch refund details with ID | [Refund](https://razorpay.com/docs/api/refunds/fetch-with-id/)
19+
| `update_refund` | Update refund notes with ID | [Refund](https://razorpay.com/docs/api/refunds/update/)
20+
| `create_qr_code` | Creates a QR Code | [QR Code](https://razorpay.com/docs/api/qr-codes/create/)
21+
| `fetch_qr_code` | Fetch QR Code with ID | [QR Code](https://razorpay.com/docs/api/qr-codes/fetch-with-id/)
22+
| `fetch_all_qr_codes` | Fetch all QR Codes | [qr code](https://razorpay.com/docs/api/qr-codes/fetch-all/)
23+
| `fetch_qr_codes_by_customer_id` | Fetch QR Codes with Customer ID | [qr code](https://razorpay.com/docs/api/qr-codes/fetch-customer-id/)
24+
| `fetch_qr_codes_by_payment_id` | Fetch QR Codes with Payment ID | [qr code](https://razorpay.com/docs/api/qr-codes/fetch-payment-id/)
25+
| `fetch_payments_for_qr_code` | Fetch Payments for a QR Code | [qr code](https://razorpay.com/docs/api/qr-codes/fetch-payments/)
26+
| `close_qr_code` | Closes a QR Code | [qr code](https://razorpay.com/docs/api/qr-codes/close/)
27+
| `fetch_all_settlements` | Fetch all settlements | [Settlement](https://razorpay.com/docs/api/settlements/fetch-all)
28+
| `fetch_settlement_with_id` | Fetch settlement details | [Settlement](https://razorpay.com/docs/api/settlements/fetch-with-id)
29+
| `fetch_settlement_recon_details` | Fetch settlement reconciliation report | [Settlement](https://razorpay.com/docs/api/settlements/fetch-recon)
30+
| `create_instant_settlement` | Create an instant settlement | [Settlement](https://razorpay.com/docs/api/settlements/instant/create)
31+
| `fetch_all_instant_settlements` | Fetch all instant settlements | [Settlement](https://razorpay.com/docs/api/settlements/instant/fetch-all)
32+
| `fetch_instant_settlement_with_id` | Fetch instant settlement with ID | [Settlement](https://razorpay.com/docs/api/settlements/instant/fetch-with-id)
33+
2734

2835
## Use Cases
2936
- Workflow Automation: Automate your day to day workflow using Razorpay MCP Server.

pkg/razorpay/orders.go

-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,6 @@ func FetchAllOrders(
201201
ValidateAndAddOptionalInt(queryParams, "to").
202202
ValidateAndAddOptionalInt(queryParams, "authorized").
203203
ValidateAndAddOptionalString(queryParams, "receipt").
204-
ValidateAndAddOptionalArray(queryParams, "expand").
205204
ValidateAndAddExpand(queryParams)
206205

207206
if result, err := validator.HandleErrorsIfAny(); result != nil {

0 commit comments

Comments
 (0)