unified-pay-cli
This server is a payment gateway CLI and MCP server that lets you create payment links, manage transactions and refunds, verify webhooks, and analyze payments across Stripe, Razorpay, and LemonSqueezy.
Create payment and checkout links (single or itemized invoices) with custom amounts, currencies, descriptions, customer details, expiry, and tax breakdowns.
Inspect transactions – list recent charges and check payment status for a given ID.
Issue refunds – partial or full refunds for a payment ID across supported providers.
Verify webhook signatures – authenticate HMAC-SHA256 signed Stripe/Razorpay payloads.
Trigger mock webhooks – simulate signed events (e.g., payment.captured, payment.failed) to test local endpoints.
Get payment analytics – retrieve revenue, success rates, and performance across gateways.
Manage provider configuration via CLI credentials (Stripe, Razorpay, LemonSqueezy).
Run as an MCP server – expose tools (create_payment_link, list_transactions, get_payment_status, create_refund, verify_webhook_signature, etc.) to AI assistants like Claude, Cursor, or Copilot.
Provides tools for creating payment links, listing and inspecting transactions, issuing and tracking refunds, and verifying webhook signatures.
Provides tools for creating payment links, listing and inspecting transactions, issuing and tracking refunds, and verifying webhook signatures.
💳 unified-pay-cli
The Universal Payment Gateway CLI & Model Context Protocol (MCP) Server for Stripe, Razorpay & LemonSqueezy.
🚀 Highlights
⚡ Zero Installation Required: Run instantly on demand via
npx unified-pay-cli.🎯 Multi-Provider Engine: Standardized interface across Stripe, Razorpay, and LemonSqueezy.
🛠️ Smart Payment Link Generation: Interactive terminal UI prompts or direct scripted CLI flags.
🔄 Full Transaction & Refund Lifecycle: Live status checks, recent transaction listings, partial/full refunds, and dedicated refund progress tracking.
📡 Webhook Station & Forwarding Proxy: Built-in HTTP listener (
pay listen) that intercepts, color-codes, and forwards webhook events directly to your local backend (--forward http://localhost:3000/api/webhooks).🔒 Cryptographic Signature Verification: Built-in HMAC-SHA256 verification (
--secret) protecting your local development from forged or tampered webhook payloads.🤖 Native Model Context Protocol (MCP): Connect your payment stack to GitHub Copilot, Cursor, or Claude Desktop so AI can create links, verify signatures, and track invoices from natural language prompts.
Related MCP server: mcp-dev-brasil
⚡ Quick Start
1. Installation
Install globally or run on demand via npx:
# Global install (recommended for daily CLI use)
npm install -g unified-pay-cli
# Or run instantly with npx
npx unified-pay-cli --help2. Configure Credentials
# Stripe
pay config --stripe-key sk_test_51...
# Razorpay
pay config --razorpay-id rzp_test_... --razorpay-secret ...
# LemonSqueezy (Optional)
pay config --lemonsqueezy-key lms_... --lemonsqueezy-store 12345💻 CLI Command Reference
1. Create Payment Links (pay link)
# Interactive mode (prompts for provider, amount, description)
pay link
# Scriptable flag mode
pay link --provider razorpay --amount 350000 --currency INR --desc "2-Hour Technical Consultation"
pay link --provider stripe --amount 2500 --currency USD --desc "Pro Tier Subscription"2. Inspect Transactions (pay txn)
# List recent transactions
pay txn list --provider razorpay --limit 5
# Check specific payment details
pay txn status pay_Oq7Jk8LmNx9 --provider razorpay3. Issue & Track Refunds (pay refund)
pay handles the separate lifecycle of charges vs. refund entities:
# Issue a refund (full or partial in minor units)
pay refund create pay_Oq7Jk8LmNx9 --provider razorpay --amount 10000
# Track live refund progression
pay refund status rfnd_TRNTRFvhQ6NDKx --provider razorpay
# List all past refunds
pay refund list --provider razorpay4. Webhook Station, Verification & Proxy (pay listen)
Catch real-time webhook events during local development without complex tunneling setups:
# 1. Basic listener
pay listen --port 4242
# 2. Listener with HMAC-SHA256 signature verification
pay listen --port 4242 --secret my_webhook_signing_secret
# 3. Listener with signature verification + proxy forwarding to local backend
pay listen --port 4242 --secret my_webhook_secret --forward http://localhost:3000/api/webhooks🤖 Model Context Protocol (MCP) Integration
Turn your AI assistant into an autonomous billing and payment operator.
1. For Claude Desktop (claude_desktop_config.json) / Cursor (mcp.json)
{
"mcpServers": {
"unified-pay": {
"command": "npx",
"args": ["-y", "unified-pay-cli"]
}
}
}2. For VS Code Copilot (.vscode/mcp.json)
{
"servers": {
"unified-pay": {
"type": "stdio",
"command": "npx",
"args": ["-y", "unified-pay-cli"]
}
}
}3. Available AI Tools
Tool Name | Description |
create_payment_link | Creates checkout URLs with custom amount, currency, and note. |
list_transactions | Fetches recent charges and verification statuses. |
get_payment_status | Inspects lifecycle state for a specific payment ID (pay_xxx, ch_xxx). |
create_refund | Triggers a full or partial refund. |
get_refund_status | Tracks the live status of a refund ID (rfnd_xxx, re_xxx). |
list_refunds | Lists historical refund records. |
verify_webhook_signature | Verifies HMAC-SHA256 authenticity of incoming Stripe/Razorpay payloads. |
4. Example AI Prompts
Use unified-pay to generate a INR 3,500 Razorpay payment link for "2-Hour Technical Consultation" and draft a WhatsApp message for the client.
Check if payment ID pay_Oq7Jk8LmNx9 on Razorpay was successfully captured.
Issue a full refund for Stripe charge ch_3Mtw1234 using unified-pay.
Verify if this incoming Razorpay webhook payload and signature are authentic using my signing secret.🧪 Testing & Verification
# Run unit tests
npm test
# Run tests in watch mode
npm run test:watch🛠️ Development
# 1. Clone the repository
git clone https://github.com/your-username/unified-pay-cli.git
cd unified-pay-cli
# 2. Install dependencies
npm install
# 3. Build TypeScript
npm run build
# 4. Symlink globally for local testing
npm link📄 License
Distributed under the MIT License. See LICENSE for details.
Available Tools
7 toolscompare_gateway_feesA
Evaluates and compares the transaction processing fees, percentage cuts, fixed interchange fees, and estimated net payouts across Stripe, Razorpay, and LemonSqueezy for a given transaction amount and currency. Returns an itemized fee breakdown for each supported gateway alongside the recommended lowest-cost provider.
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | The gross transaction amount in minor currency units (e.g., 10000 for $100.00 or ₹100.00) to calculate fee deductions against. | |
| currency | Yes | Three-letter ISO 4217 currency code (e.g., "USD", "INR", "EUR", "GBP") to evaluate currency-specific processing rate tiers. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The tool is read-only, and the description emphasizes evaluation and comparison with no side effects. However, it does not explicitly state that it makes no modifications or external calls, which could be worth mentioning for full transparency. The absence of side-effect annotations is offset by the clear intent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, composed of two sentences that cover the input, the process, and the output. No redundant or extraneous information is included. It is well-structured and easy to read.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description fully explains the tool's purpose, inputs (amount and currency), and outputs (itemized fee breakdown and recommended provider). Since there is no output schema, the description adequately covers what the caller should expect. No critical information about the tool's behavior is missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema descriptions for both parameters are highly detailed, providing units (minor currency units), examples, and valid currency codes. The tool description adds no extra parameter information but relies on the schema, which is already comprehensive. Since schema coverage is 100%, a baseline of 3 is appropriate, but the schema's clarity raises the score to 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: comparing transaction fees across Stripe, Razorpay, and LemonSqueezy for a given amount and currency. It distinguishes itself from sibling tools that handle payment link creation, webhooks, analytics, itemized invoices, and refunds, making its specific purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implicitly indicates when to use this tool—whenever a fee comparison across these gateways is needed. It does not explicitly contrast with alternatives, but the distinct purpose and the mention of the recommended lowest-cost provider make the usage context clear. A brief note on when not to use it would have earned a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
create_itemized_invoiceA
Constructs a multi-item commercial invoice checkout link containing itemized product line descriptions, per-unit pricing, item quantities, total tax calculations, and customer billing details. Returns the generated hosted invoice payment URL and itemized receipt breakdown.
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | Array of structured invoice line items detailing goods or services, unit quantities, and individual unit prices. | |
| currency | No | Three-letter ISO 4217 currency code applied across all line items and total invoice settlement (e.g., "USD", "INR", "EUR"). Defaults to "INR". | |
| provider | No | Payment gateway adapter used to issue and host the invoice checkout link. If omitted, smart routing selects the optimal gateway based on total invoice volume. | |
| customerEmail | Yes | Customer email address to which the official invoice payment notification and digital itemized receipt will be dispatched. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of disclosing side effects. It correctly states that it constructs a checkout link and returns a URL and receipt breakdown, but it does not disclose whether the customer is charged immediately, whether an email is sent (though the schema mentions notification dispatch under customerEmail), or whether this is an idempotent creation. These are meaningful behavioral gaps for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two tight sentences with no fluff. The first sentence packs the essential capabilities (multi-item, line descriptions, pricing, quantities, tax, billing details) and the second states the return value. Every phrase contributes to the agent's understanding.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (4 parameters, one nested object, no output schema) and no annotations, the description covers the core purpose and return output well. It does not explain provider smart routing, default currency behavior, or payment flow timing, but these are partially covered by the schema. Overall, it gives a solid contextual picture for selection and invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, with thorough descriptions for items, currency, provider, and customerEmail. The tool description adds no new parameter-level meaning beyond the schema's already detailed explanations, so the baseline score of 3 is appropriate. The mention of 'total tax calculations' is a computed feature, not a parameter, and does not enhance parameter understanding.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb ('Constructs') and resource ('multi-item commercial invoice checkout link'), and immediately distinguishes itself from the generic sibling 'create_payment_link' by emphasizing itemized line items, per-unit pricing, and tax calculations. This makes the tool's unique purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage through its itemized invoice focus, but it never explicitly states when to prefer this over 'create_payment_link' or other siblings. It lacks phrases like 'use this when' or 'for simple payments, use create_payment_link instead.' The usage context is clear but not differentiated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
create_payment_linkA
Generates a secure hosted payment checkout URL across Stripe, Razorpay, or LemonSqueezy. Supports custom transaction amounts, automatic currency formatting, customer prefill metadata (name, email, phone), customizable link expiry timeouts, and intelligent multi-gateway routing. Returns a JSON object containing the checkout URL, payment link ID, status, and assigned gateway provider.
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | The total transaction amount represented in minor currency units (e.g., 50000 for $500.00 USD or ₹500.00 INR, 1500 for $15.00). Must be a positive integer. | |
| currency | Yes | Three-letter ISO 4217 currency code for the charge (e.g., "USD", "INR", "EUR", "GBP"). Defaults to "USD" or profile default if omitted. | |
| provider | No | Target payment provider adapter to execute the charge ("stripe" for international credit cards, "razorpay" for Indian domestic UPI/cards/netbanking, "lemonsqueezy" for merchant-of-record digital products). If omitted, smart routing is used. | |
| description | Yes | Detailed billing description or line item summary presented directly to the customer on the hosted checkout page. | |
| customerName | No | Customer full legal or billing name used to automatically prefill checkout contact forms. | |
| smartRouting | No | When set to true, automatically evaluates the currency and transaction size to route to the lowest fee gateway provider. | |
| customerEmail | No | Customer email address used for receipt delivery and automatic checkout form prefilling. | |
| customerPhone | No | Customer contact phone number with international country calling code (e.g., "+919876543210" or "+14155552671") for SMS delivery and verification. | |
| expiresInMinutes | No | Time-to-live expiration window in minutes after which the generated checkout URL automatically expires and rejects payments. Defaults to no expiration if omitted. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the resource is a hosted checkout URL, describes customer prefill metadata, link expiry, routing, and explicitly lists the JSON return fields. While it does not mention authorization requirements or whether the customer is charged immediately, it provides substantial behavioral context beyond a simple action statement.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three sentences, with the primary purpose front-loaded in the first sentence. The second sentence efficiently summarizes capabilities without redundancy, and the third sentence covers return values. Every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (9 parameters, multiple providers, no output schema), the description is largely complete: it names providers, key capabilities, and return fields. However, it omits detail about error conditions, authorization prerequisites, or whether the payment is captured immediately upon link generation, which would make it fully self-sufficient for an agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description summarizes parameter-related features like custom amounts, currency formatting, customer prefill metadata, and expiry timeouts, but it does not add meaning beyond what the schema already documents for each individual parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific action and resource: "Generates a secure hosted payment checkout URL across Stripe, Razorpay, or LemonSqueezy." It clearly distinguishes this tool from siblings like create_refund and create_itemized_invoice by focusing exclusively on payment link generation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The use case is implied through the description of generating checkout URLs and supporting multi-gateway routing, but there is no explicit guidance about when to choose this tool over alternatives such as create_itemized_invoice or create_refund. No exclusions or alternative recommendations are provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
create_refundA
Executes an immediate full or partial monetary refund for a previously settled payment or charge transaction across supported payment gateways. Returns a JSON confirmation object containing the refund ID, status, refunded amount, and currency.
| Name | Required | Description | Default |
|---|---|---|---|
| amount | No | Optional minor unit amount to refund for partial reversals (e.g., 2500 for a $25.00 refund on a $100.00 charge). If omitted or null, a full 100% refund of the original payment amount is processed. | |
| provider | Yes | The originating payment provider that processed the initial charge transaction. | |
| paymentId | Yes | The unique gateway transaction identifier of the charge to refund (e.g., "pay_N1xL5Z81bABCDE" for Razorpay or "ch_3M52pELkdjaWFaKS0ABCDE" / "pi_3M52pE..." for Stripe). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden. It discloses the return shape (JSON with refund ID, status, amount, currency) and mentions 'immediate' and 'full or partial'. However, it omits important behavioral context such as irreversibility, failure modes, provider-specific behavior, or required permissions, which is expected for a financial mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the action and scope. Every word earns its place with no redundancy, making it a model of concise documentation.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers the core action, full/partial refund capability, supported providers (implied), and return object. Without an output schema, the return description helps. It lacks some edge-case context like error handling or idempotency, but for a refund tool with a rich schema, it is mostly complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with detailed descriptions for all three parameters, including examples and enum values. The description adds no further parameter-level detail beyond what the schema already provides, so the baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Executes') and names the resource ('previously settled payment or charge transaction') with a clear action (monetary refund). It also mentions full or partial scope, distinguishing it from sibling tools like create_payment_link or get_payment_analytics.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description clearly implies when to use: to refund a previously settled payment, with immediate execution and full/partial options. It doesn't explicitly name alternatives or exclusions, but none of the sibling tools compete with this functionality, so the implied usage context is sufficient.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_payment_analyticsA
Aggregates real-time transaction performance, total gross volume, captured revenue volume, settled payouts, and payment success/conversion rates by querying recent transaction histories across connected payment gateway accounts. Returns statistical aggregates and settlement ratios.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | The maximum number of recent historical transaction records to retrieve and analyze (integer between 1 and 100, default: 50). | |
| provider | Yes | The target payment gateway account from which to fetch charge histories and calculate performance metrics. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description must convey behavioral transparency. It states the tool returns aggregates and settlement ratios, implying a read-only operation, but it does not explicitly mention safety, side effects, or any requirements. It adds some context (real-time, recent histories) but lacks explicit safety guarantees.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loads the core function, and contains no redundant information. Every phrase adds value, making it concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read-oriented analytics tool with only 2 parameters and no output schema, the description covers the purpose, key inputs (implicitly), and output. It lacks explicit caveats or limitations but is otherwise sufficient for an agent to invoke correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema provides 100% coverage for both parameters (provider and limit), including clear descriptions and an enum for provider. The tool description adds minimal extra meaning beyond the schema, mostly integrating the parameters into the overall narrative. Per the rubric, with high schema coverage, the baseline is 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (aggregates) and the resource (transaction performance metrics across payment gateway accounts), with specific metrics listed. This distinguishes it from sibling tools like compare_gateway_fees (which focuses on fee comparison) and create_payment_link (which creates links).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no explicit guidance on when to use this tool over alternatives. It does not mention any exclusions, prerequisites, or alternative tools. The intended use case is only implied by the function name and description.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
trigger_mock_webhookA
Constructs and dispatches a cryptographically authentic HMAC-SHA256 signed synthetic webhook event payload directly to a local or remote backend endpoint. Useful for verifying webhook signature parsing, event processing handlers, and local integration pipelines without executing live card charges. Returns the HTTP status code, response headers, and response body received from the target server.
| Name | Required | Description | Default |
|---|---|---|---|
| event | Yes | The standardized webhook event name to emulate (e.g., "payment.captured", "payment.failed", "refund.processed", "payment_intent.succeeded", "charge.refunded"). | |
| amount | No | Optional minor unit currency amount to inject into the mock payload data body (e.g., 5000 for $50.00). Defaults to 1000 if unspecified. | |
| secret | No | The shared webhook signing secret used to compute the HMAC-SHA256 signature header. If omitted, the active profile webhook secret is used. | |
| provider | Yes | The payment gateway whose payload schema, signature format, and HTTP headers will be synthesized ("razorpay" adds "x-razorpay-signature", "stripe" adds "stripe-signature"). | |
| targetUrl | Yes | Fully qualified HTTP or HTTPS destination URL of your backend webhook ingestion endpoint (e.g., "http://localhost:3000/api/webhooks" or "https://api.example.com/webhooks"). |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must disclose behavior. It covers dispatching, signing, and returning response details, but omits potential side effects like network failure handling or external endpoint impact. The main actions are clear, but not exhaustive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise, two sentences, and flows logically from action to use case to output. No redundant wording.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description explains what the tool does, its return value, and its intended use. It doesn't cover edge cases like error handling or rate limits, but for a mock testing tool, the provided information is sufficient for basic usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema descriptions for all five parameters are detailed and self-explanatory, covering format and defaults. The tool description adds no extra parameter info, but the schema already provides high coverage, so a baseline of 3 is exceeded due to quality.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: constructing and dispatching a signed webhook event to a target endpoint for testing. This distinguishes it from sibling tools like create_payment_link or verify_webhook_signature.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly notes usefulness for verifying webhook parsing and integration pipelines without live charges, providing clear context. However, it doesn't explicitly contrast with alternatives, though the 'without live charges' implies a testing scenario.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
verify_webhook_signatureA
Validates the cryptographic HMAC-SHA256 signature and tamper-resistance of an incoming webhook HTTP request payload against a shared webhook signing secret. Returns a JSON boolean indicating whether the signature matches the payload digest.
| Name | Required | Description | Default |
|---|---|---|---|
| secret | Yes | The private shared webhook signing secret configured in your provider developer dashboard. | |
| provider | Yes | The originating payment provider determining the signature algorithm ("stripe" parses timestamped t=,v1= signatures; "razorpay" computes standard hex HMAC-SHA256 digests). | |
| signature | Yes | The cryptographic signature string extracted from the HTTP request headers ("x-razorpay-signature" for Razorpay, "stripe-signature" for Stripe). | |
| rawPayload | Yes | The exact unparsed UTF-8 raw string body of the incoming HTTP request before any JSON parsing or middleware transformations. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description must disclose behavioral traits. It clarifies the return value as a JSON boolean to ensure 'whether the signature matches the payload digest'. It does not describe side-effect behavior (or lack thereof), error handling for malformed signatures, or whether the check is performed locally without network calls, leaving some burden unmet.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with the core operation and result. Every word contributes useful signal; there is no filler, repetition, or boilerplate.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With four parameters thoroughly described in the schema and the description stating the return behavior, the essentials for selecting and invoking the tool are present. It loses only a point because explicit edgecase behavior—such as invalid signature formats or missing provider keys—is not addressed.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema covers all four parameters with detailed descriptions, including provider-specific signature formats and raw payload requirements, so the description need not repeat this. The overall description reuses the notion of 'payload digest' but does not substantially add to schema-level parameter semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly identifies the operation with a specific verb—"Validates"—and a well-defined resource: the cryptographic HMAC-SHA256 signature of an incoming webhook payload. It states the comparison against a shared secret and the JSON boolean result, making it unambiguous and distinct from webhook-creation or analytics sibling tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description conveys useful context: this is for verifying an incoming webhook's signature before trusting the payload. It does not, however, explicitly state when not to use it, mention alternatives like trigger_mock_webhook for testing, or give guidance on prerequisite steps like retrieving the correct provider secret.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
7 tool updates
v0.1.3- Changed
compare_gateway_fees2 fields changed- changed
Input schema / properties / amount / descriptionPrevious value: -"Amount in minor units (e.g. 50000)"New value: +"The gross transaction amount in minor currency units (e.g., 10000 for $100.00 or ₹100.00) to calculate fee deductions against." - changed
Input schema / properties / currency / descriptionPrevious value: -"Currency code (INR, USD, EUR)"New value: +"Three-letter ISO 4217 currency code (e.g., \"USD\", \"INR\", \"EUR\", \"GBP\") to evaluate currency-specific processing rate tiers."
- Changed
create_itemized_invoice7 fields changed- changed
Input schema / properties / currency / descriptionPrevious value: -"Currency code"New value: +"Three-letter ISO 4217 currency code applied across all line items and total invoice settlement (e.g., \"USD\", \"INR\", \"EUR\"). Defaults to \"INR\"." - changed
Input schema / properties / customerEmail / descriptionPrevious value: -"Customer email"New value: +"Customer email address to which the official invoice payment notification and digital itemized receipt will be dispatched." - added
Input schema / properties / items / descriptionAdded value: +"Array of structured invoice line items detailing goods or services, unit quantities, and individual unit prices." - added
Input schema / properties / items / items / properties / name / descriptionAdded value: +"Descriptive title or name of the individual product, license, or service line item." - added
Input schema / properties / items / items / properties / quantity / descriptionAdded value: +"Total number of units purchased for this line item (positive integer >= 1)." - changed
Input schema / properties / items / items / properties / unitAmount / descriptionPrevious value: -"Price per unit in minor units"New value: +"Price per individual unit specified in minor currency units (e.g., 2500 for $25.00 or ₹25.00)." - added
Input schema / properties / provider / descriptionAdded value: +"Payment gateway adapter used to issue and host the invoice checkout link. If omitted, smart routing selects the optimal gateway based on total invoice volume."
- Changed
create_payment_link9 fields changed- changed
Input schema / properties / amount / descriptionPrevious value: -"Amount in minor units (e.g. 50000 = ₹500)"New value: +"The total transaction amount represented in minor currency units (e.g., 50000 for $500.00 USD or ₹500.00 INR, 1500 for $15.00). Must be a positive integer." - changed
Input schema / properties / currency / descriptionPrevious value: -"Currency code (INR, USD, etc.)"New value: +"Three-letter ISO 4217 currency code for the charge (e.g., \"USD\", \"INR\", \"EUR\", \"GBP\"). Defaults to \"USD\" or profile default if omitted." - changed
Input schema / properties / customerEmail / descriptionPrevious value: -"Customer email address"New value: +"Customer email address used for receipt delivery and automatic checkout form prefilling." - changed
Input schema / properties / customerName / descriptionPrevious value: -"Customer full name to prefill"New value: +"Customer full legal or billing name used to automatically prefill checkout contact forms." - changed
Input schema / properties / customerPhone / descriptionPrevious value: -"Customer phone number (e.g. +919876543210)"New value: +"Customer contact phone number with international country calling code (e.g., \"+919876543210\" or \"+14155552671\") for SMS delivery and verification." - changed
Input schema / properties / description / descriptionPrevious value: -"Payment description"New value: +"Detailed billing description or line item summary presented directly to the customer on the hosted checkout page." - changed
Input schema / properties / expiresInMinutes / descriptionPrevious value: -"Expiry timeout in minutes"New value: +"Time-to-live expiration window in minutes after which the generated checkout URL automatically expires and rejects payments. Defaults to no expiration if omitted." - added
Input schema / properties / provider / descriptionAdded value: +"Target payment provider adapter to execute the charge (\"stripe\" for international credit cards, \"razorpay\" for Indian domestic UPI/cards/netbanking, \"lemonsqueezy\" for merchant-of-record digital products). If omitted, smart routing is used." - added
Input schema / properties / smartRouting / descriptionAdded value: +"When set to true, automatically evaluates the currency and transaction size to route to the lowest fee gateway provider."
- Changed
create_refund3 fields changed- changed
Input schema / properties / amount / descriptionPrevious value: -"Amount in minor units (optional for full refund)"New value: +"Optional minor unit amount to refund for partial reversals (e.g., 2500 for a $25.00 refund on a $100.00 charge). If omitted or null, a full 100% refund of the original payment amount is processed." - changed
Input schema / properties / paymentId / descriptionPrevious value: -"Charge or Payment ID (e.g. pay_xxx, ch_xxx)"New value: +"The unique gateway transaction identifier of the charge to refund (e.g., \"pay_N1xL5Z81bABCDE\" for Razorpay or \"ch_3M52pELkdjaWFaKS0ABCDE\" / \"pi_3M52pE...\" for Stripe)." - added
Input schema / properties / provider / descriptionAdded value: +"The originating payment provider that processed the initial charge transaction."
- Changed
get_payment_analytics2 fields changed- changed
Input schema / properties / limit / descriptionPrevious value: -"Number of recent charges to analyze"New value: +"The maximum number of recent historical transaction records to retrieve and analyze (integer between 1 and 100, default: 50)." - added
Input schema / properties / provider / descriptionAdded value: +"The target payment gateway account from which to fetch charge histories and calculate performance metrics."
- Changed
trigger_mock_webhook5 fields changed- changed
Input schema / properties / amount / descriptionPrevious value: -"Amount in minor units"New value: +"Optional minor unit currency amount to inject into the mock payload data body (e.g., 5000 for $50.00). Defaults to 1000 if unspecified." - changed
Input schema / properties / event / descriptionPrevious value: -"Event name (e.g. payment.captured, payment.failed, refund.processed)"New value: +"The standardized webhook event name to emulate (e.g., \"payment.captured\", \"payment.failed\", \"refund.processed\", \"payment_intent.succeeded\", \"charge.refunded\")." - added
Input schema / properties / provider / descriptionAdded value: +"The payment gateway whose payload schema, signature format, and HTTP headers will be synthesized (\"razorpay\" adds \"x-razorpay-signature\", \"stripe\" adds \"stripe-signature\")." - changed
Input schema / properties / secret / descriptionPrevious value: -"Webhook signing secret"New value: +"The shared webhook signing secret used to compute the HMAC-SHA256 signature header. If omitted, the active profile webhook secret is used." - changed
Input schema / properties / targetUrl / descriptionPrevious value: -"Backend HTTP endpoint (e.g. http://localhost:3000/api/webhooks)"New value: +"Fully qualified HTTP or HTTPS destination URL of your backend webhook ingestion endpoint (e.g., \"http://localhost:3000/api/webhooks\" or \"https://api.example.com/webhooks\")."
- Changed
verify_webhook_signature4 fields changed- added
Input schema / properties / provider / descriptionAdded value: +"The originating payment provider determining the signature algorithm (\"stripe\" parses timestamped t=,v1= signatures; \"razorpay\" computes standard hex HMAC-SHA256 digests)." - changed
Input schema / properties / rawPayload / descriptionPrevious value: -"Exact raw body of the HTTP request"New value: +"The exact unparsed UTF-8 raw string body of the incoming HTTP request before any JSON parsing or middleware transformations." - changed
Input schema / properties / secret / descriptionPrevious value: -"Webhook signing secret"New value: +"The private shared webhook signing secret configured in your provider developer dashboard." - changed
Input schema / properties / signature / descriptionPrevious value: -"x-razorpay-signature or stripe-signature header"New value: +"The cryptographic signature string extracted from the HTTP request headers (\"x-razorpay-signature\" for Razorpay, \"stripe-signature\" for Stripe)."
7 tool updates
v0.1.2- First observed
compare_gateway_fees - First observed
create_itemized_invoice - First observed
create_payment_link - First observed
create_refund - First observed
get_payment_analytics - First observed
trigger_mock_webhook - First observed
verify_webhook_signature
TDQS
Scored across 7 tools
Most tools are clearly distinct, but create_payment_link and create_itemized_invoice both generate hosted checkout URLs, potentially causing confusion. Other tools (fees, webhooks, refunds, analytics) have clear boundaries.
All tools follow a consistent verb_noun snake_case pattern (create_, compare_, trigger_, verify_, get_). The naming is uniform and predictable across the entire set.
Seven tools is a well-scoped size for a payment CLI, covering common operations without overwhelming the user. Each tool addresses a distinct payment workflow, making the count appropriate.
Core operations like creating payments, refunds, and webhook verification are covered, but there are notable gaps such as no way to retrieve a payment by ID or list past payments. This forces agents to rely on analytics for status, which is a workaround rather than a direct access pattern.
Maintenance
Related MCP Connectors
MCP server for Lemon Squeezy — stores, products, orders, subscriptions, license keys.
Billing proxy for MCP servers. Adds Stripe and x402 crypto payments without writing billing code.
MCP server for Modern Treasury — payment orders, transactions, counterparties and ledgers.
A paid remote MCP for CLI tool MCP, built to return verdicts, receipts, usage logs, and audit-ready
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceCentralizes payment gateway integrations for Pagar.me (customers, recipients, Pix, credit card, splits, charges) and Woovi/OpenPix (Pix charges, refunds, webhook verification) through MCP tools.7MIT
- AlicenseNot gradedqualityBmaintenance37 MCP servers for agentic commerce and Brazilian services. Covers Stripe ACP, x402 (Coinbase), AP2 (Google), Google UCP, plus 14 traditional Brazilian payment rails, fiscal, banking, communication, logistics, ERP, identity, and crypto APIs. ~480 tools. Supports stdio and Streamable HTTP.269MIT
- AlicenseBqualityDmaintenanceUniversal billing gateway for MCP servers. Add Stripe subscription billing to any MCP server with one line of code. Supports tiered plans, usage tracking, and automatic access control.11MIT
- AlicenseBqualityDmaintenanceAn MCP (Model Context Protocol) server that connects AI assistants like Claude directly to your Razorpay account.14231MIT