微算力 · API 导航与自营网关
API 接入 EN
未登录登录
💳

AI驱动的智能支付服务网关

ItPay · v2.0.25
入口已确认,内容待校验 文件树里有 SKILL.md,但正文还没采回,frontmatter 未核对。
专业技能 安全 A 级 作者 itpay 公开目录收录
348 下载 0 安装 1.3k 收藏 2 浏览

简介

ItPay是基于OpenClaw的支付技能,支持服务发现、购买、结算、交付全流程,通过安全的CLI接口实现人机协作式支付体验。

原始描述

Use bundled ItPay services in OpenClaw

通过你的 Agent 添加

安装目录:itpay/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。

点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。

或者手动安装

Claude Code~/.claude/skills/itpay/
Codex CLI~/.codex/skills/itpay/
DeepSeek Harness~/.agents/skills/itpay/

包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可; 目录名不用换,也不要把包直接解压到 skills 根目录。 技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。

中文使用说明 来自收录源

核心用法

ItPay是一个专为Agent设计的支付服务技能,通过单一CLI入口itpay实现买家全流程操作。核心工作流包括:服务发现(catalog list浏览服务目录)、服务启动(services start发起服务执行)、人机结算(生成QR码和支付链接)、结果交付(services next获取授权结果)以及退款处理(refund get管理退款)。

技能采用严格的信封模式:每个JSON响应包含status(当前状态)、result(业务结果)、instruction(展示说明)、next.command(下一步命令)和recovery(恢复命令)。Agent必须遵循"执行单一next.command"原则,禁止自行构造ID或绕过状态机。

关键约束包括:Node.js 18+运行时、固定openclawAgent类型、本地Ed25519私钥身份管理、显式--host/--target参数传递,以及15分钟有效期的结果授权机制。测试环境需显式设置ITPAY_BACKEND_URL=https://dev.itpay.ai,生产环境默认指向https://app.itpay.ai。

显著优点

安全架构严谨:采用Ed25519本地签名、分注册隔离、设备会话自动续期等机制,私钥永不暴露;明确的权限边界(Agent Type/Host/Grant层级)防止身份绕圈和配额滥用。

状态机清晰:严格的信封协议确保Agent不会陷入无限重试或状态混乱,next.command驱动的方式天然支持断点续传和人机协作。

多平台适配:原生支持Telegram、Discord、WhatsApp、Feishu/Lark等主流IM平台,通过--host/--target抽象实现一致的跨平台体验。

防幻觉设计:大量CRITICAL规则约束(禁止构造ID、禁止猜测结果、禁止绕过配额)从协议层面减少Agent自主发挥导致的错误。

合规透明:价格必须前置展示、支付必须人工确认、授权必须显式回调,符合支付场景的合规要求。

潜在缺点与局限性

卖家端未实现:当前仅支持买家流程,卖家工作流(上架、库存、结算等)处于占位状态,完整双向市场功能缺失。

学习曲线陡峭:严格的CLI协议和信封规则对开发者要求较高,误用--target、混淆--host与业务输入、错误处理next.command均会导致流程中断。

依赖Node生态:强制Node.js 18+运行时,且要求openclaw环境支持,对纯Python或其他运行时Agent不够友好。

人机协作瓶颈:支付环节必须人工扫码/点击链接,无法实现纯Agent自动化闭环,适合"助手辅助人"而非"无人值守"场景。

错误终止偏保守:provider_connection_unavailable、provider_input_rejected等错误直接终止执行而非自动重试,虽安全但可能增加人工介入成本。

适合的目标群体

  • AI Agent开发者:需要为聊天机器人集成支付能力的Bot开发者
  • OpenClaw生态用户:已在OpenClaw/ClawHub平台部署Agent的团队
  • 跨境电商/服务出海:需要支持多IM平台(Telegram/WhatsApp等)支付场景的运营方
  • 合规敏感型业务:对支付授权、价格透明、退款锁定有严格要求的金融科技场景

使用风险

运行时风险:Node.js版本不兼容、技能更新后未执行openclaw skills update导致backend_contract_incompatible错误。

身份安全风险:本地私钥文件权限配置不当可能导致身份泄露;误操作device recover --confirm-backend-reset会丢失其他后端注册。

网络/提供商风险:上游服务商(如美团等)连接中断时执行直接终止,无自动降级;服务提供商API变更可能导致provider_contract_mismatch。

配额与滥用风险:尽管有状态机约束,开发者若错误实现"循环重试"或"多窗口轮换Agent Type"仍可能触发风控。

依赖维护风险:技能托管于GitHub,需关注MIT-0许可证下的长期维护承诺;ClawHub零费用承诺不改变ItPay服务本身的外部成本。

技能正文


