x402_skill

This skill helps you implement and manage x402 payments over HTTP 402 for paid APIs, paywalls, and AI workflows across multiple networks.
  • Python

14

GitHub Stars

4

Bundled Files

2 months ago

Catalog Refreshed

3 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill tenequm/claude-plugins --skill x402

  • CHANGELOG.md143 B
  • package.json319 B
  • project.json200 B
  • SKILL.md10.0 KB

Overview

This skill helps developers implement x402, an open protocol that uses HTTP 402 Payment Required for programmatic on-chain micropayments. It provides SDK examples and middleware for TypeScript, Python, and Go across EVM (Base) and Solana, plus HTTP, MCP, and agent-to-agent transports. Use it to build paid APIs, paywalls, and autonomous agent payment flows without accounts or API keys.

How this skill works

The skill inspects incoming requests and responds with a 402 plus payment requirements when an endpoint is paywalled. Clients sign a payment authorization and resend the request with a PAYMENT-SIGNATURE header. The server verifies the signature with a facilitator which settles the on-chain transfer, then returns the resource and a PAYMENT-RESPONSE header. SDKs include client, server, and facilitator components and support multiple network schemes and transports.

When to use it

  • You need a pay-per-request API that accepts crypto micropayments
  • Adding a programmable paywall to web endpoints or content
  • Enabling AI agents to autonomously purchase resources or services
  • Implementing agent-to-agent (A2A) or MCP-based payment flows
  • Supporting multi-network settlement (Base/EVM and Solana)

Best practices

  • Register appropriate scheme implementations (EVM exact, Solana exact) on the resource server for each supported network
  • Run a facilitator you control or point to a trusted facilitator and update network IDs and wallet addresses for mainnet
  • Use SDK middleware (Express, FastAPI, Gin) to minimize integration errors and ensure correct 402 + header behavior
  • Test flows end-to-end on testnets (Base Sepolia, Solana Devnet) before switching facilitator and networks to mainnet
  • Provide clear route metadata (price, network, payTo, mimeType) so clients can auto-select schemes

Example use cases

  • Paid API endpoints that bill per call (weather, data, compute)
  • Paywalled JSON/HTML endpoints for content publishers using crypto micropayments
  • AI agent workflows where agents pay for external APIs or compute autonomously
  • MCP integrations that attach payment metadata to messages for settlement
  • Multi-network services that accept Base/EVM or Solana depending on buyer preference

FAQ

No. Clients sign on-chain payment authorizations and send them directly; no centralized API keys or sessions are required.

Which transports does x402 support?

x402 supports HTTP headers, MCP metadata, and agent-to-agent (A2A) metadata transports for passing payment data.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
x402 skill by tenequm/claude-plugins | VeilStrat