Source profileQuality 97/100Review permissions

tenequm/skills/skills/x402/SKILL.md

x402

Build internet-native payments with the x402 open protocol - HTTP 402 Payment Required for on-chain micropayments with no accounts or API keys. Use when developing paid APIs, paywalled content, AI agent payment flows, or MCP tools that charge per call. Covers the TypeScript, Python, and Go SDKs across EVM, Solana, Stellar, Aptos, NEAR, and XRPL.

Source repository stars
35
Declared platforms
0
Static risk flags
2
Last source update
2026-08-24
Source checked
2026-08-25

Decision brief

What it does: where it fits

x402 is an open standard (Apache-2.0) that activates the HTTP 402 Payment Required status code for programmatic, on-chain payments. Originally created by Coinbase, now maintained by the x402 Foundation. No accounts, sessions, or API keys required - clients pay with signed crypto…

Best for

  • Building a paid API that accepts crypto micropayments
  • Adding paywall to web content or endpoints
  • Enabling AI agents to autonomously pay for resources

Not for

  • Tasks that require unconfirmed production actions or broad system permissions.
  • Environments where the pinned source and install steps cannot be inspected.

Compatibility matrix

Platform support, with evidence labels

PlatformStatusEvidenceWhat to check
CodexNot declaredNo explicit evidencePortability before use
Claude CodeNot declaredNo explicit evidencePortability before use
CursorNot declaredNo explicit evidencePortability before use
Gemini CLINot declaredNo explicit evidencePortability before use
Open the compatibility checker

Installation

Inspect first. Install second.

The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.

Source-detected install commandSource
npx skills add https://github.com/tenequm/skills --skill "skills/x402"
Safe inspection promptEditorial

Inspect the Agent Skill "x402" from https://github.com/tenequm/skills/blob/9b9fb5a29c103ed207dc255d753939e4e2ed29f5/skills/x402/SKILL.md at commit 9b9fb5a29c103ed207dc255d753939e4e2ed29f5. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.

Workflow

What the source asks the agent to do

  1. 01

    Quick Start: Seller (TypeScript + Express)

    Install: npm install @x402/express @x402/core @x402/evm

    Install: npm install @x402/express @x402/core @x402/evm
  2. 02

    Quick Start: Buyer (TypeScript + Axios)

    Install: npm install @x402/axios @x402/evm viem

    Install: npm install @x402/axios @x402/evm viem
  3. 03

    Quick Start: Seller (Python + FastAPI)

    Install: pip install "x402[fastapi,evm]"

    Install: pip install "x402[fastapi,evm]"
  4. 04

    Quick Start: Seller (Go + Gin)

    Install: go get github.com/x402-foundation/x402/go/v2

    Install: go get github.com/x402-foundation/x402/go/v2
  5. 05

    When to Use

    Building a paid API that accepts crypto micropayments

    Building a paid API that accepts crypto micropaymentsAdding paywall to web content or endpointsEnabling AI agents to autonomously pay for resources

Permission review

Static risk signals and limitations

Network access

medium · line 44

The documentation includes network, browsing, or remote request actions.

const facilitator = new HTTPFacilitatorClient({ url: "https://x402.org/facilitator" });

Network access

medium · line 85

The documentation includes network, browsing, or remote request actions.

const response = await api.get("http://localhost:4021/weather");

Runs scripts

medium · line 283

The documentation asks the agent to run terminal commands or scripts.

go get github.com/x402-foundation/x402/go/v2

Evidence record

Why each signal appears

EvidenceSourceComputedTestedEditorial
SignalValueEvidence typeMeaning
Quality score97/100ComputedDocumentation, specificity, maintenance, and trust rules
Repository stars35SourceRepository attention, not individual Skill quality
Compatibility0 platformsSourceDeclared in the catalog source record
Usage guideautomated source guideEditorialGenerated or reviewed according to the visible evidence level

Pinned source

Provenance and original SKILL.md

Repository
tenequm/skills
Skill path
skills/x402/SKILL.md
Commit
9b9fb5a29c103ed207dc255d753939e4e2ed29f5
License
MIT
Collected
2026-08-25
Default branch
main
View the original SKILL.md

x402 Protocol Development

x402 is an open standard (Apache-2.0) that activates the HTTP 402 Payment Required status code for programmatic, on-chain payments. Originally created by Coinbase, now maintained by the x402 Foundation. No accounts, sessions, or API keys required - clients pay with signed crypto transactions directly over HTTP.

