How x402 requests work

Last updated
x402 lets an HTTP resource return a price as part of the request flow. The client can pay for one call without creating a subscription or keeping a prepaid balance with the individual provider.

The client sends a normal request to a discovered resource.
The resource returns HTTP 402 and a PAYMENT-REQUIRED header.
The client checks the amount, network, asset, destination and expiry.
A compatible wallet creates the authorization.
The client repeats the request with PAYMENT-SIGNATURE.
The resource returns the result and can include PAYMENT-RESPONSE.
Paying for one resource does not grant permission to read more conversation history, call a second paid resource or submit an onchain action. Each additional operation needs its own policy decision.
Last updated