Etoolio

x402 Agentic Payments Kit

Free x402 agentic payments kit. Understand x402, generate the HTTP 402 response and Next.js middleware to make an endpoint pay-per-call for AI agents, and check whether any URL is already x402-payable.

x402: payments over HTTP 402

x402 revives the long-dormant HTTP 402 Payment Required status so software, including AI agents, can pay for an API call or piece of content automatically, with no account, API key or human checkout. It went from experiment to real adoption fast: 165M+ transactions by early 2026, with Stripe, AWS Bedrock AgentCore and Google's AP2 building around agentic payments.

The flow

  1. An agent requests your endpoint.
  2. Your server replies 402 Payment Required with machine-readable payment terms (price, asset, network, your wallet).
  3. The agent pays (typically a stablecoin like USDC) and retries the request with proof of payment.
  4. Your server verifies the payment and returns the data.

The result: your API or content can earn money from autonomous agents directly, per call, in seconds. This kit generates the 402 response and server middleware, and checks whether a URL is already x402-payable.

Being payable pairs with being findable, see the Agentic Commerce Checker and RSL License Generator.

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

  1. An agent requests your endpoint.
  2. Your server responds 402 Payment Required with machine-readable terms (price, asset, network, wallet).
  3. The agent pays (typically USDC) and retries with proof.
  4. 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.

Good to know

x402 Agentic Payments Kit, frequently asked questions

What is x402?

x402 is a protocol that uses the HTTP 402 'Payment Required' status to let software, especially AI agents, pay for an API call or piece of content automatically, with no account or human checkout. Your endpoint returns machine-readable payment terms, the client pays (typically a stablecoin like USDC) and retries with proof. It went from experiment to 165M+ transactions by early 2026, with Stripe, AWS and Google building agentic-payment support around it.

How do I make my API pay-per-call?

Use the generator tab: enter your endpoint, price, network and receiving wallet, and it produces the HTTP 402 response body and a ready Next.js middleware (using the x402-next package) that gates the route behind payment. Drop the middleware into your app, set your wallet, and the route becomes payable by agents.

How does the 'can agents pay you?' checker work?

Enter any endpoint URL and it checks whether the server responds with an x402 payment challenge, an HTTP 402 with recognisable payment requirements. Most endpoints today are not yet payable, which is expected for such a new standard; the check confirms whether yours (or a service you want to use) supports x402.

Do I need crypto to use x402?

x402 today settles mostly in stablecoins such as USDC on networks like Base. You need a receiving wallet address to accept payments. The standard is payment-rail-agnostic in principle, and traditional-payment integrations are emerging, but the current common path is stablecoins.

Is this production-ready code?

It's an accurate starting point based on the x402 spec and the x402-next package, but verify against x402.org and your chosen facilitator before going live, and handle verification and error cases. Amounts assume a 6-decimal stablecoin.

Is it free?

Yes, free with no signup. The explainer and generators run in your browser; the checker makes a simple public request to the URL you enter.