When to Use

  • Building a paid API that accepts crypto micropayments
  • Adding paywall to web content or endpoints
  • Enabling AI agents to autonomously pay for resources
  • Integrating MCP tools that require payment
  • Building agent-to-agent (A2A) payment flows
  • Working with EVM (Base, Ethereum, MegaETH, Monad, Polygon, Stable, Arbitrum), Solana, Stellar, Aptos, NEAR, or XRPL payment settlement
  • Implementing usage-based billing with the upto scheme (LLM tokens, bandwidth, compute)
  • Running an in-process facilitator (self-facilitation) without external facilitator dependency

Core Architecture

Three roles in every x402 payment:

  1. Resource Server - protects endpoints, returns 402 with payment requirements
  2. Client - signs payment authorization, retries request with payment header
  3. Facilitator - verifies signatures, settles transactions on-chain

Payment flow (HTTP transport):

Client -> GET /resource -> Server returns 402 + PAYMENT-REQUIRED header
Client -> signs payment -> retries with PAYMENT-SIGNATURE header
Server -> POST /verify to Facilitator -> POST /settle to Facilitator
Server -> returns 200 + PAYMENT-RESPONSE header + resource data

Quick Start: Seller (TypeScript + Express)

import express from "express";
import { paymentMiddleware, x402ResourceServer } from "@x402/express";
import { ExactEvmScheme } from "@x402/evm/exact/server";
import { HTTPFacilitatorClient } from "@x402/core/server";

const app = express();
const payTo = "0xYourWalletAddress";

const facilitator = new HTTPFacilitatorClient({ url: "https://x402.org/facilitator" });
const server = new x402ResourceServer(facilitator)
  .register("eip155:84532", new ExactEvmScheme());

app.use(
  paymentMiddleware(
    {
      "GET /weather": {
        accepts: [
          { scheme: "exact", price: "$0.001", network: "eip155:84532", payTo },
        ],
        description: "Weather data",
        mimeType: "application/json",
      },
    },
    server,
  ),
);

app.get("/weather", (req, res) => {
  res.json({ weather: "sunny", temperature: 70 });
});

app.listen(4021);

Install: npm install @x402/express @x402/core @x402/evm

Quick Start: Buyer (TypeScript + Axios)

import { x402Client, wrapAxiosWithPayment } from "@x402/axios";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
import axios from "axios";

const signer = privateKeyToAccount(process.env.EVM_PRIVATE_KEY as `0x${string}`);
const client = new x402Client();
registerExactEvmScheme(client, { signer });

const api = wrapAxiosWithPayment(axios.create(), client);
const response = await api.get("http://localhost:4021/weather");
// Payment handled automatically on 402 response

Install: npm install @x402/axios @x402/evm viem

Quick Start: Seller (Python + FastAPI)

from fastapi import FastAPI
from x402.http import FacilitatorConfig, HTTPFacilitatorClient, PaymentOption
from x402.http.middleware.fastapi import PaymentMiddlewareASGI
from x402.http.types import RouteConfig
from x402.mechanisms.evm.exact import ExactEvmServerScheme
from x402.server import x402ResourceServer

app = FastAPI()

facilitator = HTTPFacilitatorClient(FacilitatorConfig(url="https://x402.org/facilitator"))
server = x402ResourceServer(facilitator)
server.register("eip155:84532", ExactEvmServerScheme())

routes = {
    "GET /weather": RouteConfig(
        accepts=[PaymentOption(scheme="exact", pay_to="0xYourAddress", price="$0.001", network="eip155:84532")],
        mime_type="application/json",
        description="Weather data",
    ),
}
app.add_middleware(PaymentMiddlewareASGI, routes=routes, server=server)

@app.get("/weather")
async def get_weather():
    return {"weather": "sunny", "temperature": 70}

Install: pip install "x402[fastapi,evm]"

Quick Start: Seller (Go + Gin)

import (
    x402http "github.com/x402-foundation/x402/go/v2/http"
    ginmw "github.com/x402-foundation/x402/go/v2/http/gin"
    evm "github.com/x402-foundation/x402/go/v2/mechanisms/evm/exact/server"
)

facilitator := x402http.NewHTTPFacilitatorClient(&x402http.FacilitatorConfig{URL: facilitatorURL})

routes := x402http.RoutesConfig{
    "GET /weather": {
        Accepts: x402http.PaymentOptions{
            {Scheme: "exact", Price: "$0.001", Network: "eip155:84532", PayTo: evmAddress},
        },
        Description: "Weather data",
        MimeType:    "application/json",
    },
}

r.Use(ginmw.X402Payment(ginmw.Config{
    Routes:      routes,
    Facilitator: facilitator,
    Schemes:     []ginmw.SchemeConfig{{Network: "eip155:84532", Server: evm.NewExactEvmScheme()}},
}))

