unified-pay-cli
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. Add to VS Code / GitHub Copilot (.vscode/mcp.json)
{
"mcpServers": {
"unified-pay": {
"command": "npx",
"args": ["-y", "unified-pay-cli", "mcp"]
}
}
}2. 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. |
3. 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.
This server cannot be installed
Maintenance
Related MCP Servers
- Alicense-qualityDmaintenanceCentralizes payment gateway integrations for Pagar.me (customers, recipients, Pix, credit card, splits, charges) and Woovi/OpenPix (Pix charges, refunds, webhook verification) through MCP tools.9MIT
- Alicense-qualityBmaintenance37 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.267MIT
- 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.14331MIT
Related MCP Connectors
A paid remote MCP for CLI tool MCP, built to return verdicts, receipts, usage logs, and audit-ready
Agent-commerce MCP server for x402/USDC payments and affiliate splits on Base.
MCP server integrating with Stripe - tools for customers, products, payments, and more.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/pritam825/unified-pay-cli'
If you have feedback or need assistance with the MCP directory API, please join our Discord server