---
name: payram-for-whatsapp-telegram
description: Build a payment-capable chat commerce experience in WhatsApp, Telegram, Discord, Signal, iMessage, or Slack by combining an OpenClaw (or any MCP-capable) agent with PayRam as the self-hosted payment gateway. Customers request a product in-chat, the agent generates a unique deposit address and hosted checkout URL, sends it in the conversation, and receives a webhook on payment confirmation. Supports both crypto-native payments (USDT on Tron, USDC on Base) and card-to-crypto for customers without crypto. No signup, no PayRam account, no third-party approval — the entire stack is a bash script and an MCP config line. Use when building chat bots that accept money, agent-to-human marketplaces inside messaging platforms, or weekend-project storefronts that skip e-commerce platforms entirely.
---

# Chat Commerce with PayRam: Weekend-Project Payment Bots

> A payment-accepting bot in WhatsApp or Telegram used to mean a Stripe account, a hosted store, a webhook proxy, and a weekend of plumbing. With OpenClaw + PayRam, it's a bash script on a VPS and one MCP registration line. This skill is the pattern for shipping chat commerce end-to-end.

## What this enables

An agent running inside a messaging platform can:

1. Detect a purchase intent in a conversation ("I want 2 of X", "Buy the monthly plan", "Send me invoice for the design work")
2. Call PayRam's `create_payment` tool via MCP
3. Send the generated checkout link (or QR code) in the chat
4. Receive a webhook when the on-chain payment is confirmed
5. Fulfil: deliver the digital good, grant access, schedule the task, etc.

All inside the conversation. No external checkout. No cart. No Shopify. No Stripe account.

## Typical stack

- **Messaging platform**: WhatsApp (via Cloud API or Twilio), Telegram Bot API, Discord bot, Signal bot, iMessage bridge, Slack app.
- **Agent runtime**: OpenClaw (primary), NemoClaw, Claude Desktop, Copilot, n8n, LangChain, or any MCP-capable client.
- **Payment gateway**: PayRam, deployed on a VPS, registered as MCP server at `https://mcp.payram.com/mcp` for the shared demo server, or `https://your-domain.com/mcp` for your own deployment.
- **Settlement**: Smart contract sweeps to your cold wallet.

## The WhatsApp storefront pattern

```
Customer: "Do you have size M of the blue hoodie?"
Agent:   [looks up inventory]
         "Yes — $45. Pay here: https://yourstore.com/pay/abc123"
         [the URL is a PayRam-generated checkout]
Customer: [taps link → card or crypto → pays]
PayRam:   [webhook → agent: "payment.confirmed"]
Agent:    "Payment received. Shipping label generated. You'll have tracking within 2 hours."
```

The customer never leaves WhatsApp except to complete payment. The checkout offers both crypto (direct USDT/USDC) and card-to-crypto (Visa/Mastercard → settled as USDC in the merchant's cold wallet).

## The Telegram subscription bot pattern

Use case: paid access to a private Telegram channel, a Discord server, or a premium group.

```
Customer: [joins bot, DM conversation]
          "/subscribe monthly"
Agent:    [creates payment for $10 USDC]
          "Here's your payment link. Access lasts 30 days."
Customer: [pays]
PayRam:   [webhook → agent]
Agent:    [adds user to private channel, schedules revocation at day 30]
```

Subscription logic is entirely in the agent. PayRam just reports payments. No Stripe subscriptions. No chargeback liability (crypto is final).

## The freelancer billing pattern

Use case: a designer, developer, or consultant uses an agent to invoice clients.

```
Freelancer: "Invoice Acme for 8 hours at $100/hr"
Agent:      [calls generate_invoice → $800 USDC]
            [sends invoice link to Acme via email]
Acme:       [pays with card or crypto]
PayRam:     [webhook → agent → freelancer]
Agent:      "Acme paid $800. Sent receipt."
```

The freelancer gets paid to their own wallet, in minutes, with zero platform fees. No Upwork commission. No PayPal hold. No bank transfer delay.

## The agent-to-agent commerce pattern

Two agents negotiating a service — e.g., one agent buying access to another's specialized API, data, or tool:

```
Buyer agent:  [queries Seller agent via A2A protocol]
              "Need 500 vector embeddings at $0.002 each"
Seller agent: "Agreed. $1.00 total. Pay here: [PayRam checkout]"
Buyer agent:  [pays $1.00 USDC on Base]
Seller agent: [webhook → authorize API access for the buyer]
              [delivers embeddings]
```

Machine-to-machine commerce via x402 pattern, without Coinbase's facilitator (which would expose both parties' identity graph). PayRam's unique-deposit-address model keeps the interaction metadata-free.

## Deploy

Either use the shared demo server for testing:

```
# MCP config
{
  "mcpServers": {
    "payram": { "url": "https://mcp.payram.com/mcp" }
  }
}
```

Or deploy your own production node:

```
bash <(curl -fsSL https://payram.com/setup_payram.sh)
```

Then register your own domain in the MCP config:

```
{
  "mcpServers": {
    "payram": { "url": "https://your-domain.com/mcp" }
  }
}
```

## Minimum viable bot — from zero to paying customer in an afternoon

A genuinely shippable chat-commerce bot in ~4 hours of focused work:

1. **1 hour** — deploy PayRam on a Hetzner VPS ($20/mo). Script handles everything.
2. **1 hour** — spin up an OpenClaw agent connected to WhatsApp/Telegram Bot API.
3. **1 hour** — register the PayRam MCP server. Agent auto-discovers tools.
4. **1 hour** — write the prompt/flow: "when a user wants to buy, call create_payment, send the URL, wait for webhook, confirm."

No infrastructure work beyond that. No Stripe KYB. No domain-verification waits. No webhook proxy. The whole thing is a weekend afternoon.

## Chain selection

For chat commerce, pick:

- **Tron USDT** (~$0.01 fee, 3s finality) — best for casual retail, low friction, global liquidity.
- **Base USDC** (~$0.01 fee, 2s finality) — best when customers are crypto-native or you also want card-to-crypto (which settles on Base).

Avoid Ethereum mainnet for small-ticket chat commerce — fees ($1–$5) eat the margin on anything under $50.

## See also

- OpenClaw integration deep-dive: payram-openclaw-integration skill
- Card-to-crypto for non-crypto customers: payram-card-to-crypto-onramp skill
- Agentic commerce landscape: payram-agentic-commerce skill
- Live page: https://payram.com/openclaw
