agent-payment-x402
Skill by affaan-m
Adds x402 payment execution to AI agents, with per-task budgets, spending controls and non-custodial wallets. Covers Base via agentwallet-sdk, X Layer via OKX Payments, and Solana and EVM networks via upstream x402 packages. Aimed at developers building agents that pay for APIs or services.
Install agent-payment-x402
Built from the published package, never by AI.
git clone --depth 1 https://github.com/affaan-m/ECC /tmp/ECC && mkdir -p ~/.claude/skills && cp -r /tmp/ECC/docs/zh-CN/skills/agent-payment-x402 ~/.claude/skills/agent-payment-x402Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/affaan-m/ECC /tmp/ECC && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/ECC/docs/zh-CN/skills/agent-payment-x402 ~/.gemini/antigravity-cli/skills/agent-payment-x402Antigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
agent-payment-x402 is a skill that adds x402 HTTP payment execution to AI agents. It lets an agent pay for APIs, services, or other agents when a server responds with HTTP 402, with per-task budgets and spending controls in place. The skill describes three integration paths: agentwallet-sdk as an MCP payment server for Base and other supported chains, OKX Payments for X Layer, and upstream x402 packages for Solana and multi-network EVM.
Spending limits are enforced on each payment call through a SpendingPolicy that covers per-task and per-session budgets, allowlisted recipients, and rate limits. Wallets are non-custodial: the agent holds its keys through ERC-4337 smart accounts, and the orchestrator sets the policy before delegating work. The skill is aimed at developers building agents that must pay for external services. It includes a TypeScript example that filters server payment requirements by network, asset, recipient, and amount.
Written from the project's SKILL.md and checked against it.
What it can do
- get_balanceChecks the agent wallet balance.
- send_paymentSends a payment to an address or ENS name.
- check_spendingQueries the remaining budget.
- list_transactionsProvides an audit trail of all payments.
- Per-task and per-session budgetsCaps spending for one operation and for a whole session.
- Recipient allowlistLimits which addresses or services the agent can pay.
What you need
- Node.js with npx to run agentwallet-sdk
- Signer private keys set in the orchestrator environment for the upstream x402 path
- The okx/onchainos-skills repository for the OKX X Layer path
- USDC in the buyer wallet for payments
Try asking
- Check my agent wallet balance and remaining budget for this task.
- Send a payment to the approved recipient for this API call.
- List all payments my agent made this session for an audit.
Good to know
- The default x402.org facilitator is for testnets only and does not suit mainnet routes.
- Pin package versions, since the tool manages private keys.
- The okx-x402-payment skill is a deprecated alias.
- Confirm agentwallet-sdk network coverage in its package docs before production use.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: docs/zh-CN/skills/agent-payment-x402/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md35 KB
Alternatives to agent-payment-x402
All alternatives →Lists live launchpad token feeds and AI-detected hot topics for meme tokens on BSC, Solana and Base. Covers new, finalizing and just-migrated tokens on launchpads such as Pump.fun and Four.meme.
The okx-market skill lets an AI assistant retrieve cryptocurrency market data from the OKX V5 REST API. It is aimed at users who want spot, derivatives and index data in Python without an account.
Calculates key SaaS health metrics such as ARR, churn, LTV and CAC from raw business numbers, then gives prioritized advice. Built for founders and finance leads who share revenue or customer figures.
Fetches U.S. SEC EDGAR data for research. It resolves a ticker to its CIK, lists recent filings with primary-document URLs, and pulls XBRL financial series. Built for analysts who need free, U.S.-only filing data.
Provides free, no-auth access to Eastmoney market data for A-shares, Hong Kong stocks and US stocks. It covers fund flows, dragon-tiger lists, financial statements and stock screening.
Reads and manages a user's QuickBooks business through Intuit's official MCP server. It answers finance questions from reports, invoices, customers, products and benchmarks, and completes approved actions.
Compare with meme-rush, okx-market or saas-metrics-coach
agent-payment-x402: common questions
What does x402 do?
It extends HTTP 402 Payment Required so a server's payment terms can be negotiated by machines. The agent's payment tool checks the budget, signs the payment, and retries within the policy.
Who sets the spending limits?
The orchestrator sets the policy before delegating work, not the agent. This stops the agent from raising its own limits.
Which networks are supported?
Base is covered by agentwallet-sdk, X Layer by OKX Payments, and Solana and multi-network EVM by upstream x402 packages. The default x402.org facilitator is testnet only.
How do I install agent-payment-x402?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is agent-payment-x402 free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is agent-payment-x402 safe to use?
It scores 91 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to agent-payment-x402?
Similar skills: meme-rush, okx-market, saas-metrics-coach, sec-edgar.
