用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/BankrBot/skills --skill metr-merchant-payments命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Buy Bitcoin hashpower and Megapot lottery tickets through the BASED x402 endpoints on Base. Use when the user says mine bitcoin, solo mining, based pool, buy hashpower, rent hashrate, block odds, block party, my mining payout, what would I earn if BASED hits a block, mining profitability, hashprice, bitcoin hashprice, cbBTC, WBTC, BTC basis, megapot, lottery ticket, or jackpot. Covers live pool stats, hashpower quotes, solo block odds, per-miner round status, hashprice, cbBTC/WBTC basis on Base, placing $10 mining blocks, and buying $1 lottery tickets.
Create and manage pay-per-view (CPM) content campaigns on molty.cash for X (Twitter) posts — earners post about your product/token and get paid per 1,000 views. Two ways to fund a campaign: campaign.create (USDC) or shill.create (your own token). Views are read automatically from X. Payments settle on-chain via x402 on Base or Solana using the Bankr wallet for signing (Bankr itself signs on Base only — molty's other settlement chain, Solana, is available via other wallets in molty's catalog). This skill is scoped to the campaign OWNER side only. Do NOT use for token swaps, DeFi, or non-USDC payments.
AI-powered crypto trading agent, wallet API, and LLM gateway via natural language. Use when the user wants to trade crypto, trade tokenized stocks and ETFs (spot or leveraged), check portfolio balances (with PnL and NFTs), view token prices, search tokens, research token holders, transfer crypto, manage NFTs, use leverage (Hyperliquid or Avantis), bet on Polymarket, deploy tokens, set up automated trading, sign and submit raw transactions, call or deploy x402 paid API endpoints, browse the web, store and query files on their wallet's filesystem, or access LLM models through the Bankr LLM gateway funded by your Bankr wallet — including zero-data-retention and TEE-private inference tiers. Supports Base, Ethereum, Polygon, Solana, Unichain, World Chain, Arbitrum, BNB Chain, and Robinhood Chain.
正在显示 SKILL.md
基于 SOC 职业分类
| name | metr-merchant-payments |
| description | Claim and withdraw payments from Metr (metrpay.com) merchant account. |
| tags | ["payments","merchant","metr","withdraw","claim"] |
Manage your Metr merchant account — start payment sessions, end (settle) them, and withdraw funds to your wallet.
Metr is a multi-chain payment protocol that lets merchants accept crypto (USDC, SOL, POL, ETH, and custom SPL/ERC-20 tokens) via session-based checkout. Funds are held in escrow during a session and released when the session ends.
https://api.metr.app/v1All API calls require headers:
| Header | Value | When |
|---|---|---|
x-api-key | Your merchant API key | All merchant endpoints |
x-agent-key | Your agent key | Agent session endpoints |
Store your key securely in Bankr:
METR_MERCHANT_API_KEY = your merchant keyMETR_AGENT_KEY = your agent key (if using agent sessions)Initiate a checkout session for a customer.
Endpoint: POST /v1/integrate/sessions/start
Headers:
Content-Type: application/jsonx-api-key: <your-merchant-key>Body:
{
"amount": "10.00",
"currency": "USDC",
"chain": "base",
"metadata": {
"orderId": "order_12345",
"customerEmail": "customer@example.com"
}
}
Response:
{
"sessionId": "sess_abc123",
"paymentUrl": "https://pay.metr.app/sess_abc123",
"status": "pending",
"expiresAt": "2026-07-01T12:00:00Z"
}
Bankr CLI equivalent:
curl -X POST https://api.metr.app/v1/integrate/sessions/start \
-H "Content-Type: application/json" \
-H "x-api-key: $METR_MERCHANT_API_KEY" \
-d '{
"amount": "10.00",
"currency": "USDC",
"chain": "base",
"metadata": {"orderId": "order_12345"}
}'
Release escrowed funds to the merchant wallet once the order is fulfilled.
Endpoint: POST /v1/integrate/sessions/{sessionId}/end
Headers:
Content-Type: application/jsonx-api-key: <your-merchant-key>Body:
{
"reason": "fulfillment_complete",
"metadata": {
"deliveredAt": "2026-07-01T10:30:00Z"
}
}
Response:
{
"sessionId": "sess_abc123",
"status": "settled",
"settledAt": "2026-07-01T10:30:05Z",
"txHash": "0x..."
}
Bankr CLI equivalent:
curl -X POST "https://api.metr.app/v1/integrate/sessions/$SESSION_ID/end" \
-H "Content-Type: application/json" \
-H "x-api-key: $METR_MERCHANT_API_KEY" \
-d '{"reason": "fulfillment_complete"}'
For AI-agent-initiated payments (e.g., an agent buying a service on behalf of a user).
Endpoint: POST /v1/agents/sessions/start
Headers:
Content-Type: application/jsonx-api-key: <your-merchant-key>x-agent-key: <your-agent-key>Body:
{
"amount": "5.00",
"currency": "USDC",
"chain": "solana",
"agentId": "agent_001",
"metadata": {
"service": "api_call",
"tier": "premium"
}
}
Endpoint: POST /v1/agents/sessions/{sessionId}/end
Headers:
Content-Type: application/jsonx-api-key: <your-merchant-key>x-agent-key: <your-agent-key>Body:
{
"reason": "service_delivered",
"metadata": {}
}
Metr does not expose a direct "claim" API endpoint. Instead:
Settlement = Claim: Ending a session automatically releases the escrowed funds to your configured merchant wallet. The txHash in the end-session response is your on-chain proof.
Withdraw from Dashboard: For bulk withdrawals or moving funds to a different wallet:
Webhook Notifications: Set up a webhook in your Metr dashboard to receive real-time events:
session.settled — funds released to merchant walletwithdrawal.completed — manual withdrawal finished| Chain | Native Token | Stablecoins | Custom Tokens |
|---|---|---|---|
| Solana | SOL | USDC | SPL tokens |
| Polygon | POL | USDC | ERC-20 tokens |
| Base | ETH | USDC | ERC-20 tokens |
Common HTTP status codes from Metr API:
| Code | Meaning | Action |
|---|---|---|
| 400 | Bad Request | Check request body schema |
| 401 | Unauthorized | Verify x-api-key is correct |
| 403 | Forbidden | Key lacks permission for this action |
| 404 | Session Not Found | Double-check sessionId |
| 409 | Session Already Ended | Idempotency — session is already settled |
| 422 | Validation Error | Amount too small, unsupported chain, etc. |
| 500 | Internal Error | Retry or contact Metr support |
1. Customer places order on your site
2. You call POST /v1/integrate/sessions/start
3. You redirect customer to paymentUrl
4. Customer pays via Metr checkout
5. You fulfill the order (ship product, run service, etc.)
6. You call POST /v1/integrate/sessions/{id}/end
7. Funds are released to your merchant wallet
8. (Optional) You withdraw from dashboard to cold storage