Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

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.

  • Score 91
  • 311k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

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-x402

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install agent-payment-x402 in Claude Code

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

A

No 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 →

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.

agent-payment-x402 Install

Add to stack

Loading.