Comprehensive guide for building x402 HTTP-native payment applications on Algorand using Python. This is the parent skill that aggregates all Python x402 sub-skills. Use when working with x402 payments in Python, building clients, servers, facilitators, or Bazaar discovery with Algorand x402, or when explaining x402 concepts to Python developers. Strong triggers include "x402 Python", "x402 Algorand Python", "x402-avm Python", "payment protocol Python", "402 payment Python", "x402 client httpx requests", "x402 server FastAPI Flask", "x402 facilitator Python", "x402 Bazaar discovery", "x402 core avm Python", "explain x402 Python", "teach x402".
This is the aggregated parent skill for all x402 HTTP-native payment protocol skills targeting Python. Use the reference files below to find detailed guidance for each component.
# Minimal AVM support
pip install x402-avm[avm]
# Server frameworks (pick one)
pip install x402-avm[avm,fastapi]
pip install x402-avm[avm,flask]
# HTTP clients (pick one)
pip install x402-avm[avm,httpx]
pip install x402-avm[avm,requests]
# Everything
pip install x402-avm[all]
Every component registers the AVM exact scheme unconditionally — no environment variable guards:
# Client
from x402_avm.mechanisms.avm.exact.client import register_exact_avm_scheme
register_exact_avm_scheme(client, signer=my_signer)
# Server
from x402_avm.mechanisms.avm.exact.server import register_exact_avm_scheme
register_exact_avm_scheme(server)
# Facilitator
from x402_avm.mechanisms.avm.exact.facilitator import register_exact_avm_facilitator
register_exact_avm_facilitator(facilitator, signer=my_signer, networks=ALGORAND_TESTNET_CAIP2)
Python algosdk's msgpack_decode() expects base64 strings, msgpack_encode() returns base64 strings. Boundary conversion: msgpack_decode(base64.b64encode(raw_bytes).decode()) / base64.b64decode(msgpack_encode(obj)).
Navigate to the appropriate reference based on your task. Each topic has three files:
{name}.md — Step-by-step implementation guide{name}-reference.md — API details and type signatures{name}-examples.md — Complete, runnable code samplesUnderstand x402-avm Python package structure, extras installation ([avm], [fastapi], [flask], [httpx], [requests], [all]), signer protocols, async vs sync variants, and algosdk encoding boundaries.
Build HTTP clients with httpx (async) or requests (sync) that automatically handle 402 payments. Covers wrapHttpxWithPayment, wrapRequestsWithPayment, ClientAvmSigner for payment signing.
Build payment-protected servers with FastAPI (async) or Flask (sync) middleware. Covers route pricing, PaymentMiddlewareASGI, Flask PaymentMiddleware, and multi-network support.
Build facilitator services that verify and settle Algorand payments on-chain. Covers FacilitatorAvmSigner protocol, register_exact_avm_facilitator, FastAPI facilitator endpoints (/verify, /settle, /supported), and Bazaar discovery extension for automatic cataloging and indexing of payment-gated APIs (declare_discovery_extension, extract_discovery_info, bazaar_resource_server_extension).
Use x402-avm core components and AVM mechanism directly for custom integrations. Covers x402Client, x402ResourceServer, x402Facilitator, AVM signer protocols, constants, utilities, transaction encoding, and fee abstraction.
| Install Extra | Purpose |
| ------------- | ------- |
| x402-avm[httpx] | Async HTTP client with automatic 402 payment handling |
| x402-avm[requests] | Sync HTTP client with automatic 402 payment handling |
| x402-avm[fastapi] | FastAPI async payment middleware |
| x402-avm[flask] | Flask sync payment middleware |
| x402-avm[avm] | Core AVM mechanism (signers, transaction builders, constants) |
| x402-avm[all] | All extras combined |
{name}.md file for step-by-step implementation guidance{name}-reference.md for API details{name}-examples.md for complete, runnable code samplesnpx skills add GoPlausible/algorand-x402-python下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer