What problem does it solve? Monetizing API endpoints requires building payment verification, settlement, and request interception logic from scratch. This Skill guides you through adding x402 payment middleware to FastAPI or Flask servers so clients pay in USDC on Algorand before accessing protected routes. ## Core Features & Use Cases - Framework-Specific Middleware Setup: Configure async middleware for FastAPI (PaymentMiddlewareASGI) or sync middleware for Flask (PaymentMiddleware) with matching facilitator clients and resource servers. - Flexible Route Pricing: Define per-route payment requirements using simple string prices like "$0.01" or explicit AssetAmount values with USDC ASA IDs, including wildcard path patterns. - Multi-Network Support: Accept payments across Algorand, EVM, and Solana networks by registering multiple schemes on a single resource server. - Use Case: You have a weather data API built with FastAPI. Use this Skill to protect the /api/weather route so clients must pay $0.01 in USDC on Algorand Testnet before receiving data, while leaving your /health endpoint free. ## Quick Start Ask the AI to create a FastAPI server with x402 payment middleware that charges $0.01 in Algorand USDC for access to a weather endpoint.