What the x402 payments kit does
This kit helps you take payments from AI agents using x402, the protocol that turns the old HTTP 402 Payment Required status into a real, automatic payment rail. It has three parts: a plain-English explainer, a config generator that produces the 402 response and Next.js middleware to make an endpoint pay-per-call, and a checker that tells you whether a URL is already x402-payable.
Why x402 matters
As autonomous AI agents start doing real work, they need to pay for things, an API call, a dataset, a piece of premium content, without a human at a checkout. x402 makes that possible in a single HTTP round-trip. Adoption moved fast: 165M+ transactions by early 2026, with Stripe, AWS Bedrock AgentCore and Google's AP2 building around agentic payments. Being able to charge agents directly is a brand-new revenue channel.
The flow
- An agent requests your endpoint.
- Your server responds 402 Payment Required with machine-readable terms (price, asset, network, wallet).
- The agent pays (typically USDC) and retries with proof.
- Your server verifies and returns the data.
How to use it
- Make an endpoint payable: enter your endpoint, price, network and wallet, then copy the 402 response and the Next.js middleware.
- Check readiness: paste any URL to see whether it already returns an x402 payment challenge.
Good to know
- x402 currently settles mostly in stablecoins (e.g. USDC on Base); you need a receiving wallet.
- The generated code is an accurate starting point, verify against x402.org and your facilitator before going live.
- Being payable complements being findable and licensable, see the Agentic Commerce Checker and RSL License Generator.