Build & Earn
Build your first x402 API
A competent developer should leave this page with a working unpaid 402 and a deterministic paid handler.
Use the Hello x402 reference in this repository: unpaid requests return a v2 challenge; paid requests echo a bounded text payload.
Wire it behind any HTTP server. Do not load a seller private key. In production, use an authenticated facilitator and a durable ledger — Foundry’s own receive-only gates exist for that, and they are not this tutorial.