← 返回 Skills 市场
zhenstaff

Agent Payment Rail

作者 Justin Liu · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
345
总下载
0
收藏
1
当前安装
1
版本数
在 OpenClaw 中安装
/install agent-payment-rail
功能描述
Provides a unified API for AI agents to create, query, refund, and cancel multi-currency payments via Stripe and other providers.
使用说明 (SKILL.md)

Agent Payment Rail Skill

English | 中文


\x3Ca name="english">\x3C/a>

English

Overview

Agent Payment Rail is a universal payment infrastructure skill for AI Agents. It provides a unified API to integrate multiple payment providers (Stripe, PayPal, etc.) into your agent applications.

Features

  • 🌐 Multi-Provider Support - Stripe, PayPal, and more
  • 🔌 Unified API - Single interface for all payment providers
  • 💰 Complete Transaction Management - Create, query, refund, cancel
  • 🔒 Type-Safe - Full TypeScript support
  • 🌍 Multi-Currency - USD, EUR, GBP, CNY, JPY

Available Tools

1. create_payment

Create a new payment transaction.

Parameters:

  • amount (number, required) - Payment amount (e.g., 99.99)
  • currency (string, required) - Currency code (USD, EUR, GBP, CNY, JPY)
  • description (string, required) - Payment description
  • provider (string, optional) - Payment provider (stripe, paypal)
  • metadata (object, optional) - Additional metadata

Example:

create_payment({
  amount: 99.99,
  currency: "USD",
  description: "Premium subscription",
  metadata: { userId: "user_123" }
})

2. get_transaction

Get transaction status and details.

Parameters:

  • transaction_id (string, required) - Transaction ID
  • provider (string, optional) - Payment provider

Example:

get_transaction({
  transaction_id: "pi_123456"
})

3. refund_payment

Refund a payment transaction.

Parameters:

  • transaction_id (string, required) - Transaction ID to refund
  • amount (number, optional) - Refund amount (full refund if not specified)
  • reason (string, optional) - Refund reason
  • provider (string, optional) - Payment provider

Example:

refund_payment({
  transaction_id: "pi_123456",
  reason: "Customer request"
})

4. cancel_payment

Cancel a pending payment.

Parameters:

  • transaction_id (string, required) - Transaction ID to cancel
  • provider (string, optional) - Payment provider

Example:

cancel_payment({
  transaction_id: "pi_123456"
})

Setup

1. Installation

npm install openclaw-agent-payment-rail

2. Environment Variables

Set up your payment provider API keys:

# Stripe
export STRIPE_API_KEY="sk_test_..."

# PayPal (coming soon)
export PAYPAL_CLIENT_ID="..."
export PAYPAL_CLIENT_SECRET="..."

3. Initialize in Your Agent

import { PaymentRail } from 'openclaw-agent-payment-rail';

const rail = new PaymentRail();

await rail.initialize({
  provider: 'stripe',
  apiKey: process.env.STRIPE_API_KEY,
});

Use Cases

  1. E-commerce Agent - Automated purchase processing
  2. Subscription Service - Recurring payment management
  3. Refund Automation - Smart refund handling
  4. Multi-currency Payments - Global transaction support

Supported Providers

Provider Status Features
Stripe ✅ Full Support Payments, Refunds, Cancellations
PayPal 🚧 Coming Soon In Development
Alipay 📋 Planned Future Release
WeChat Pay 📋 Planned Future Release

Documentation

License

MIT License


\x3Ca name="chinese">\x3C/a>

中文

概述

Agent Payment Rail 是一个为 AI Agent 设计的通用支付基础设施技能。它提供统一的 API,让你的 Agent 应用能够集成多个支付提供商(Stripe、PayPal 等)。

特性

  • 🌐 多提供商支持 - Stripe、PayPal 等
  • 🔌 统一 API - 所有支付提供商使用单一接口
  • 💰 完整交易管理 - 创建、查询、退款、取消
  • 🔒 类型安全 - 完整 TypeScript 支持
  • 🌍 多币种 - USD、EUR、GBP、CNY、JPY

可用工具

1. create_payment - 创建支付

创建新的支付交易。

参数:

  • amount(数字,必填)- 支付金额(如 99.99)
  • currency(字符串,必填)- 货币代码(USD、EUR、GBP、CNY、JPY)
  • description(字符串,必填)- 支付描述
  • provider(字符串,可选)- 支付提供商(stripe、paypal)
  • metadata(对象,可选)- 附加元数据

示例:

create_payment({
  amount: 99.99,
  currency: "USD",
  description: "高级订阅",
  metadata: { userId: "user_123" }
})

2. get_transaction - 查询交易

获取交易状态和详情。

参数:

  • transaction_id(字符串,必填)- 交易 ID
  • provider(字符串,可选)- 支付提供商

示例:

get_transaction({
  transaction_id: "pi_123456"
})

3. refund_payment - 退款

退款支付交易。

参数:

  • transaction_id(字符串,必填)- 要退款的交易 ID
  • amount(数字,可选)- 退款金额(不指定则全额退款)
  • reason(字符串,可选)- 退款原因
  • provider(字符串,可选)- 支付提供商

示例:

refund_payment({
  transaction_id: "pi_123456",
  reason: "客户要求"
})

4. cancel_payment - 取消支付

取消待处理的支付。

参数:

  • transaction_id(字符串,必填)- 要取消的交易 ID
  • provider(字符串,可选)- 支付提供商

示例:

cancel_payment({
  transaction_id: "pi_123456"
})

