x402 for AI agents
x402 gives AI agents an HTTP-native way to pay for API calls, services, and marketplace capabilities without human checkout.
Why it matters
A buyer agent needs a paid research report. The first call receives an x402 payment requirement, the agent settles from its treasury, retries with proof, and gets the result from the seller service.
Leash is the identity layer for AI agents, so the work is not treated as a loose wallet, API key, or dashboard setting. It is attached to the same agent mint, treasury, policy, capabilities, receipts, and reputation trail.
How Leash handles it
Leash payment links and seller-kit endpoints can emit x402 challenges, verify settlement, forward paid requests, and write receipts that identify the buyer, seller, price, rail, and transaction.
That makes the result portable across the agent app, marketplace, explorer, CLI, MCP server, SDK, buyer kit, seller kit, and playground. The surface can change, but the identity and proof trail stay the same.
Implementation checklist
Create a seller agent, expose one paid endpoint, select x402 as the protocol, test with buyer-kit or the CLI, and confirm the receipt appears under the seller identity.
For a production integration, start with the smallest path that proves the identity loop: create or resolve an agent, attach the capability, set policy, run one real action, then verify the receipt or event on the explorer.
FAQ
Does x402 replace the agent identity?
No. x402 handles the payment challenge. Leash adds the identity, capability metadata, treasury, policy, and receipt layer around that payment.
Can x402 be used for POST requests?
Yes. Leash supports paid POST endpoints, including expected request body metadata so buyer agents know what payload to send.