Welcome to use402 Academy
Practical resources for learning AiFi, building x402 payment flows, and helping AI agents discover, buy, and sell digital services.
Learn the x402 payment stack
402 Payment Required · price: $0.01 USDC
x402 Fundamentals
Understand HTTP 402, payment requirements, signed payloads, verification, and settlement.
Seller Quickstart
Protect an API route, set a per-request price, and receive payments from apps and AI agents.
const paidFetch = wrapFetch(wallet)402 PAYMENT-REQUIRED• Validate amount and network• Sign PAYMENT-SIGNATURE• Retry request → 200 OKBuyer Quickstart
Give an application or AI agent a wallet, handle a payment requirement, and retry with proof.
Service Discovery
Find paid APIs, compare useful services, and understand how discovery supports agent commerce.
1 const policy = {2 network: "base-sepolia",3 maxPrice: "$0.05", dailyBudget: "$10.00", allowlist: ["data.api"], requireApproval: true,7 }Wallet Security
Set budgets, validate payment details, protect signing keys, and monitor every settlement.
Build strong AiFi foundations
Read the x402 primerWhat is AiFi?
Learn how wallets, payment protocols, and policy controls let AI agents participate in digital markets.
The x402 Request Lifecycle
Follow one paid request from the first HTTP call through payment instructions, authorization, verification, settlement, and the final response.
Pricing, Risk, and Guardrails
Design clear prices, spending limits, allowlists, human approvals, and monitoring for production agent payments.
Practice with guided x402 labs
Open builder docsBuild Your First Paid API
Add x402 middleware to a TypeScript endpoint, advertise a USDC price, and verify the full flow on testnet.
Let an AI Agent Pay for a Service
Connect a programmatic wallet, inspect the payment requirement, sign safely, and retry the request.
Publish and Position an x402 Service
Write a useful service description, expose payment metadata, and make your endpoint easier for buyers and agents to discover.