Skip to content

What is x402?

x402 is a protocol for HTTP-native payments. A paid resource can respond with:

HTTP 402 Payment Required

The response tells the client:

  • how much to pay
  • which asset to use
  • where to send payment
  • how to retry with payment proof

AllowKit helps AI agents handle this flow safely using allowances and policies.

Client requests resource
↓
Server returns 402 Payment Required
↓
Client pays
↓
Client retries request with proof
↓
Server returns resource

Cloudflare Monetization Gateway lets resource owners charge AI agents per request at the edge, settled over x402 — APIs, datasets, pages, and MCP tools can all return 402 instead of a free response. That solves the seller side. AllowKit solves the buyer side: how much an agent is allowed to pay, to whom, and under whose approval, before it ever sends that payment.

One-liner: Cloudflare builds the toll booth. AllowKit gives agents the allowance card.

Next: Pay x402 resources walks through the target integration shape.