Skip to main content
Glama

💳 unified-pay-cli

Der universelle Zahlungs-Gateway-CLI & Model Context Protocol (MCP)-Server für Stripe, Razorpay und LemonSqueezy.

npm version License: MIT MCP Protocol PRs Welcome


🚀 Highlights

  • Keine Installation erforderlich: Direkt bei Bedarf über npx unified-pay-cli ausführen.

  • 🎯 Multi-Provider-Engine: Vereinheitlichte Schnittstelle für Stripe, Razorpay und LemonSqueezy.

  • 🛠️ Intelligente Zahlungs-Link-Erstellung: Interaktive Terminal-UI-Eingabeaufforderungen oder direkte scriptbare CLI-Flags.

  • 🔄 Vollständiger Transaktions- und Rückerstattungslebenszyklus: Live-Statusprüfungen, Auflistung aktueller Transaktionen, Teil-/Vollrückerstattungen und dedizierte Fortschrittsverfolgung für Rückerstattungen.

  • 📡 Webhook-Station und Weiterleitungs-Proxy: Integrierter HTTP-Listener (pay listen), der Webhook-Ereignisse abfängt, farblich kennzeichnet und direkt an Ihr lokales Backend weiterleitet (--forward http://localhost:3000/api/webhooks).

  • 🔒 Kryptografische Signaturprüfung: Integrierte HMAC-SHA256-Verifizierung (--secret), die Ihre lokale Entwicklung vor gefälschten oder manipulierten Webhook-Payloads schützt.

  • 🤖 Natives Model Context Protocol (MCP): Verbinden Sie Ihren Zahlungs-Stack mit GitHub Copilot, Cursor oder Claude Desktop, sodass KI aus natürlichen Sprachaufforderungen Links erstellen, Signaturen überprüfen und Rechnungen verfolgen kann.


Related MCP server: mcp-dev-brasil

⚡ Schnellstart

1. Installation

Global installieren oder bei Bedarf über npx ausführen:

# Global install (recommended for daily CLI use)
npm install -g unified-pay-cli

# Or run instantly with npx
npx unified-pay-cli --help

2. Anmeldedaten konfigurieren

# 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-Befehlsreferenz

# 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. Transaktionen prüfen (pay txn)

# List recent transactions
pay txn list --provider razorpay --limit 5

# Check specific payment details
pay txn status pay_Oq7Jk8LmNx9 --provider razorpay

3. Rückerstattungen durchführen und verfolgen (pay refund)

pay behandelt den getrennten Lebenszyklus von Belastungen und Rückerstattungsobjekten:

# 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 razorpay

4. Webhook-Station, Verifizierung & Proxy (pay listen)

Fangen Sie Echtzeit-Webhook-Ereignisse während der lokalen Entwicklung ab, ohne komplexe Tunnel-Einrichtungen:

# 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

Verwandeln Sie Ihren KI-Assistenten in einen autonomen Abrechnungs- und Zahlungsoperator.

1. Zu VS Code / GitHub Copilot hinzufügen (.vscode/mcp.json)

{
  "mcpServers": {
    "unified-pay": {
      "command": "npx",
      "args": ["-y", "unified-pay-cli", "mcp"]
    }
  }
}

2. Verfügbare KI-Tools

Tool-Name

Beschreibung

create_payment_link

Erstellt Checkout-URLs mit benutzerdefiniertem Betrag, Währung und Notiz.

list_transactions

Ruft aktuelle Belastungen und Verifizierungsstatus ab.

get_payment_status

Prüft den Lebenszyklusstatus einer bestimmten Zahlungs-ID (pay_xxx, ch_xxx).

create_refund

Löst eine vollständige oder teilweise Rückerstattung aus.

get_refund_status

Verfolgt den Live-Status einer Rückerstattungs-ID (rfnd_xxx, re_xxx).

list_refunds

Listet historische Rückerstattungsdatensätze auf.

verify_webhook_signature

Überprüft die HMAC-SHA256-Authentizität eingehender Stripe/Razorpay-Payloads.

3. Beispiel-KI-Aufforderungen

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.

🧪 Tests & Verifizierung

# Run unit tests
npm test

# Run tests in watch mode
npm run test:watch

🛠️ Entwicklung

# 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

📄 Lizenz

Verteilt unter der MIT-Lizenz. Siehe LICENSE für Details.

A
license - permissive license
-
quality - not tested
A
maintenance

Maintenance

Maintainers
Response time
Release cycle
1Releases (12mo)
Commit activity

Related MCP Servers

  • A
    license
    -
    quality
    D
    maintenance
    Centralizes payment gateway integrations for Pagar.me (customers, recipients, Pix, credit card, splits, charges) and Woovi/OpenPix (Pix charges, refunds, webhook verification) through MCP tools.
    9
    MIT
  • A
    license
    -
    quality
    B
    maintenance
    37 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.
    267
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    Universal 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.
    1
    1
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    An MCP (Model Context Protocol) server that connects AI assistants like Claude directly to your Razorpay account.
    14
    33
    1
    MIT

View all related MCP servers

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.

View all MCP Connectors

Latest Blog Posts

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