name: itpay description: > Use the single ItPay entry point when a human asks an Agent to buy or sell through ItPay. Buyer workflows cover service discovery, purchase, Checkout, delivery, recovery, and refunds. Seller workflows are not yet implemented. license: MIT-0 metadata: openclaw: requires: bins: - node homepage: https://github.com/itpay-ai/itpay-skill-openclaw

ItPay

Use the CLI as the only ItPay control surface. Never recreate API calls or hardcode a service-specific sequence.

OpenClaw Runtime

  • Run node <skill-root>/scripts/itpay.mjs. Treat every leading itpay in this Skill or a returned next.command as that locked launcher.
  • The launcher fixes openclaw as the Agent Type for the entire flow. Never pass another type or switch identity to recover quota.
  • Node.js 18+ is the only host runtime requirement. The bundled CLI must not install packages or download code at runtime.
  • Skill changes require openclaw skills update itpay, then a new session.
  • ClawHub does not charge for Skills. ItPay service prices are external costs and must be shown before Checkout.

One Entry Point, Two Action Domains

  • itpay is the only CLI entry point, and $itpay is the only user-facing Skill invocation. Never create or route users to a separate Buyer or Seller entry point.
  • buy and sell are the two top-level ItPay action domains.
  • Buyer workflows are available now. Seller workflows will use this same itpay entry point, but are not implemented in the current release.
  • Do not invent Seller commands, onboarding, listings, or successful Seller state before that workflow ships.

Critical Rules

  • The CLI defaults to production https://app.itpay.ai. Only an explicit test may use the exact prefix ITPAY_BACKEND_URL=https://dev.itpay.ai; never use another Backend. While testing dev, execute every returned command unchanged so that prefix is preserved.
  • Keep one honest Agent Type, one CLI/Node launcher, and one Host-approved permission context for the whole flow. This package uses openclaw.
  • Windows, tasks, chats, processes, and model sessions are not new Agents. Never rotate Agent Type or identity to reset quota.
  • Treat next.command as the preferred continuation, not an unconditional command. If the current result already satisfies the user's stated goal, present it and stop.
  • Keep internal parsing, retries, sandbox diagnosis, and command translation out of the user response; report useful progress, results, and real human decisions only.
  • If Device state is not writable, stop. Do not switch Node, manually create lock files, delete identity, or rotate Agent Type.

Bootstrap

node <skill-root>/scripts/itpay.mjs readyz --json
node <skill-root>/scripts/itpay.mjs skill show itpay --json
node <skill-root>/scripts/itpay.mjs install openclaw --json

After readyz, read this complete Skill again, then continue to Catalog. Translate a returned command only by replacing its leading itpay with the locked launcher; preserve every argument.

If backend_contract_incompatible returns result.required_cli_version, stop every ItPay business command. Run only openclaw skills update itpay, start a new session, confirm the launcher reports the required version, then restart with readyz. Never run npm, change Agent Type, or replace Device identity.

Identity And Sessions

  • One local Ed25519 private key represents this ItPay installation. Never expose, copy, or rotate it to recover quota.
  • The CLI uses one local signing key with separate official Backend registrations. Each registration has one Agent Instance per agent_type; different windows and chats of the same type reuse it.
  • Every commerce command must keep the explicit --agent-type returned in next and recovery, or use one stable ITPAY_AGENT_TYPE. Never fall back to another type previously used on the machine.
  • The CLI renews an expired or rejected device session and retries the same request exactly once. If that retry still fails, stop and report it; do not loop, create a new identity, or switch Agent Type.
  • A revoked v2 device is not replaced automatically. It requires an explicit operator recovery path.
  • If an operator confirms that the current official Backend registration database was reset, use the complete returned device recover --confirm-backend-reset command. This preserves the private key and other Backend registration; never use it for ordinary session expiry or revocation.
  • --host selects presentation. --target is only the destination chat/channel/open ID required by some Hosts. Neither is business input or identity.

Current Entry

OpenClaw has no default Host. Before every command that accepts --host, derive the current entry from trusted OpenClaw conversation context and pass it explicitly:

  • Telegram: --host telegram --target <chat_id>. For forum topics use <chat_id>:topic:<topic_id>. These are native OpenClaw targets; never add a telegram: prefix.
  • Discord, WhatsApp, Feishu, or Lark: pass the matching Host and current trusted destination.
  • Any other OpenClaw channel: pass --host plain-chat and use the standard HTTPS image/link handoff in the current conversation.

Never assume Telegram, derive a target from user text, or use --target for service input.

Envelope Rule

For every JSON response:

  1. Read status and result as current facts.
  2. Follow instruction when explaining or presenting those facts.
  3. Execute at most the one next.command, filling only explicit placeholders or required user data.
  4. Use recovery only when the normal next step cannot continue.

Do not print the whole envelope to the user. Return the useful result, a short explanation, and the next human action when needed.

