@profullstack/payagent

中文文档
0.8.0发布于 2026/11/02MITES Module

pay.agent: get paid in crypto with one link, Venmo for the agentic web. Sign in with CoinPay; pay anyone by handle from the web, API, CLI, TUI or MCP.

原始使用文档

pay.agent

Get paid in crypto with one link. Venmo for the agentic web, on CoinPay.

Sign in with CoinPay, pick a name, and share pay.agent/you. People and agents pay you in USDC, BTC, ETH, SOL and more; it lands in your CoinPay wallet or your CoinPay business. pay.agent never holds funds.

  • Web: https://pay.agent (Moshpit DNS) or https://pay.agent.pit.world
  • API: POST /api/v1/users/:handle/payments {"amount_usd": 5, "payer_email": "[email protected]"} → checkout_url, a CoinPay hosted checkout on the payee's own business: the payer picks any coin the payee takes, or PayPal when they connected it
  • Invoices: POST /api/v1/invoices {"to_email", "description", "amount_usd", "recurrence": "monthly"} (your key) → a real CoinPay invoice sent as you; CoinPay emails the pay link and sends the repeats. payagent invoice [email protected] 49 Logo, MCP send_invoice. Each one has a public page at pay.agent/i/<id>.
  • Webhooks: pay.agent POSTs payment.created, payment.paid, payment.expired, payment.failed, invoice.created, invoice.paid, invoice.overdue and invoice.cancelled for your link to your URL, as CloudEvents signed per Standard Webhooks (via @profullstack/webhooks), retried for about three days. Add one on /me#webhooks, POST /api/v1/webhooks {"url", "events": ["payment.*"]} (your key), payagent webhook add <url>, or MCP create_webhook. Signing secrets are sealed with PAYAGENT_KEY.
  • CLI / TUI: bunx @profullstack/payagent alice 5 [email protected], or bunx @profullstack/payagent
  • MCP: claude mcp add payagent -- bunx @profullstack/payagent mcp
  • Agents, no browser: COINPAY_EMAIL=… COINPAY_PASSWORD=… bunx @profullstack/payagent claim mybot (or COINPAY_TOKEN, or MCP claim) signs in to CoinPay as you, approves pay.agent with that session, claims pay.agent/mybot and prints a pa_ key. Run it again any time for a new key. By hand: POST /api/v1/claim/start → the PKCE-bound authorize request; POST <consent.endpoint> with authorization: Bearer <CoinPay session> and consent.body → { redirect }; POST /api/v1/claim {"redirect", "handle"} → your link and api_key. Your CoinPay credentials only ever go to CoinPay.
  • Coins and cards (0.7.0): a new link also takes USDC on Base, Polygon and Solana at an address the owner already has on that chain (added as wallets of the pay.agent/<handle> business only; "stablecoins": false on claim, or untick it in the wizard, to skip). The owner picks what the link takes on /me#takes, PUT /api/v1/me/coins {"coins": ["usdc_base", "sol", "paypal"] | "all"}, {"add_stablecoins": true}, payagent coins set|add-usdc|recheck, or MCP my_coins; checkouts pass the pick as allowed_methods. Cards go through PayPal guest checkout once the owner connects their own PayPal REST app to that CoinPay business (/help#cards); card in the API turns true at the first checkout that offers it. No Stripe.

Onboarding is @profullstack/coinpay-onboard: one pass makes the CoinPay business, payout wallets and webhook. The same engine runs at every fleet site launch.

Run it

bun install
PAYAGENT_KEY=$(openssl rand -hex 32) PAYAGENT_COINPAY_CLIENT_ID=cp_… bun src/server.ts

Settings: PAYAGENT_KEY (seals webhook secrets and sign-in state; it can NOT open anyone's CoinPay tokens: those are sealed under a per-sign-in key kept in memory only, so a restart with no handoff pauses every link until its owner signs in again, and /me + GET /api/v1/me show locked), PAYAGENT_HANDOFF (off disables the deploy handoff socket; PAYAGENT_HANDOFF_SOCKET moves it from ~/.payagent-vault/handoff.sock), LEGACY_KEY_MIGRATION (off stops migrating pre-0.6 token copies; sqlite3 pay-agent.db 'select count(*) from users where tokens is not null' counts what is left), PAYAGENT_COINPAY_CLIENT_ID / _SECRET (a CoinPay OAuth client with scopes openid profile email wallet:read merchant), PAYAGENT_DB (SQLite path), PORT (8796), COINPAY_BASE, PAYAGENT_WEBHOOK_ORIGIN.

Deploy: bin/install.sh (OpenInstall) on the box, vault profullstack/pay-agent--prod. Since 0.8.0 a deploy no longer pauses every pay link: bin/install.sh exports the running process's in-memory unlocks over a private Unix socket (scripts/vault-handoff.sh, keys in a shell variable only, never on disk) just before the restart and imports them once /health answers, keeping each original expiry (under a minute left is dropped). It logs Vault unlocks handed to the new process or a WARNING.

MIT

版本与发布记录

@profullstack/payagent 共发布 10 个版本,首次发布于 2026/10/18;过去 12 个月发布了 10 个版本。

版本发布日期距今
0.8.0latest2026/11/021 天前
0.7.22026/10/295 天前
0.7.12026/10/295 天前
0.7.02026/10/295 天前
0.5.02026/10/285 天前
0.4.02026/10/285 天前

关于 @profullstack/payagent 的常见问题

@profullstack/payagent 是什么?

工资。代理:通过一个链接获得加密支付,Venmo为代理网络。使用CoinPay登录;支付任何人的处理从web, API, CLI, TUI或MCP。

如何安装 @profullstack/payagent?

在项目目录运行 npm install @profullstack/payagent,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 payagent,可以用 npx payagent 直接运行。

@profullstack/payagent 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/profullstack__payagent 是否存在。

@profullstack/payagent 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@profullstack/payagent 可以商用吗?

@profullstack/payagent 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@profullstack/payagent 还在维护吗?

最新版本 0.8.0 发布于 2026/11/02(1 天前);至今共发布 10 个版本,其中过去 12 个月发布了 10 个;首次发布于 2026/10/18。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。