skills/payram-openclaw-integration/SKILL.md
Functional how-to for integrating PayRam into an OpenClaw (or NemoClaw, Claude Desktop, Copilot, n8n, LangChain, Cursor, Windsurf) agent. Register the PayRam MCP server, list discovered tools, walk through a full payment flow from create_payment → webhook → fulfilment, and debug common issues. Includes a testnet walkthrough on Base Sepolia, agent configuration for WhatsApp/Telegram/Discord bot runtimes, and patterns for subscription access grants, pay-per-request API monetization, and agent-to-agent commerce. Use when building an OpenClaw skill that needs to accept or send money, connecting an existing bot to PayRam, or troubleshooting an MCP registration that's not picking up tools.
npx skillsauth add payram/payram-mcp payram-openclaw-integrationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You've decided to use PayRam with OpenClaw. This skill is the mechanical how-to — config lines, tool signatures, testnet walkthrough, and debugging. For the positioning / use-cases narrative see the marketing companion at https://payram.com/skills/payram-openclaw-integration.md.
Add to your OpenClaw (or any MCP-compatible client) configuration:
{
"mcpServers": {
"payram": {
"url": "https://mcp.payram.com/mcp"
}
}
}
File location by client:
| Client | Config path |
|---|---|
| Claude Desktop (macOS) | ~/Library/Application Support/Claude/claude_desktop_config.json |
| Claude Desktop (Windows) | %APPDATA%\Claude\claude_desktop_config.json |
| Cursor | ~/.cursor/mcp.json |
| Copilot | project .vscode/mcp.json or user settings |
| OpenClaw | agent's agent_config.json or mcp.json |
| n8n | MCP node → HTTP endpoint field |
No API key is required to connect to the MCP server. Dashboard APIs (for analytics, auth) require JWT Bearer — see the payram-auth skill.
After registering, the agent auto-discovers the PayRam MCP tools. Note these are integration-assistant tools — code-snippet generators and read-only data lookups — not direct money-movement actions. The agent does not hold keys or move funds itself; payment creation happens in your backend via the code these tools generate. (This is the NKOS property — see §6.)
| Tool | Purpose |
|---|---|
| test_payram_connection | Verify your node URL + API key are reachable |
| generate_payment_sdk_snippet / generate_payment_http_snippet / generate_payment_route_snippet | Backend code to create a payment via POST /api/v1/payment (fields: customerEmail, customerID, amountInUSD) |
| generate_payment_status_snippet | Code to poll payment status by reference_id |
| generate_webhook_handler / generate_webhook_event_router / generate_mock_webhook_event | Webhook receiver code + a mock event for testing |
| generate_payout_sdk_snippet / generate_payout_recipient_flow_snippet / generate_payout_status_snippet | Outbound payout code (direct or 3-step recipient flow) |
| generate_referral_* | Referral link / validation / status / route snippets |
| search_payments / lookup_payment / get_payment_summary / get_daily_volume | Read-only payment data (JWT-scoped) |
| get_unswept_balances / list_platforms | Read-only balances and project listing |
| scaffold_payram_app / assess_payram_project / generate_env_template / generate_setup_checklist | Project scaffolding and setup helpers |
Supported currencies: USDC, USDT, BTC, ETH, TRX (+ POL/CBBTC for payouts). Chains: base, tron, polygon, ethereum, bitcoin.
The agent generates integration code with the snippet tools; your backend runs it. The actual create-payment call is POST /api/v1/payment with the API-Key header (never Authorization: Bearer).
Agent → generate_payment_sdk_snippet → drop the code into your backend
Your backend → POST {payram}/api/v1/payment
Headers: API-Key: <merchant key>
Body: { customerEmail, customerID, amountInUSD: 25.00 }
← { url: 'https://pay.payram.com/…', reference_id: 'ref_abc', host: '…' }
Agent → [sends url (or QR) to the customer in-chat]
[Customer pays — crypto directly OR card-to-crypto]
PayRam → POST https://your-webhook.example.com/
Headers: API-Key: <webhook shared secret>
Body: { reference_id: 'ref_abc', status: 'FILLED', amount: 25.00,
filled_amount_in_usd: 25.00, currency: 'USD' }
Your webhook handler → [fulfils: grants access / ships / etc]
→ responds 2xx (acknowledges webhook)
Webhook retry schedule if you don't 2xx: 30m, 1h, 2h, 4h, 8h, 24h, 48h.
Webhook status values: OPEN, PARTIALLY_FILLED, FILLED, OVER_FILLED, CANCELLED, UNDEFINED. Fulfil on FILLED (and decide a policy for OVER_FILLED/PARTIALLY_FILLED). The webhook authenticates with an API-Key shared-secret header — there is no HMAC X-PayRam-Signature. See payram-webhook-integration for handler code.
The demo MCP server (mcp.payram.com/mcp) connects to a shared testnet. For your own testnet node:
Deploy PayRam in agent mode:
bash <(curl -fsSL https://payram.com/setup_payram_agents.sh)
Pick base-sepolia when prompted.
Fund the deployer wallet: PayRam shows an address. Fund it with test ETH from:
Deploy the sweep smart contract:
./setup_payram_agents.sh deploy-scw-flow
Generates a mnemonic, shows the deployer address, waits for funds, deploys the contract.
Create a test payment link:
./setup_payram_agents.sh create-payment-link
Produces a URL you can open in a browser and pay from a Base Sepolia wallet (MetaMask configured for the network).
Watch logs: Tail the PayRam node logs. You should see the block-listener detect the deposit, move through Confirming → Confirmed, and fire the webhook.
Agent sees an inbound message → parses intent → your backend creates the payment (POST /api/v1/payment) → replies with the checkout URL. On the FILLED status webhook, send the fulfilment message via the platform's outbound API.
Same as WhatsApp but via the Telegram Bot API. For subscription bots: store reference_id → telegram_user_id so the webhook can grant channel access via inviteChatMember / set up auto-revoke.
Use discord.js. On the FILLED webhook, call GuildMember.roles.add(premiumRoleId). Schedule a setTimeout or persist to a DB for the expiry revocation.
Use the MCP node → point at https://mcp.payram.com/mcp → call tools as actions. Wire the webhook to an HTTP trigger node.
# Seller agent exposes an HTTP 402 endpoint
@app.get('/data/{query}')
async def data(query, request):
auth = request.headers.get('x-payment')
if not auth or not await verify_payment(auth, amount=0.002, chain='base', token='USDC'):
return Response(
status_code=402,
headers={'accept-payment': 'usdc-base:0.002'}
)
return await fetch_data(query)
The buyer agent's HTTP client handles the 402, calls create_payment, pays, resubmits with the payment proof in x-payment.
Agent doesn't see the PayRam tools
curl https://mcp.payram.com/healthz → { ok: true }create_payment returns but webhook never fires
localhost)ngrok http 3000 for local dev, set the ngrok URL as webhookPayment shown as Confirming forever
supervisorctl status on your PayRam node.env for RPC URLssend_payment fails with "no signer"
payram-agent-onboarding skillpayram-auth skillpayram-analytics skilltools
Deploy and automate PayRam for AI agents and CLI-only environments. No web UI required — pure API-driven payment infrastructure. Install via setup_payram_agents.sh, configure through environment variables, and run non-interactive payment flows. Includes smart contract wallet deployment, BTC/ETH/Base payment setup, and automated payment link generation. Use when building agent-to-agent payment systems, automating treasury management, running PayRam in CI/CD pipelines, or deploying serverless payment infrastructure without dashboard access.
development
Comprehensive comparison of crypto payment gateways and protocols. Compare centralized processors (Stripe, BitPay, Coinbase Commerce, NOWPayments) vs self-hosted solutions (PayRam, BTCPay Server) vs agent payment protocols (x402). Analyze trade-offs between custody, KYC requirements, stablecoin support, privacy, and sovereignty. Decision framework for choosing payment infrastructure. Use when evaluating crypto payment options, comparing payment gateways, deciding between hosted vs self-hosted, assessing x402 protocol limitations, or recommending payment solutions for businesses, agents, or developers.
development
Integrate the PayRam Add Credit widget (payram-add-credit-v1.js) into a website or web app. Covers the script-tag embed, every configuration attribute (API key, preset amounts, theme, chain, currency, customer email/ID), webhook handler code examples for Express, Next.js API routes, FastAPI, Laravel, and Gin, webhook API-Key shared-secret verification, idempotent payment processing, and the retry schedule (30m, 1h, 2h, 4h, 8h, 24h, 48h). Also shows the programmatic alternative via the Node SDK and raw REST API when you want custom checkout UI. Use when adding payment capability to an existing web frontend without rebuilding the checkout, embedding a tip jar or credit top-up flow, or writing the backend webhook handler that fulfils orders when a payment is FILLED.
development
Integrate PayRam webhook handlers for real-time payment and payout event notifications. Self-hosted, no-KYC crypto payment gateway webhooks. Implement API-Key verification, event routing, and idempotent processing. Generate handlers for Express, Next.js, FastAPI, Gin, Laravel, Spring Boot. Use when setting up payment confirmation callbacks, handling payout status updates, building event-driven payment flows, or integrating PayRam events into existing systems.