Solana 商户加密支付一站式方案
简介
基于 MoonPay Commerce 的 Solana 加密支付方案,支持快速创建 Pay Link 和结账链接,让商户安全便捷地接受多币种加密货币付款。
原始描述
Accept crypto payments on Solana via MoonPay Commerce (formerly Helio). Create Pay Links, generate checkout URLs, check transactions, and list supported currencies. Use when the user wants to accept crypto payments, create payment links, charge for products/services with crypto, or query payment transactions. Requires a MoonPay Commerce account with API key and secret.
通过你的 Agent 添加
点「快速安装」复制一段指令,粘给你正在用的 Agent(Claude Code、Codex、OpenClaw 等),它会自己完成安装。
或者手动安装
包里是 SKILL.md 加作者附带的文件,解压后目录名就是技能名。
技能申请的权限由作者决定,装之前请确认它能读什么、能执行什么。
中文使用说明 来自收录源
核心用法
该 Skill 为商户提供了通过 MoonPay Commerce(原 Helio)在 Solana 区块链上接受加密货币支付的完整解决方案。用户可通过交互式脚本完成 API 凭证配置,快速创建 Pay Link(支付链接)和 Checkout URL(结账链接),并实时查询交易状态。支持 USDC 等主流代币,且具备自动兑换功能,允许付款人使用任意支持的 Solana 代币进行支付并自动转换为商户指定的收款货币。
显著优点
合规与安全性:采用严格的权限控制机制,配置文件权限设置为 600,凭证通过交互式终端输入,不残留在日志或历史记录中。代码通过 S 级安全认证,无危险函数调用,具备完善的输入验证和白名单机制。
生态整合:深度集成 Solana 高性能区块链,支持多币种自动兑换,降低商户对接复杂度。提供标准化的 helper 脚本(helio.sh),简化日常操作如创建链接、查询交易、禁用/启用支付链接等。
透明可控:所有 API 调用均通过 HTTPS 固定端点,无动态代码加载或第三方静默上传风险,资金流向完全透明可追溯。
潜在缺点与局限性
平台依赖:功能完全依赖 MoonPay Commerce 中心化服务,若平台出现故障或政策调整,可能影响收款服务连续性。不支持其他区块链网络(如 Ethereum、Bitcoin 等),仅限于 Solana 生态。
技术门槛:商户需自行管理 API 密钥和 Secret,且需要理解加密货币的定价单位(base units,如 USDC 的 6 位小数),对非技术用户有一定学习成本。依赖系统级工具 jq 和 curl,在部分受限环境中可能无法运行。
合规风险:加密货币支付涉及不同司法管辖区的监管要求,商户需自行确保符合当地反洗钱(AML)和了解客户(KYC)规定。
适合的目标群体
主要面向 Solana 生态的 DApp 开发者、内容创作者、电商商户以及希望接受加密货币支付但不愿自行开发复杂结算系统的中小企业。特别适合需要快速部署支付功能、对安全性有较高要求且具备基本技术配置能力的团队。
使用风险
密钥管理风险:API 密钥泄露可能导致资金损失或恶意交易,需确保 ~/.mpc/helio/config 文件权限正确且不被未授权访问。
网络与性能风险:依赖 Helio API 的可用性和 Solana 网络的稳定性,网络延迟或区块链拥堵可能导致交易确认延迟。
价格波动风险:虽然支持自动兑换为 USDC 等稳定币,但在极端市场条件下,自动兑换机制可能存在滑点或延迟。
配置错误风险:定价单位转换错误(如将 1 USDC 误设为 1 而非 1000000)可能导致商品定价错误,造成经济损失。
技能正文
name: mpc-accept-crypto-payments description: Accept crypto payments on Solana via MoonPay Commerce (formerly Helio). Create Pay Links, generate checkout URLs, check transactions, and list supported currencies. Use when the user wants to accept crypto payments, create payment links, charge for products/services with crypto, or query payment transactions. Requires a MoonPay Commerce account with API key and secret. metadata: openclaw: requires: bins: - jq - curl env: - HELIO_API_KEY - HELIO_API_SECRET credentials: storage: ~/.mpc/helio/config setup: bash scripts/setup.sh permissions: "600"
MPC Accept Crypto Payments
Merchant-side skill for accepting crypto payments on Solana via MoonPay Commerce (formerly Helio).
Setup
Run the setup script with your API credentials (wallet ID is fetched automatically):
bash scripts/setup.sh
You'll need:
- API Key — from https://app.hel.io → Settings → API Keys
- API Secret — from the same page (save it when generated)
The setup script will:
- Validate your credentials against the API
- Fetch your Solana wallets automatically
- Select the PAYOUT wallet (or CONNECTED if no PAYOUT exists)
- Save everything to
~/.mpc/helio/config
If the user doesn't have an account, direct them to https://app.hel.io to sign up.
Config Management
bash scripts/setup.sh status # Show current config
bash scripts/setup.sh clear # Remove saved credentials
Quick Reference
Base URL: https://api.hel.io/v1
List Supported Currencies (no auth needed)
curl -s https://api.hel.io/v1/currency | jq '.[].symbol'
Create a Pay Link
curl -s -X POST "https://api.hel.io/v1/paylink/create/api-key?apiKey=$HELIO_API_KEY" \
-H "Authorization: Bearer $HELIO_API_SECRET" \
-H "Content-Type: application/json" \
-d '{
"name": "My Payment",
"template": "OTHER",
"pricingCurrency": "<CURRENCY_ID>",
"price": "<AMOUNT_IN_BASE_UNITS>",
"features": {
"canChangePrice": false,
"canChangeQuantity": false,
"canSwapTokens": true
},
"recipients": [{
"currencyId": "<CURRENCY_ID>",
"walletId": "<YOUR_WALLET_ID>"
}]
}'
Defaults: Currency is USDC (6340313846e4f91b8abc519b). Token swapping is enabled so payers can pay with any supported Solana token (auto-converted to USDC).
Price format: price is in base units (int64 string). For USDC (6 decimals): "1000000" = 1 USDC. For SOL (9 decimals): "1000000000" = 1 SOL.
Create a Charge (Checkout URL)
curl -s -X POST "https://api.hel.io/v1/charge/api-key?apiKey=$HELIO_API_KEY" \
-H "Authorization: Bearer $HELIO_API_SECRET" \
-H "Content-Type: application/json" \
-d '{"paymentRequestId": "<PAYLINK_ID>"}'
Returns { "id": "...", "pageUrl": "https://..." } — share pageUrl with the payer.
Check Transactions
curl -s "https://api.hel.io/v1/paylink/<PAYLINK_ID>/transactions?apiKey=$HELIO_API_KEY" \
-H "Authorization: Bearer $HELIO_API_SECRET"
Disable / Enable a Pay Link
curl -s -X PATCH "https://api.hel.io/v1/paylink/<PAYLINK_ID>/disable?apiKey=$HELIO_API_KEY&disabled=true" \
-H "Authorization: Bearer $HELIO_API_SECRET"
Helper Script
# Setup (run first)
bash scripts/setup.sh
# Operations
bash scripts/helio.sh currencies
bash scripts/helio.sh create-paylink "Coffee" 5.00 USDC
bash scripts/helio.sh charge <paylink-id>
bash scripts/helio.sh transactions <paylink-id>
bash scripts/helio.sh disable <paylink-id>
bash scripts/helio.sh enable <paylink-id>
Templates
The template field controls Pay Link type:
OTHER— generic paymentPRODUCT— physical/digital productINVOICE— invoiceSUBSCRIPTION— recurring (requiressubscriptionDetails)EVENT— event ticket
Credential Handling
When setting up credentials, run the setup script interactively:
bash scripts/setup.sh
The script prompts for credentials directly in the terminal — they are never stored in chat history or logs. Credentials are saved to ~/.mpc/helio/config (mode 600).
Advanced
- Full API schema details: see
references/api-reference.md - OpenAPI spec: https://api.hel.io/v1/docs-json
- Dashboard: https://app.hel.io
- Docs: https://docs.hel.io
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。