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 and per-session budgets, spending controls and non-custodial wallets. It covers agentwallet-sdk for Base, OKX Payments for X Layer, and upstream x402 packages for Solana and EVM. 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/ja-JP/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

This skill lets an AI agent pay for external APIs, services, or other agents using the x402 HTTP payment protocol. Every payment call is checked against a SpendingPolicy with a per-task budget, a per-session cap, a recipient allowlist, and rate limits. The source describes non-custodial wallets in which the agent holds its own keys through ERC-4337 smart accounts, and the orchestrator sets the policy before delegating work.

The skill covers several integration paths. It uses agentwallet-sdk for Base and other supported chains, OKX Payments for X Layer, and upstream x402 packages for Solana and multi-network EVM. It includes a decision table for choosing a path, a pinned MCP configuration example, and a TypeScript client example that filters server payment requirements before signing. It is aimed at developers building agents that make or accept x402 payments.

Written from the project's SKILL.md and checked against it.

What it can do

  • get_balanceChecks the balance of the agent wallet through the agentwallet-sdk MCP server.
  • send_paymentSends a payment to an address or ENS name through the agentwallet-sdk MCP server.
  • check_spendingQueries the remaining budget for the agent.
  • list_transactionsReturns an audit trail of all payments made by the agent.
  • Per-task budgetCaps the maximum spend for a single agent action.
  • Per-session budgetEnforces a cumulative spending limit across a whole session.
  • Recipient allowlistRestricts which addresses or services the agent is allowed to pay.
  • Rate limitingLimits the number of transactions per minute or per hour.

What you need

  • Node.js with npx for the agentwallet-sdk MCP server
  • Signer keys for EVM and Solana, supplied through the orchestrator environment
  • OKX Payments access for the X Layer path

Try asking

  • Check my agent wallet balance and remaining budget for this session.
  • Pay the 402-gated API endpoint, staying within the per-task limit.
  • List every payment the agent made today for an audit.

Good to know

  • The upstream x402.org facilitator defaults to testnets and is not for mainnet routes.
  • Check network coverage in the agentwallet-sdk documentation before production use; Base Sepolia is the default for development.
  • Pin package versions, since the tool manages private keys and unpinned npx installs carry supply chain risk.
  • The okx-x402-payment skill is a deprecated alias; use okx-agent-payments-protocol instead.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: docs/ja-JP/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.md43 KB

Alternatives to agent-payment-x402

All alternatives →

Compare with meme-rush, okx-market or saas-metrics-coach

agent-payment-x402: common questions

Does the agent hold custody of funds?

The source describes non-custodial wallets where the agent holds its own keys through ERC-4337 smart accounts, with no pooled funds.

Who sets the spending limits?

The orchestrator sets the SpendingPolicy before delegation, and the source says the agent should not be able to set or escalate its own policy.

Which networks are supported?

The source covers Base through agentwallet-sdk, X Layer through OKX Payments, and Solana and multi-network EVM through the upstream x402 packages.

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.