x402

x402 is a skill for Claude Code, Codex from ChainGPT-org/chaingpt-claude-skill. It costs 0 tokens per session (743 once invoked), scanned A, original, MIT.

A payment workflow for software agents using HTTP requests and blockchain-based payments. It covers paying for an endpoint and setting one up to accept payments.

In plain words
What is it for?
Use it to call paid web endpoints or create payment requirements for your own endpoint. It can also verify or settle payments through a payment facilitator.
Why use it?
It removes the need to build the payment challenge, signing, and retry process yourself. It also lets a payer inspect the amount, token, recipient, and expiry before approving payment.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Part of the chaingpt plugin — 24 skills, 1 command, 3 agents, 1 hook, 1 MCP server shipped together

Good fit Use it to call paid web endpoints or create payment requirements for your own endpoint. It can also verify or settle payments through a payment facilitator.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/chaingpt-org/chaingpt-claude-skill/x402
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add ChainGPT-org/chaingpt-claude-skill --skill x402
Clone the repo
git clone --depth 1 https://github.com/ChainGPT-org/chaingpt-claude-skill

Made for: Claude Code, Codex.

Or install chaingpt, the plugin that ships this one along with the rest of its 24 skills, 1 command, 3 agents, 1 hook, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for x402

README.md
[![agentmods](https://agentmods.dev/badge/skills/chaingpt-org/chaingpt-claude-skill/x402/github.svg)](https://agentmods.dev/skills/chaingpt-org/chaingpt-claude-skill/x402)
Your own site
<a href="https://agentmods.dev/skills/chaingpt-org/chaingpt-claude-skill/x402"><img src="https://agentmods.dev/badge/skills/chaingpt-org/chaingpt-claude-skill/x402/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for x402

Your own site · 80×15
<a href="https://agentmods.dev/skills/chaingpt-org/chaingpt-claude-skill/x402"><img src="https://agentmods.dev/badge/skills/chaingpt-org/chaingpt-claude-skill/x402.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 743 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00743
Opus 5 $0.00000 $0.00371
Sonnet 5 $0.00000 $0.00149
Haiku 4.5 $0.00000 $0.00074

Measured 10d ago against content hash cc5a82488bd0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

x402 scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/x402/SKILL.md · 48 lines

How it starts

The opening of the file, as written. The whole thing — 48 lines — stays where its author put it; the contents beside it link to each section on GitHub.

x402 Payments skill

x402 turns HTTP 402 Payment Required into a real payment rail for agents: a server replies 402 with what it wants paid; the client signs an off-chain authorization and retries with an X-PAYMENT header; a facilitator broadcasts it. Settlement uses EIP-3009 transferWithAuthorization (e.g. USDC on Base) — the facilitator can only broadcast the signed authorization, never alter the amount or destination.

Custody-free: the plugin builds the EIP-712 the payer signs and assembles the header; it never holds a key.

Tools

Tool Purpose
chaingpt_x402_decode Decode a 402 body or X-PAYMENT header into human terms (amount/token/recipient/expiry) before paying.
chaingpt_x402_build_payment Build the UNSIGNED EIP-3009 typed data; pass a signature back to get the final X-PAYMENT header.
chaingpt_x402_facilitator Call a facilitator: supported / verify / settle.
chaingpt_x402_create_requirements Server side: generate the PaymentRequirements + 402 body to monetize your endpoint.
chaingpt_x402_fetch The whole client loop in one tool: fetch a URL; on 402 it decodes the challenge and (given from) emits the unsigned typed data; re-call with xPaymentHeader to complete the paid request.

Pay an endpoint (client flow)

Fast path — one tool drives the loop:

  1. chaingpt_x402_fetch url=<resource> from=<payer> → on 402 you get the decoded price/payee AND the unsigned EIP-3009 typed data.
  2. Sign the typed data in the payer's wallet.
  3. chaingpt_x402_build_payment from=<payer> requirements=<from step 1> signature=0x… → the X-PAYMENT header.
  4. chaingpt_x402_fetch url=<resource> xPaymentHeader=<header> → the paid response.

Manual path (same primitives, finer control): _decode_build_payment → sign → _build_payment +signature → retry yourself.

Monetize your endpoint (server flow)

chaingpt_x402_create_requirements network=base amount=0.01 payTo=<you> → serve the returned JSON with HTTP 402. Verify/settle incoming payments via a facilitator (chaingpt_x402_facilitator).

Read the full file on GitHub · 48 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 48 lines · 0 tokens per session scan A cc5a82488bd0

Subscribe to this mod's changes

x402 is a skill published in the GitHub repository ChainGPT-org/chaingpt-claude-skill (1 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 743 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

perp-cli

Multi-DEX perpetual futures trading via the perp-cli command-line tool. Use when user asks to: trade perps, check funding rates, scan/execute arbitrage (perp-perp or spot-perp), run delta-neutral strategies, bridge USDC across chains, manage positions/orders/leverage, deposit/withdraw, hedge spot+perp, trade HIP-3…

hypurrquant/perp-cli · 152 tokens

propfund

Trade on PropFund, the decentralized on-chain prop firm for AI agents. Use this skill to get funded with the liquidity pool's capital and trade without risking your own bankroll — pass a transparent evaluation, then place leveraged long/short trades with mandatory stop-loss/take-profit and on-chain risk limits, and…

NO7r34L/PropFund.eth · 0 tokens

suwappu

Build with the Suwappu REST API: cross-chain quotes, simulation, self-custody or managed swaps, managed-wallet portfolio/prices, Polymarket research and orders, Hyperliquid market research, and Morpho lending-market research.

0xSoftBoi/suwappubot · 55 tokens

suwappu-dex

Use Suwappu's hosted MCP server for cross-chain quotes, swap simulation and unsigned transaction preparation, managed-wallet portfolio reads, prices, prediction-market research, Hyperliquid research, and Morpho market data.

0xSoftBoi/suwappubot · 50 tokens

ethereum-defi

Ethereum DeFi skill — query balances, get Chainlink prices, estimate gas, resolve ENS names, call smart contracts, ABI-encode functions, interact with ERC-8004 agent registry, query EAS attestations.

tenzro/tenzro-network · 48 tokens

defi-protocols

DeFi protocol authority — flashloans, AMM design, lending markets, concentrated liquidity, MEV, triangular and cross-DEX arbitrage, stablecoin depeg dynamics, and on-chain capital routing across Uniswap V3, Aerodrome, Balancer, Curve, and Aave V3 on Ethereum, Base, Arbitrum, Optimism, and Polygon.

LuuOW/meridian-mcp · 81 tokens