Payment Reconciliation Mcp
Pricing
Pay per usage
Payment Reconciliation Mcp
Pricing
Pay per usage
Rating
0.0
(0)
Developer
Amir Khan
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
21 days ago
Last modified
Categories
Features
Share
Ask your AI where your money is. A read-only MCP server that connects Claude, Cursor, VS Code Copilot and any MCP client to Stripe, Razorpay and PayPal at the same time, then answers finance questions across all of them:
"What was our net revenue last month across all gateways?" "Why did sales drop this week?" "Did order #1042 actually get paid?" "Reconcile this WooCommerce export against our payments." "Which disputes need a response, and how many days are left?" "What's actually inside Friday's Stripe payout?"
- 🔒 Read-only by design: it never creates charges, refunds or payouts, and works with Stripe restricted read-only keys
- 🧾 Order reconciliation: paste a CSV/JSON order export and get missing payments, underpayments, double payments and refund mismatches
- 🌍 Multi-currency, multi-gateway: one normalized view, with JPY/KWD handled correctly and no accidental currency mixing
- 🕐 Time-zone aware: "today" and "this month" mean your day (e.g.
Asia/Kolkata) - 🛡️ Resilient: if one gateway fails, you still get data from the others, plus a clear error; secrets are never echoed
- ⚡ Zero runtime dependencies: pure Node.js, already compiled
⚡ Use it on Apify (no install)
This Actor runs in Standby mode as a remote MCP server. Connect your AI client to:
https://<APIFY_USERNAME>--payment-reconciliation-mcp.apify.actor/mcp
Authenticate with your Apify API token (Apify Console → Settings → API & Integrations), and pass your gateway keys as headers. You only need the gateways you use:
| Header | Value |
|---|---|
Authorization | Bearer <your Apify API token> |
X-MCP-Stripe-Secret-Key | Stripe restricted read-only key rk_live_... |
X-MCP-Razorpay-Key-Id / X-MCP-Razorpay-Key-Secret | Razorpay key pair |
X-MCP-Paypal-Client-Id / X-MCP-Paypal-Client-Secret | PayPal REST app (Transaction Search enabled) |
X-MCP-Paypal-Environment | sandbox (optional, default live) |
X-MCP-Timezone | e.g. Asia/Kolkata (optional, default UTC) |
Cursor / Windsurf / VS Code (remote server with headers):
{"mcpServers": {"payments": {"url": "https://<APIFY_USERNAME>--payment-reconciliation-mcp.apify.actor/mcp","headers": {"Authorization": "Bearer <APIFY_TOKEN>","X-MCP-Stripe-Secret-Key": "rk_live_...","X-MCP-Timezone": "Asia/Kolkata"}}}}
Claude Code
claude mcp add --transport http payments https://<APIFY_USERNAME>--payment-reconciliation-mcp.apify.actor/mcp \--header "Authorization: Bearer <APIFY_TOKEN>" \--header "X-MCP-Stripe-Secret-Key: rk_live_..."
Claude Desktop (via mcp-remote):
{"mcpServers": {"payments": {"command": "npx","args": ["-y", "mcp-remote", "https://<APIFY_USERNAME>--payment-reconciliation-mcp.apify.actor/mcp","--header", "Authorization:Bearer <APIFY_TOKEN>","--header", "X-MCP-Stripe-Secret-Key:rk_live_..."]}}}
Pricing: pay per event, charged per successful tool call. Failed calls and the list_gateways setup check are free. Your keys are used only for the current session and are never stored or logged.
1. Requirements (self-hosted)
- Node.js 18.17+
- Credentials for at least one gateway:
| Gateway | What you need | Where |
|---|---|---|
| Stripe | STRIPE_SECRET_KEY. Recommended: a restricted key with Read on Charges, Refunds, Disputes, Payouts, Balance and Balance transactions | Dashboard → Developers → API keys → Create restricted key |
| Razorpay | RAZORPAY_KEY_ID + RAZORPAY_KEY_SECRET | Dashboard → Account & Settings → API Keys |
| PayPal | PAYPAL_CLIENT_ID + PAYPAL_CLIENT_SECRET from a REST app with Transaction Search enabled (PAYPAL_ENVIRONMENT=sandbox for sandbox) | developer.paypal.com → Apps & Credentials |
Test-mode keys (sk_test_, rzp_test_, sandbox) work too, which makes them perfect for trying the server safely.
2. Install & verify
Unzip anywhere. It's already built, so you don't need npm install.
# macOS / LinuxSTRIPE_SECRET_KEY=rk_live_... REPORT_TIMEZONE=Asia/Kolkata node dist/index.js --check# Windows PowerShell$env:STRIPE_SECRET_KEY="rk_live_..."; node dist/index.js --check
✔ stripe connected: Acme Store (live)· razorpay not configured· paypal not configuredAll good: the server is ready to use.
3. Connect your AI client
Claude Desktop (Settings → Developer → Edit Config), Cursor (~/.cursor/mcp.json), Windsurf:
{"mcpServers": {"payments": {"command": "node","args": ["/ABSOLUTE/PATH/TO/payment-reconciliation-mcp/dist/index.js"],"env": {"STRIPE_SECRET_KEY": "rk_live_...","RAZORPAY_KEY_ID": "rzp_live_...","RAZORPAY_KEY_SECRET": "...","PAYPAL_CLIENT_ID": "...","PAYPAL_CLIENT_SECRET": "...","REPORT_TIMEZONE": "Asia/Kolkata"}}}}
Claude Code
$claude mcp add payments -e STRIPE_SECRET_KEY=rk_live_... -e REPORT_TIMEZONE=Asia/Kolkata -- node /ABSOLUTE/PATH/TO/payment-reconciliation-mcp/dist/index.js
VS Code (.vscode/mcp.json): see examples/vscode-mcp.json. VS Code prompts for each key and stores it securely.
Hosted (no install): subscribe on MCPize and paste your keys there. See MCPIZE.md.
4. Tools (17, all read-only)
| Tool | What it answers |
|---|---|
list_gateways | Which gateways are connected, live/test mode, and whether the credentials work |
get_balances | Available and pending balance per gateway and currency |
list_transactions | Unified payments and refunds, filtered by type, status, currency, amount or email |
get_transaction | Full details for any ch_/pi_/re_/po_, pay_/rfnd_/order_/setl_, or PayPal id |
search_payments | "Did order #1042 get paid?": search by email, name, order reference, id or amount |
customer_history | Everything a customer paid, failed, refunded or disputed, across gateways |
revenue_summary | Gross, refunds, fees, net, payments, average payment, failure rate, customers, daily series, method split |
compare_periods | Why revenue changed: count vs basket size vs failures vs refunds vs method shifts |
failed_payments_report | Decline reasons with fix suggestions, failures by method, revenue lost, customers to win back |
fee_analysis | Effective fee % by gateway and method, plus savings from routing to the cheapest gateway |
find_duplicate_charges | Same customer, same amount, within minutes: probable double charges to refund |
reconcile_orders | Store orders (CSV/JSON) vs real payments: missing money, mismatches, duplicates, refund gaps |
payouts_report | Stripe payouts, Razorpay settlements (UTR) and PayPal withdrawals, with failed payouts flagged |
payout_breakdown | Every payment, refund and fee inside one Stripe payout or Razorpay settlement |
refunds_report | Refund totals, refund rate, pending/failed refunds, repeat refunders |
disputes_report | Chargebacks needing a response (days left), amount at risk, win rate |
generate_finance_report | Ready-to-share Markdown report with period comparison and action items |
Common arguments: gateways (e.g. ["stripe","razorpay"]), period (today, yesterday, last_7_days, last_30_days, last_90_days, this_month, last_month, this_year) or from/to dates, and currency.
Order reconciliation
Export orders from your store and pass the file content as orders:
- WooCommerce: Orders → Export (or any CSV export plugin)
- Shopify: Orders → Export → CSV
- Laravel / custom: any CSV or JSON with an order id and total
Columns are detected automatically. The id can be order_id, order number, number, name or id. The total can be total, order total, amount or total_price. Optional columns are currency, status, email and date. European number formats (1.234,50) work too.
Matching uses order references found in gateway metadata (Stripe metadata.order_id, Razorpay notes.woocommerce_order_number, PayPal invoice_id, and others), so 1042, #1042, WC-1042 and Order 1042 all match. Orders without a reference fall back to amount + email + time.
5. Prompts
daily_payments_check, month_end_close, investigate_revenue_drop, reconcile_store_orders and dispute_triage are ready-made workflows. Open them from your client's prompt menu.
6. Configuration
| Variable | Default | Description |
|---|---|---|
REPORT_TIMEZONE | UTC | IANA zone for periods and daily grouping, e.g. Asia/Kolkata, America/New_York |
PAYMENT_GATEWAYS | all | Limit to stripe,razorpay,paypal |
MAX_TRANSACTIONS | 5000 | Cap per gateway per call (results say when it's reached) |
MCP_TOOLSETS | all | gateways,transactions,analytics,reconciliation,reports |
MCP_DISABLED_TOOLS | — | Hide specific tools |
API_TIMEOUT_MS / API_MAX_RETRIES | 30000 / 3 | Network behaviour |
PORT / MCP_HTTP_* | — | HTTP mode (see below) |
7. HTTP / Docker / hosted mode
node dist/index.js --http --port 3000 # http://127.0.0.1:3000/mcp, health at /healthdocker build -t payment-reconciliation-mcp . && docker run -p 3000:8080 --env-file .env payment-reconciliation-mcp
Multi-tenant: each request can carry its own keys in X-MCP-Stripe-Secret-Key, X-MCP-Razorpay-Key-Id, X-MCP-Razorpay-Key-Secret, X-MCP-Paypal-Client-Id, X-MCP-Paypal-Client-Secret and X-MCP-Paypal-Environment. When any of these headers is present, only those keys are used, and the server's own environment keys are never mixed in. Sessions are bound to a hash of the keys. Set MCP_HTTP_AUTH_TOKEN when exposing the server yourself.
8. Security
- Read-only: the code only performs
GETrequests, plus the PayPal OAuth token request. - Use restricted read-only Stripe keys. Razorpay keys are full-access by design, so store them only in your MCP client's secret storage.
- Keys are never logged or included in tool output, and error messages are redacted (
sk_live_***). - No database and no telemetry: data flows only between your machine (or your MCPize session) and the gateways.
9. Accuracy notes
- Net = gross collected − refunds issued in the period − processing fees (cash basis). Razorpay fees include GST.
- Amounts are reported per currency. Different currencies are never added together.
- PayPal's Transaction Search covers completed, pending, denied and reversed transactions (no abandoned checkouts) and can lag up to ~3 hours. PayPal doesn't link bank withdrawals to individual transactions.
- Razorpay doesn't expose the gateway balance via its API.
10. Development
$npm install && npm test # 52 tests, fully mocked, no network needed
src/gateways/* holds one adapter per gateway behind a common interface. Adding Cashfree, PayU, Paddle or Square means writing one new file.
Support
Contact the author through the marketplace where you bought the product. Include the output of node dist/index.js --check, which never prints keys.
