create-python-x402-server
Installation
SKILL.md
Creating x402 Payment-Protected Servers in Python
Build FastAPI (async) or Flask (sync) servers that protect API endpoints behind Algorand USDC payments using x402 middleware.
Prerequisites
Before using this skill, ensure:
- Python 3.10+ is installed
- An Algorand address to receive payments (the
payToaddress) - A facilitator URL -- use
https://x402.org/facilitatoror run your own - Understanding of FastAPI or Flask basics
Core Workflow: Middleware-Based Payment Protection
The middleware intercepts requests to protected routes, checks for payment headers, verifies payments through the facilitator, and settles on success.