$npx skillfedfor your agent

x402

x402 Payment Protocol SDK for Python

With conditionsPyPI WWW/HTTPReleased Aug 2026180.1K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — x402-2.19.0-py3-none-any.whl
v2.19.0 · released 2026-08-11 · Python >=3.10 · 3 runtime deps: nest-asyncio, pydantic, typing-extensions

Yes, if you are building a service that needs HTTP 402 payment protocol support with blockchain settlement. The SDK is actively maintained, has low install friction, and covers the major blockchains. However, the Alpha status and recent first release (February 2025) mean the protocol and API may still evolve—use in production only after reviewing the security model and testing thoroughly with your blockchain of choice.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.10+.
  • Optional extras (httpx, requests, fastapi, flask, evm, svm, tvm) must be installed separately depending on your transport and blockchain choice.
  • Low friction: pure Python wheel with only three runtime dependencies (nest-asyncio, pydantic, typing-extensions).

License · maintenance · safety

MIT (permissive) — MIT license (permissive) places no restrictions on commercial or proprietary use, modification, or distribution.

last release 2026-08-11 (3 days) · last repo commit 2026-08-14 · 6,502 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 180,138 downloads/mo, #10,153 on PyPI

Verify before relying

pip install x402[evm]
from x402 import x402Client
from x402.mechanisms.evm.exact import ExactEvmScheme

client = x402Client()
client.register("eip155:*", ExactEvmScheme(signer=my_signer))
payload = await client.create_payment_payload(payment_required)
  • Whether the protocol is finalized or still evolving (Alpha status suggests ongoing changes).
  • Production readiness and security audit status for blockchain payment handling.
  • Specific performance characteristics and throughput limits for payment verification.
Same gist for agents: .md · .json

What it is and what it does

x402 is a Python SDK implementing the x402 payment protocol, a standard for HTTP 402 (Payment Required) responses that bridges web services with blockchain payments. It provides three main roles—client (initiates payments), resource server (enforces payment requirements), and facilitator (settles transactions)—each with async and sync variants. The protocol is transport-agnostic and supports multiple blockchains: EVM networks (Ethereum, Base, etc.), Solana, and TON/TVM.

You use it to add cryptographic payment verification to web services without building blockchain integration from scratch. Register payment schemes for your target networks, define payment requirements (amount, recipient, network), and the SDK handles signature generation, verification, and settlement. It integrates with FastAPI and Flask via middleware, works with httpx or requests for HTTP clients, and auto-detects async vs. sync contexts. The library is young (first release February 2025) but actively maintained and designed for declarative configuration via policies and lifecycle hooks.

Use it for

  • Protect API endpoints with blockchain-backed micropayments (e.g., charge per API call in USDC on Base).
  • Build a content delivery service that requires payment in Solana before serving resources.
  • Implement a facilitator node that verifies and settles x402 payments across multiple blockchains.
  • Add pay-per-use billing to a FastAPI service with EVM wallet signatures.
  • Create a cross-chain payment gateway supporting EVM, Solana, and TON in a single codebase.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you are building a service that needs HTTP 402 payment protocol support with blockchain settlement.

The SDK is actively maintained, has low install friction, and covers the major blockchains. However, the Alpha status and recent first release (February 2025) mean the protocol and API may still evolve—use in production only after reviewing the security model and testing thoroughly with your blockchain of choice.

Install

x402 on PyPI

Before you install

Low friction: pure Python wheel with only three runtime dependencies (nest-asyncio, pydantic, typing-extensions). Active maintenance—released 3 days ago with 6502 repository stars and continuous commits.

Requires Python 3.10+. Optional extras (httpx, requests, fastapi, flask, evm, svm, tvm) must be installed separately depending on your transport and blockchain choice.

License in practice

MIT license (permissive) places no restrictions on commercial or proprietary use, modification, or distribution.

Quickstart

pip install x402[evm]
from x402 import x402Client
from x402.mechanisms.evm.exact import ExactEvmScheme

client = x402Client()
client.register("eip155:*", ExactEvmScheme(signer=my_signer))
payload = await client.create_payment_payload(payment_required)

Verify before relying

  • Whether the protocol is finalized or still evolving (Alpha status suggests ongoing changes).
  • Production readiness and security audit status for blockchain payment handling.
  • Specific performance characteristics and throughput limits for payment verification.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
3 packages
nest-asynciopydantictyping-extensions
MaintenanceActively maintained 3 days since the last release
Last repo commit
First released
Downloads180,138 / month, #10,153 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Typing :: Typed

Evidence: x402-2.19.0-py3-none-any.whl

Tags

Capabilities
http 402 payment protocolblockchain payment sdkevm solana ton paymentsasync payment client serverx402 protocol implementation
Topics
blockchain-paymentshttp-402-protocolasync-sync-dual
PyPI keywords
402httppaymentprotocolx402

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “http 402 payment protocol”

  • x402Implements the x402 payment protocol with transport-agnostic client,…
  • traia-iatpAdds HTTP 402 Payment Required protocol support to AI agents and…
  • braintreeProvides Python bindings to the Braintree payment gateway, enabling…

Give your agent the search over MCP, or paste the wish link into any chat.

More WWW/HTTP packages

urllib3 Worth it
PyPI · Libraries · released May 2026

urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.

MITpure Python · 3.10+
1.8Bdownloads / mo
requests Worth it
PyPI · Libraries · released May 2026

Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.

Apache-2.0pure Python · 3.10+
1.8Bdownloads / mo
h11 With conditions
PyPI · WWW/HTTP · released Apr 2025

h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.

MITpure Python · 3.8+aging
894.9Mdownloads / mo
httpx Worth it
PyPI · WWW/HTTP · released Dec 2024

HTTPX is a fully featured HTTP client library for Python that provides both sync and async APIs, with support for HTTP/1.1 and HTTP/2, plus an integrated command-line client.

Install it if you are building new projects or modernizing existing ones that rely on HTTP.

BSD-3-Clausepure Python · 3.8+
797.0Mdownloads / mo
httpcore With conditions
PyPI · WWW/HTTP · released Apr 2025

A minimal low-level HTTP client library that sends HTTP requests with thread-safe and task-safe connection pooling, supporting HTTP/1.1, HTTP/2, proxies, and both sync and async interfaces.

BSD-3-Clausepure Python · 3.8+aging
783.6Mdownloads / mo
aiohttp Worth it
PyPI · WWW/HTTP · released Jul 2026

aiohttp is an async HTTP client and server framework built on asyncio, supporting both WebSockets and middleware-based routing for building concurrent web applications.

Install it if you need async HTTP client or server capabilities in asyncio-based applications.

permissive licensecompiled wheel · 3.10+
643.6Mdownloads / mo

See also traia-iatp · cdp-sdk · py-evm · solana · solders · xrpl-py · pytoniq-core-fork · eip712 · paypalrestsdk · Adyen