x402 payments
x402 turns HTTP's reserved 402 Payment Required status into a working payment
flow: an agent requests a resource, receives a price, pays, and retries — one
protocol round trip, no checkout pages, no shared API keys.
The flow
- Agent requests a paid resource:
GET /reports/today - Server responds
402 Payment Requiredwith a structured price quote - Agent signs payment authorization locally (its key, its device)
- Agent retries the request with the payment header
- Server verifies via the Mints facilitator and serves the resource
Day-one scope
At launch, agents make explicit payments with mints pay. Automatic
sign-and-retry on 402 responses ships with the Forge SDK's agent.fetch()
integration — the middleware, client, and facilitator are part of the Mints
launch surface.
Accepting x402 payments
Merchants add the Mints x402 middleware to any HTTP service: declare a price for a route, and the middleware handles quoting, verification, and settlement receipts.