Install: go get github.com/x402-foundation/x402/go/v2

Multi-Network Support (EVM + Solana)

Servers can accept payment on multiple networks simultaneously:

import { ExactEvmScheme } from "@x402/evm/exact/server";
import { ExactSvmScheme } from "@x402/svm/exact/server";

const server = new x402ResourceServer(facilitator)
  .register("eip155:84532", new ExactEvmScheme())
  .register("solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", new ExactSvmScheme());

// Route config with both networks
"GET /weather": {
  accepts: [
    { scheme: "exact", price: "$0.001", network: "eip155:84532", payTo: evmAddress },
    { scheme: "exact", price: "$0.001", network: "solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1", payTo: svmAddress },
  ],
}

Clients register both schemes and auto-select based on server requirements:

const client = new x402Client();
registerExactEvmScheme(client, { signer: evmSigner });
registerExactSvmScheme(client, { signer: svmSigner });

Supported Networks

NetworkCAIP-2 IDStatus
Base Mainneteip155:8453Mainnet
Base Sepoliaeip155:84532Testnet
MegaETH Mainneteip155:4326Mainnet (MegaUSD default, 18 decimals)
Solana Mainnetsolana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpMainnet
Solana Devnetsolana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1Testnet
Stellar Mainnetstellar:pubnetMainnet (TypeScript SDK only)
Stellar Testnetstellar:testnetTestnet (TypeScript SDK only)
Aptos Mainnetaptos:1Mainnet (TypeScript SDK only)
Aptos Testnetaptos:2Testnet (TypeScript SDK only)
Monad Mainneteip155:143Mainnet
Polygon Mainneteip155:137Mainnet
Polygon Amoyeip155:80002Testnet
Stable Mainneteip155:988Mainnet
Stable Testneteip155:2201Testnet
Arbitrum Oneeip155:42161Mainnet
Arbitrum Sepoliaeip155:421614Testnet
XDC Network Mainneteip155:50Mainnet (USDC)
XDC Apothem Testneteip155:51Testnet (USDC)
Mezo Mainneteip155:31612Mainnet (mUSD, 18 decimals, Permit2 + EIP-2612)
Mezo Testneteip155:31611Testnet (mUSD, Permit2 + EIP-2612)
Avalancheeip155:43114Runtime registration only (no default asset; community facilitators)
Radius Mainneteip155:723487Mainnet (SBC default)
Radius Testneteip155:72344Testnet (SBC default)
ADI Chaineip155:36900Mainnet (USDC.e default)
HPP Mainneteip155:190415Mainnet (Bridged USDC default)
HPP Sepoliaeip155:181228Testnet (Bridged USDC default)
TON Mainnettvm:-239Mainnet (jetton transfers; Python + TypeScript SDK)
TON Testnettvm:-3Testnet
Hedera Mainnethedera:mainnetMainnet (HBAR + HTS tokens)
Hedera Testnethedera:testnetTestnet
Algorand Mainnetalgorand:wGHE2Pwdvd7S12BL5FaOP20EGYesN73kMainnet (USDC ASA)
Algorand Testnetalgorand:SGO1GKSzyE7IEPItTxCByw9x8FmnrCDeTestnet (USDC ASA)
Keeta Mainnetkeeta:21378Mainnet (TypeScript SDK)
Keeta Testnetkeeta:1413829460Testnet (TypeScript SDK)
Concordium Mainnetccd:9dd9ca4d19e9393877d2c44b70f89acbMainnet (native CCD, 6 decimals; TypeScript SDK)
Concordium Testnetccd:4221332d34e1694168c2a0c0b3fd0f27Testnet (native CCD; TypeScript SDK)
Igra Mainneteip155:38833Mainnet (USDC, Permit2 only - no EIP-3009, no EIP-2612)
NEAR Mainnetnear:mainnetMainnet (NEP-141 USDC, relayer-sponsored; TypeScript SDK)
NEAR Testnetnear:testnetTestnet (TypeScript SDK)
XRPL Mainnetxrpl:0Mainnet (XRP + IOUs, no fee sponsorship; TypeScript SDK)
XRPL Testnetxrpl:1Testnet
XRPL Devnetxrpl:2Devnet

Algorand CAIP-2 ids changed. The reference is the URL-safe base64 genesis hash truncated to the first 32 characters. The older padded full-hash form (algorand:wGHE2Pwdvd7S12BL5FaOP20EGYesN73ktiC1qzkkit8=) no longer matches; SDKs normalize legacy ids on input, but emit the truncated form.