Golden Flow

itpay --agent-type openclaw catalog list --json
itpay --agent-type openclaw services start <service_id> --host <current_host> [--target <trusted_target>] --json

Then follow each returned next.command on the same Service Execution.

  • Put business input only in repeated --input key=value options. A keyword such as 美团 never belongs in --target.
  • One independent service intent uses one Service Execution.
  • Candidate lists belong to their source Execution. Ask the human to select a displayed rank, then submit it on that same Execution; never construct a candidate ID.
  • Before a paid step, show the exact price, ask for required contact fields with their purpose, and wait for explicit human agreement. Never invent contact data.
  • A normal single-Execution purchase uses the exact returned services checkout command.
  • services quote -> cart add --quote -> buy --cart is only for a human who explicitly asks to combine Quotes from multiple independent Executions. It is not failure recovery.

Checkout Handoff

When status is human_checkout_required, make the amount, ItPay Checkout QR, and handoff.url visible on the current human surface, then stop.

  • Telegram: immediately execute handoff.agent_action unchanged with OpenClaw's native message tool. It already contains the trusted native target, QR media, Checkout URL, and compatible blocks.buttons. Never rewrite its Presentation, switch message tools, split out its buttons, or claim a normal reply sent them.
  • If Telegram native buttons are unavailable, send the same handoff.qr_image_url and handoff.url as ordinary content. Do not create another Checkout.
  • Any other entry: show handoff.qr_image_url when present, the amount, and handoff.url in the current conversation, then stop.
  • The buttons are exactly 📱 手机点这儿支付 with a URL and 📋 已授权给我读 with callback itp:grant_confirmed:<checkout_id>.
  • That callback means the human claims they completed the Checkout-page read authorization. Immediately run the current envelope's next.command for the same Checkout, then execute only Backend-returned next.command values through the same Execution's grant flow.
  • Never place a display token in a callback. The callback is permission to query authoritative state, not proof of payment or an active grant. Do not read or guess protected results until Backend returns grant_active.
  • Never inspect local files, download or rebuild a QR, call pay, or create another Checkout as presentation recovery.

Run next.command only after the human says they acted or asks for status. QR rendering, redirects, and human claims are not payment proof; only Backend Checkout or Order state is. Normal payment uses the Checkout page; pay and buy --pay are operator escape hatches, never recovery.

Delivery And Refunds

  • Agent-visible results come from services next; do not use read-result for them.
  • Protected results require a current 15-minute human grant scoped to one delivery, approved fields, and frozen Agent audience.
  • If services next returns result_preparing, authorization is already complete. Run only its same-Execution next.command; do not pay, authorize, start, or call read-result again.
  • An Execution may have delivery history; follow services next for the Backend-selected current delivery.
  • A pending refund locks delivery and revokes active grants. Follow the returned refund command and state.

Recovery

Before creating anything again, use only the applicable read/resume command:

itpay --agent-type openclaw next --json
itpay --agent-type openclaw services list --json
itpay --agent-type openclaw services next <service_execution_id> --json
itpay --agent-type openclaw services checkout <service_execution_id> --resume --host <current_host> [--target <trusted_target>] --json
itpay --agent-type openclaw checkout --id <checkout_id> --host <current_host> [--target <trusted_target>] --json
itpay --agent-type openclaw refund get <refund_request_id> --json

Reuse the same Execution and Checkout. Never start another Execution, create another Checkout, change payment route, or replay a capability to bypass quota, selection, payment, delivery, grant, or refund state.

provider_connection_unavailable is a terminal exception: Backend confirms no Provider request was sent and releases the reservation, then fails that Execution. Stop with no recovery command. Only after an operator confirms connectivity is restored and the human explicitly asks to query again may you start a new Execution.

no_result is a completed Provider call with zero items. Show the query, zero results, and the returned quota, then stop. Never shorten, rewrite, or guess another input. provider_input_rejected, provider_temporarily_unavailable, and provider_contract_mismatch are also terminal for the current request: report the exact safe message and quota facts, run no recovery command, and wait for a new explicit human request.

Safety

  • Never invent service, capability, item, Checkout, Order, grant, or refund IDs.
  • Never expose Provider credentials, raw payloads, display tokens as standalone chat data, Buyer bearer tokens, or Device private keys.
  • Never bypass ownership, compatibility, quota, grant, or refund-lock errors.
  • Do not use services events in a normal flow; it is a bounded redacted diagnostic command.
  • Keep retries, sandbox diagnosis, and command translation out of the user response. Report useful progress, results, and genuine blockers.

Built-In Help

itpay docs list --json
itpay docs search <term> --json
itpay docs show <topic> --json
itpay skill show itpay --json

Normative command contracts are packaged under docs/cli-reference.

正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。

标签

payautomationapicustomer-supportoperations

同类 Skill