payment-session
Streaming + recurring billing for OpenClaw agents over x402 — meter pay-as-you-go usage or run a subscription, settle in batches through pay_x402, with a…
от Parad0x-Labs★ 23 звезды на GitHub
Установить payment-session в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Payment Session
x402 is discrete per-call. This adds the two billing shapes it lacks, settled in batches through x402 so you pay one transaction per settlement (not per tick — the only economical way to bill micro-usage given fees + ATA rent):
- metered (pay-as-you-go): accrue per-use charges, settle when they cross a threshold.
- subscription (streaming): charge a fixed amount every period.
Pure accounting — it never moves money or holds a key. It tells the agent when
and how much to settle; the agent pays via x402-pay's pay_x402. A
maxTotalUsdc lifetime budget bounds what the session suggests and records; it does
not stop pay_x402 from paying a larger seller quote (see Trust model).
Tools
| Tool | Does |
|---|---|
open_payment_session |
start a metered or subscription session with a maxTotalUsdc cap |
meter_usage |
accrue pay-as-you-go usage (metered sessions) |
check_settlement_due |
is a payment due, and for how much? (amount is capped at remaining budget) |
record_settled |
record a paid settlement after pay_x402 succeeds |
close_payment_session |
close; returns any final remainder to settle |
The loop
open_payment_session(payee, mode, cap)
metered: meter_usage(...) → check_settlement_due → if due: pay_x402(payee, amount) → record_settled
subscription: (time passes) → check_settlement_due → if due: pay_x402(payee, amount) → record_settled
close_payment_session → settle any remainder
Trust model
- Non-custodial. This plugin only does accounting; the actual USDC settlement
is
pay_x402(your own wallet signs). It never holds a key or moves funds. - Budget-capped accounting, not spend enforcement. Every session has a
maxTotalUsdcbudget:check_settlement_duenever suggests more than the remaining budget, andrecord_settledrefuses to record more. The session does not controlpay_x402, which pays the seller's quoted amount: a payment can exceed the suggested amount and the session budget. Per-payment spend is bounded by x402-pay'smaxAmountUsdc(the 5 bps protocol fee is added on top of that cap). State is in memory and is lost on restart.
Pairs with x402-pay (settlement) and
web0-onboard (identity + endpoint).
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- README.md
- openclaw.plugin.json
- package-lock.json
- package.json
- src/index.ts
- src/session.ts
- src/tools.ts
- src/types/openclaw-host.d.ts
- tsconfig.json
FAQ
Что делает скилл payment-session?
Streaming + recurring billing for OpenClaw agents over x402 — meter pay-as-you-go usage or run a subscription, settle in batches through pay_x402, with a per-session budget on suggested settlements. Non-custodial.
Как установить скилл payment-session?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл payment-session запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…