设置

1. 安装

npm install openclaw-agent-payment-rail

2. 环境变量

设置你的支付提供商 API 密钥:

# Stripe
export STRIPE_API_KEY="sk_test_..."

# PayPal(即将推出)
export PAYPAL_CLIENT_ID="..."
export PAYPAL_CLIENT_SECRET="..."

3. 在 Agent 中初始化

import { PaymentRail } from 'openclaw-agent-payment-rail';

const rail = new PaymentRail();

await rail.initialize({
  provider: 'stripe',
  apiKey: process.env.STRIPE_API_KEY,
});

使用场景

  1. 电商 Agent - 自动化购买处理
  2. 订阅服务 - 定期付款管理
  3. 退款自动化 - 智能退款处理
  4. 多币种支付 - 全球交易支持

支持的提供商

提供商 状态 功能
Stripe ✅ 完全支持 支付、退款、取消
PayPal 🚧 即将推出 开发中
支付宝 📋 计划中 未来发布
微信支付 📋 计划中 未来发布

文档

许可证

MIT 许可证

安全使用建议
This skill's docs instruct installing an npm package and supplying Stripe/PayPal API keys, but the bundle you received contains only text and the registry metadata doesn't declare those credentials. Before using or giving any secrets: 1) Verify the npm package and GitHub repo links actually exist and are published by a trusted maintainer; inspect the package source (or the GitHub repo) yourself to confirm behavior; 2) Require the publisher to update the manifest to declare required env vars and provenance; 3) Do not paste live payment API keys into an unverified skill — use test/sandbox keys if you must experiment; 4) Prefer using official SDKs (Stripe official package) or run any third-party code in an isolated environment; 5) If you cannot verify the package and its ownership, treat the skill as untrusted and do not supply production credentials. If you want, I can suggest exact checks to validate the npm package and GitHub repository (what files to look for, which fields in package.json, recommended security review steps).
功能分析
Type: OpenClaw Skill Name: agent-payment-rail Version: 1.0.0 The skill bundle defines a legitimate payment integration infrastructure for AI agents, supporting providers like Stripe and PayPal. It provides standard tools for transaction management (create_payment, refund_payment, etc.) and follows conventional security practices by requesting API keys via environment variables. No evidence of malicious intent, data exfiltration, or harmful prompt injection was found in skill.md or readme.md.
能力评估
Purpose & Capability
The skill claims to provide a unified payment API (Stripe, PayPal, etc.) and points to an npm package and GitHub repo, which is reasonable for a payment integration. However, the published skill bundle contains only instructions (no code, no install spec) and the registry metadata declares no required environment variables or primary credential despite the SKILL.md explicitly asking for STRIPE_API_KEY (and PayPal keys). That omission is an incoherence: a real payment rail would legitimately need provider credentials and/or bundled code; the manifest does not reflect that.
Instruction Scope
The SKILL.md instructs users/agents to install an npm package, set STRIPE_API_KEY / PAYPAL_CLIENT_ID / PAYPAL_CLIENT_SECRET, and to call PaymentRail APIs (including examples that read process.env.STRIPE_API_KEY). The instructions do not ask to read unrelated system files, but they do require access to sensitive secrets that are not declared in the registry. The doc also tells agents to run global installs (npm install -g), which would execute externally sourced code if followed — a notable operational risk absent verification of the package source.
Install Mechanism
There is no install specification in the registry (instruction-only). SKILL.md and readme propose installing openclaw-agent-payment-rail from npm and reference a GitHub repo. Because the skill package itself does not include code, anyone following the instructions would retrieve code from external registries/URLs; this is normal for many projects but increases risk unless the referenced package/repo is verified. The manifest should either include an install spec or explicitly declare external dependencies and provenance; it does not.
Credentials
Payment provider API keys (STRIPE_API_KEY, PAYPAL_CLIENT_ID, PAYPAL_CLIENT_SECRET) are exactly the sensitive credentials this functionality needs, and the SKILL.md tells users to set them. But the registry lists no required env vars and no primary credential. Requiring high-sensitivity secrets without declaring them in the manifest is disproportionate and inconsistent. Users should not provide live payment keys to an instruction-only skill unless they have verified the package/repo and the code that will handle those keys.
Persistence & Privilege
The skill does not request always:true, does not declare config path access, and is user-invocable only. It does not claim any special persistent privileges in the manifest, which is appropriate.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install agent-payment-rail
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /agent-payment-rail 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of Agent Payment Rail skill. - Provides a unified API for integrating multiple payment providers (currently supports Stripe, PayPal in development) - Features full transaction management: create payments, get transaction status, refund, and cancel payments - Supports multiple currencies (USD, EUR, GBP, CNY, JPY) - TypeScript type safety included - English and Chinese documentation available - Simple setup via npm and environment variables
元数据
Slug agent-payment-rail
版本 1.0.0
许可证 MIT-0
累计安装 1
当前安装数 1
历史版本数 1
常见问题

Agent Payment Rail 是什么?

Provides a unified API for AI agents to create, query, refund, and cancel multi-currency payments via Stripe and other providers. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 345 次。

如何安装 Agent Payment Rail?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install agent-payment-rail」即可一键安装,无需额外配置。

Agent Payment Rail 是免费的吗?

是的,Agent Payment Rail 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Agent Payment Rail 支持哪些平台?

Agent Payment Rail 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Agent Payment Rail?

由 Justin Liu(@zhenstaff)开发并维护,当前版本 v1.0.0。

💬 留言讨论