Default facilitator (https://x402.org/facilitator) supports Base Sepolia, Solana Devnet, Algorand Testnet, Stellar Testnet, Aptos Testnet, Hedera Testnet, and XRPL Testnet. On Base Sepolia it advertises exact, upto, and batch-settlement, plus the builder-code, eip2612GasSponsoring, and erc20ApprovalGasSponsoring extensions.

Not a production default. Upstream now states explicitly that the public x402.org facilitator is intended for development and testnet workflows - do not assume it is the default path for production mainnet routes. See the facilitator directory for production options.

SDK Packages

TypeScript v2.20.0 (npm, GitHub)

PackagePurpose
@x402/coreCore types, client, server, facilitator
@x402/evmEVM exact + upto schemes (EIP-3009, Permit2). Upto via @x402/evm/upto/* subpaths
@x402/svmSolana scheme (SPL TransferChecked)
@x402/stellarStellar scheme (SEP-41 Soroban token transfers)
@x402/aptosAptos scheme (Fungible Asset transfers)
@x402/avmAlgorand (AVM) scheme
@x402/hederaHedera scheme (HBAR + HTS fungible-asset transfers)
@x402/tvmTON scheme (jetton transfers)
@x402/keetaKeeta scheme (exact)
@x402/concordiumConcordium scheme (native CCD, exact)
@x402/nearNEAR scheme (NEP-366 SignedDelegate + NEP-141 ft_transfer, relayer-sponsored)
@x402/xrplXRPL scheme (payer-signed Payment, no fee sponsorship). Tagged 2.20.0 but not yet on npm - build from source
@x402/expressExpress middleware
@x402/fastifyFastify middleware
@x402/honoHono edge middleware
@x402/nextNext.js middleware
@x402/axiosAxios interceptor
@x402/fetchFetch wrapper
@x402/paywallBrowser paywall UI
@x402/mcpMCP client + server
@x402/extensionsBazaar, offer-receipt, payment-identifier, sign-in-with-x, gas sponsoring

Python v2.17.0 (PyPI, GitHub)

pip install "x402[httpx]"      # Async HTTP client
pip install "x402[requests]"   # Sync HTTP client
pip install "x402[fastapi]"    # FastAPI server
pip install "x402[flask]"      # Flask server
pip install "x402[evm]"        # EVM support
pip install "x402[svm]"        # Solana support
pip install "x402[tvm]"        # TON support
pip install "x402[mcp]"        # MCP integration
pip install "x402[extensions]" # Extensions (bazaar, gas sponsoring, etc.)
pip install "x402[all]"        # Everything

Convenience bundles: clients (httpx + requests), servers (flask + fastapi), mechanisms (evm + svm + tvm).

Go v2.20.0 (GitHub)

The Go module path carries a /v2 suffix - the bare .../x402/go path no longer resolves tagged releases.

go get github.com/x402-foundation/x402/go/v2

Java (Java 17+, GitHub)

A fourth official binding is in the repo (PaymentFilter, FacilitatorClient, X402HttpClient). Not published to a package registry yet - build from source.

Key Concepts

  • Client/Server/Facilitator: The three roles in every payment. Client signs, server enforces, facilitator settles on-chain. See references/core-concepts.md
  • Wallet: Both payment mechanism and identity for buyers/sellers. See references/core-concepts.md
  • Networks & Tokens: CAIP-2 identifiers, EIP-3009 tokens on EVM, SPL on Solana, custom token config. See references/core-concepts.md
  • Scheme: Payment method. exact = transfer exact amount; upto = authorize max, settle actual usage (shipping SDKs are EVM Permit2 only; a draft SVM binding via Solana payment channels is spec-stage); batch-settlement = commit at request time, settle asynchronously; auth-capture = escrow / authorize-then-capture with void, refund, reclaim. See references/evm-scheme.md, references/svm-scheme.md, references/stellar-scheme.md, references/upto-scheme.md, references/aptos-scheme.md, references/near-scheme.md, references/xrpl-scheme.md, references/protocol-spec.md
  • Self-facilitation: Run an in-process facilitator instead of calling an external URL. See references/typescript-sdk.md, references/go-sdk.md
  • Transport: How payment data is transmitted (HTTP headers, MCP _meta, A2A metadata). See references/transports.md
  • Extensions: Optional features (bazaar discovery, offer-receipt attestations, payment-identifier idempotency, sign-in-with-x auth, gas sponsoring, builder-code attribution, http-message-signatures, auth-hints). See references/extensions.md
  • Hooks: Lifecycle callbacks on client/server/facilitator (TS, Python, Go). See references/lifecycle-hooks.md
  • Protocol types: PaymentRequired, PaymentPayload, SettlementResponse. See references/protocol-spec.md
  • Custom tokens: Use registerMoneyParser for non-USDC tokens, Permit2 for non-EIP-3009 tokens. See references/evm-scheme.md
  • Mainnet deployment: Switch facilitator URL, network IDs, and wallet addresses. See references/core-concepts.md

References

FileContent
references/core-concepts.mdHTTP 402 foundation, client/server/facilitator roles, wallet identity, networks, tokens, custom token config, dynamic registration, self-hosted facilitator, mainnet deployment
references/protocol-spec.mdv2 protocol types, payment flow, facilitator API, error codes
references/typescript-sdk.mdTypeScript SDK patterns for server, client, MCP, paywall, facilitator
references/python-sdk.mdPython SDK patterns for server, client, MCP (server + client), facilitator
references/go-sdk.mdGo SDK patterns for server, client, MCP, facilitator, signers, custom money parser
references/evm-scheme.mdEVM exact scheme: EIP-3009, Permit2, default asset resolution, registerMoneyParser, custom tokens
references/svm-scheme.mdSolana exact scheme: SPL TransferChecked, verification rules, duplicate settlement mitigation
references/stellar-scheme.mdStellar exact scheme: SEP-41 Soroban token transfers, ledger-based expiration, fee sponsorship, TypeScript SDK only
references/upto-scheme.mdUpto (usage-based) scheme: authorize max amount, settle actual usage. EVM via Permit2 only
references/aptos-scheme.mdAptos exact scheme: fungible asset transfers, fee payer sponsorship, TypeScript SDK only
references/near-scheme.mdNEAR exact scheme: NEP-366 SignedDelegate, NEP-141 ft_transfer, relayer gas sponsorship, full-access-key requirement, NEP-145 storage registration
references/xrpl-scheme.mdXRPL exact scheme: payer-signed Payment, no fee sponsorship, explicit AssetAmount pricing, sequence vs ticketSequence
references/transports.mdHTTP, MCP, A2A transport implementations
references/extensions.mdBazaar, payment-identifier, sign-in-with-x, gas sponsoring (eip2612 + erc20) extensions
references/lifecycle-hooks.mdClient/server/facilitator hooks (TypeScript, Python, Go), hook chaining, MCP hooks

Official Resources

Frequently asked questions

What to verify before installation and use

What does the x402 source document cover?

x402 is an open standard (Apache-2.0) that activates the HTTP 402 Payment Required status code for programmatic, on-chain payments. Originally created by Coinbase, now maintained by the x402 Foundation. No accounts, sessions, or API keys required - clients pay with signed crypto…

How do I install x402?

The source record exposes this install command: npx skills add https://github.com/tenequm/skills --skill "skills/x402". Inspect the command and pinned source before running it.

Which permission-related actions were detected?

Static rules flagged network, exec-script in the source; the page lists the matching lines and excerpts.

Alternatives

Compare before choosing

Computed 9811,156

Jeffallan/claude-skills

fastapi-expert

Use when building high-performance async Python APIs with FastAPI and Pydantic V2. Invoke to create REST endpoints, define Pydantic models, implement authentication flows, set up async SQLAlchemy database operations, add JWT authentication, build WebSocket endpoints, or generate OpenAPI documentation. Trigger terms: FastAPI, Pydantic, async Python, Python API, REST API Python, SQLAlchemy async, JWT authentication, OpenAPI, Swagger Python.

Computed 961,074

TencentCloudBase/CloudBase-AI-Toolkit

cloudbase-agent-python

Build production-ready AI agent backends using the CloudBase Agent Python SDK — create agents with LangGraph/CrewAI/LlamaIndex, serve them via FastAPI with AG-UI protocol streaming + OpenAI-compatible endpoints, add tools (bash, filesystem, MCP, code execution), memory (in-memory, TDAI, MySQL, MongoDB), observability (OpenTelemetry/Langfuse), and middleware (auth, logging). Use this skill when the user wants to create an AI agent server, build a chatbot backend, set up human-in-the-loop workflow

Computed 9282

hookdeck/webhook-skills

linear-webhooks

Receive and verify Linear webhooks. Use when setting up Linear webhook handlers, debugging Linear signature verification, or handling Linear issue tracking events like Issue, Comment, Project, Cycle, IssueLabel, and IssueSLA create/update/remove actions.

Computed 926

gaelic-ghost/socket

diagnose-python-project

Diagnose Python uv sync, lock, import, test, Ruff, mypy, FastAPI, FastMCP, packaging, and CI failures with concrete phase classification and next checks.