paygate-usdt
Supports creating USDT/USDC invoices and verifying on-chain transfer events on Ethereum to confirm payments to merchant wallets.
Supports creating USDT/USDC invoices and verifying on-chain transfer events on Polygon to confirm payments to merchant wallets.
Supports creating USDT/USDC invoices and verifying on-chain SPL transfer events on Solana to confirm payments to merchant wallets.
Automates paid Telegram VIP group access via a bot that issues single-use invite links and removes or kicks members when access expires.
This server has a remotely hosted endpoint. Open its connector listing for connection details, authentication requirements, and setup instructions:
PayGate USDT v2.6 — Non-Custodial Stablecoin Payment Gateway, Python & TypeScript/Node.js SDKs, @mcp_tool_paywall & 8-Tool MCP Server
Monetize any Python or TypeScript/Node.js MCP Server (@mcp_tool_paywall / withMcpToolPaywall), FastAPI / Express Route (@require_usdt_payment / paygateExpressMiddleware), SaaS Subscription, or Telegram VIP Group in USDT & USDC across 6 blockchains straight to your own self-custody wallet.
No custodial processor holds your funds. No Stripe / Whop / bank account requirements. No platform percentage cut. Includes 1-Click Multi-Chain Switcher (Base, Polygon, Arbitrum, BSC, Ethereum, Solana), Zero-Tx-Hash On-Chain Payment Auto-Detection, and a Self-Serve Merchant Revenue Dashboard (/paygate/merchant).
Live Cloud Sandbox & Demo: https://chainguard-studio-production.up.railway.app/paygate
Self-Serve Merchant Revenue Dashboard: https://chainguard-studio-production.up.railway.app/paygate/merchant
Live Telegram VIP Bot Demo: @ChainGuardVaultBot (
?start=vip)Live Dedicated MCP Server Endpoint:
POST https://chainguard-studio-production.up.railway.app/paygate/mcp(create_usdt_invoice,get_usdt_invoice,list_usdt_invoices,verify_usdt_invoice,expire_usdt_invoice,check_usdt_subscription,verify_onchain_transfer,build_x402_paywall_challenge)Sister 15-Tool Web3 Security & CI Gate (
EzequielLech/chainguard-mcp): https://github.com/EzequielLech/chainguard-mcp
Why Builders Choose PayGate USDT Over Custodial Processors
Feature | PayGate USDT v2.6 | Custodial Gateways / Whop / InviteMember |
Settlement Destination | 100% direct buyer -> your wallet (Phantom, MetaMask, Ledger, Safe, Exchange) | Held by intermediary; payout delays / freezes |
Transaction Fees | $0% cut on settlements (self-hosted MIT) | 1%–10% + withdrawal minimums |
SDK Runtimes | Python + Zero-Dependency TypeScript/Node.js ( | Often single-language or heavy SDKs |
Networks Supported | Polygon, BSC (BEP-20), Base, Arbitrum, Ethereum, Solana SPL | Limited or custodian-locked |
Hosted Invoice Pages + Webhooks | Included ( | Often requires merchant KYB/KYC |
Non-Custodial SaaS Subscriptions | Included ( | Requires cards or infinite token approvals |
HTTP 402 ( | Included (FastAPI | Rare / separate SDK |
Telegram Paid VIP Automation | Included (60-second bot onboarding, 1-time invite links, auto-kick on expiry) | High % revenue share |
MCP Server for AI Agents | Included (Streamable HTTP | Not supported |
Security & Reproducibility | 100% auditable Python & ESM Node.js, full | Black-box binaries / closed SaaS |
Related MCP server: Yolfi MCP Server
Architecture Overview
Merchant / SaaS / AI Agent
│
├── 1. Invoice API or MCP (`create_usdt_invoice`)
│ └─> Hosted Checkout URL (/paygate/checkout/{inv_id})
│
├── 2. FastAPI `@require_usdt_payment` Route Guard
│ └─> Returns HTTP 402 + `PAYMENT-REQUIRED` (x402 v2 JSON)
│
└── 3. Multi-Tenant Telegram VIP Bot (`/vip` / `/start`)
│
▼
Buyer transfers USDT / USDC directly to Merchant Wallet
(Polygon · BSC BEP20 · Base · Arbitrum · Ethereum · Solana)
│
▼
PayGate On-Chain RPC Verifier (live JSON-RPC + SQLite anti-replay)
│
├── Signed `invoice.paid` Webhook (`X-PayGate-Signature: sha256=...`)
├── Single-use Telegram Invite Link (`member_limit=1`) + Expiry Kick
└── HTTP 200 API Response Unlocked30-Second Quickstarts
0. Monetize Any Python MCP Tool in 1 Line (@mcp_tool_paywall)
Wrap any FastMCP / mcp SDK tool or Python function with @mcp_tool_paywall. Callers get free_calls free invocations (with live paygate_billing telemetry), and automatically unlock unlimited access when they pay your non-custodial USDT/USDC invoice or recurring subscription:
from paygate_sdk import mcp_tool_paywall
@mcp_tool_paywall(
price_usd=9.0,
merchant_wallet="0xYourEvmOrSolanaWalletAddress",
network="base", # base | polygon | arbitrum | bsc | ethereum | solana
free_calls=3, # free trial invocations per customer_ref
billing_days=30, # recurring 30-day subscription entitlement
title="Pro AI Agent MCP Pass",
)
def analyze_market_alpha(symbol: str, customer_ref: str = "", paygate_invoice_id: str = "") -> dict:
return {"symbol": symbol, "verdict": "STRONG_BUY"}0b. TypeScript / Node.js Quickstart (sdk-js/, Zero npm Dependencies)
Monetize any TypeScript @modelcontextprotocol/sdk MCP tool or Express / Next.js API route in 1 wrapper with native Node.js 18+ fetch and node:crypto:
import {
withMcpToolPaywall,
paygateExpressMiddleware,
verifyWebhookSignature,
} from "./sdk-js/index.mjs";
// 1. Wrap any TypeScript MCP tool with 3 free calls + $9/30d non-custodial unlock
export const proSignalTool = withMcpToolPaywall(
{
priceUsd: 9.0,
merchantWallet: "0xYourEvmOrSolanaWalletAddress",
network: "base",
freeCalls: 3,
billingDays: 30,
title: "Pro MCP Tool Pass",
},
async ({ symbol }) => ({ symbol, verdict: "STRONG_BUY" })
);
// 2. Protect any Express / Connect HTTP route with x402 v2 + X-PayGate-Invoice
app.get(
"/api/pro-signal",
paygateExpressMiddleware({
priceUsd: 5.0,
merchantWallet: "0xYourEvmWalletAddress",
network: "base",
description: "Institutional Trading Signal",
}),
(req, res) => res.json({ ok: true, signal: "ETH/USDC", paygate: req.paygate })
);1. Protect any FastAPI Endpoint with HTTP 402 (x402 v2 Direct USDT/USDC)
from fastapi import FastAPI, Request
from paygate_sdk import require_usdt_payment
app = FastAPI()
@app.get("/api/pro-signal")
@require_usdt_payment(
price_usd=5.0,
recipient_wallet="0xYourEvmWalletAddress",
networks=("base", "polygon", "arbitrum", "bsc"),
)
async def pro_signal(request: Request):
return {"signal": "ETH/USDC breakout verified"}Unpaid callers receive 402 Payment Required with an x402 v2 PAYMENT-REQUIRED header. Callers pass X-Payment-Network + X-Payment-Tx and PayGate verifies the stablecoin Transfer event on-chain with built-in anti-replay protection.
2. Create Hosted Checkout Links & Verify HMAC-SHA256 Webhooks
from paygate_sdk import PayGateClient, verify_webhook_signature
client = PayGateClient("https://chainguard-studio-production.up.railway.app")
res = client.create_invoice(
title="SaaS Pro Seat (30 Days)",
amount_usd=29.0,
network="polygon", # polygon | bsc | base | arbitrum | ethereum | solana
merchant_wallet="0xYourEvmWalletAddress",
webhook_url="https://yourapp.com/webhooks/paygate",
webhook_secret="whsec_your_signing_secret",
)
print("Send buyer to:", res["checkout_url"])
# Inside your webhook receiver:
is_authentic = verify_webhook_signature(raw_body_bytes, request.headers["X-PayGate-Signature"], "whsec_your_signing_secret")3. Verify On-Chain Transfers Standalone (OnChainPaymentVerifier)
from app.onchain_verifier import OnChainPaymentVerifier
verifier = OnChainPaymentVerifier()
result = verifier.verify(
network="bsc",
tx_hash="0x...",
min_amount_usd=199.0,
expected_recipient="0xYourBep20WalletAddress",
)
print(result.verified, result.amount_usd, result.token)4. CLI & Local Stdio MCP Server (Claude Desktop / Cursor / OpenCode)
Run an instant hosted checkout link directly from your terminal:
pip install -e .
paygate-usdt invoice --title "VIP Access" --amount 49 --network polygon --wallet 0xYourWallet
paygate-usdt verify-tx --network bsc --tx 0x... --amount 199 --wallet 0xYourWalletOr connect PayGate USDT as a local Stdio MCP server (mcpServers config):
{
"mcpServers": {
"paygate-usdt": {
"command": "python",
"args": ["-m", "paygate_sdk", "mcp"]
}
}
}5. Runnable Examples, 1-Line Embed Widget & Docker
Add a non-custodial USDT/USDC pay button to any static site, GitHub README, or Markdown page in 1 URL or 1 <script> tag:
<a data-paygate-merchant="0xYourWallet" data-paygate-amount="29" data-paygate-network="polygon" data-paygate-title="Pro Access">
Pay $29 USDT
</a>
<script src="https://chainguard-studio-production.up.railway.app/paygate/widget.js"></script>Or generate a stateless 1-click checkout URL directly in Python:
from paygate_sdk import PayGateClient
url = PayGateClient().build_payment_url(
merchant_wallet="0xYourWallet",
amount_usd=29.0,
network="polygon",
title="Pro Plan (30d)",
)6. Non-Custodial Recurring SaaS Subscriptions (No Infinite Approvals)
Accept recurring 30-day SaaS/API memberships directly in USDT/USDC without requesting MAX_UINT256 token allowances. Renewals paid early automatically stack remaining days:
from paygate_sdk import PayGateClient
client = PayGateClient("https://chainguard-studio-production.up.railway.app")
# 1. Check active entitlement & get a 1-Click pre-filled renewal link
sub = client.check_subscription(
merchant_wallet="0xYourEvmWalletAddress",
customer_ref="user_42",
amount_usd=19.0,
network="base",
billing_days=30,
)
if not sub["active"]:
print("Renew here:", sub["renewal_url"])examples/fastapi_x402_demo.py— FastAPI paywall route protected by@require_usdt_paymentexamples/webhook_receiver_demo.py— FastAPI receiver verifyingX-PayGate-Signature(HMAC-SHA256)
docker compose up --buildRun Tests Locally
git clone https://github.com/EzequielLech/paygate-usdt.git
cd paygate-usdt
pip install -r requirements.txt
pytest -v
node --test sdk-js/test.mjsZero external API keys or private wallet keys are required to run the test suite.
Hosted Cloud, 1-Click Passes & Done-For-You B2B Deployment
Want this running for your business without touching servers, RPC failovers, or webhook glue? Click any instant non-custodial checkout badge below (supports 1-Click MetaMask / Rabby / Phantom Browser Pay + automatic SHA-256 Receipt):
Option | Price | Instant 1-Click Checkout / Action |
Open-Source Self-Hosted ( | $0 | Clone this repo, run with FastAPI/uvicorn + |
24-Hour Impulse Micro-Unlock Pass (50 Calls) | $0.50 USDC/USDT | |
7-Day Starter MCP & Pro API Pass (250 Calls) | $2 USDC/USDT | |
30-Day Unlimited MCP & Pro API Pass | $9 USDC/USDT | |
Managed Cloud VIP Bot | $29 USDT/mo (7-day free trial) | |
Lifetime White-Label Bot License | $79 USDT one-time | |
Turnkey B2B VIP Gate Deployment (24h) | $199 USDT ( | |
Custom Crypto Bot + API / Exchange Automation | $499 USDT ( |
Book Directly with On-Chain Checkout: https://chainguard-studio-production.up.railway.app/paygate#b2b
Self-Serve Merchant Dashboard: https://chainguard-studio-production.up.railway.app/paygate/merchant
Submit a Custom Scope via GitHub Issues: Open a B2B Custom Integration Request
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Crypto pay links and API for people and AI agents. BTC, Lightning, USDC, USDT, EURC, SOL, ETH.
Crypto payments for AI agents: self-serve account, invoices, receiving, payouts, exchange.
Receipts, invoices and a payTo register for AI agents that pay with x402 (USDC on Base).
USDC wallets, payment links and x402 payments on Solana for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceAccept crypto payments from AI agents: create an invoice in one call and get a hosted checkout link (USDC/USDT on Celo, Base, Arbitrum, Polygon, BSC). No API key, instant self-custody settlement.MIT
- FlicenseNot gradedqualityAmaintenanceEnables AI coding agents to add stablecoin checkout, payment links, payment status checks, webhook verification, and webhook-based entitlement logic to applications. It also provides tools for workspace registration, settlement and webhook configuration, paylink creation, and crypto payment status checks.-
- FlicenseNot gradedqualityAmaintenanceEnables AI coding agents to integrate stablecoin crypto checkout into applications by registering workspaces, configuring settlement wallets and webhooks, creating payment links and invoices, and verifying payment status and webhook signatures. It exposes these payment operations as tools over stdio so agents can complete end-to-end payment setup without manual dashboard work.-
- AlicenseNot gradedqualityAmaintenanceEnables AI coding agents to add stablecoin checkout, payment links, payment status checks, webhook verification, and webhook-based access logic to applications. It provides tools for registering workspaces, configuring settlement wallets and webhooks, creating paylinks, and verifying crypto payment status.MIT