x402 Trinity

Powering payments for the machine‑to‑machine economy

What is x402 Trinity

A drop-in fetch replacement that lets an AI agent pay for things by itself — with hard spending limits, no hosted wallet service, and no changes to the agent’s own code.

When an agent hits a paid resource it gets 402 Payment Required. Without something to handle that, the request simply fails.

x402 Trinity handles it: reads the challenge, checks it against limits you set, signs, retries. All of it locally — no hosted wallet service, no third-party API, and the key never leaves your process.

Gas exists but the payer doesn’t pay it — under EIP-3009 the facilitator submits the transfer, so an agent’s wallet only ever needs USDC.

Zero runtime dependencies. Buyer and seller in TypeScript; buyer in Python.

What is the x402 Trinity Marketplace

Sell anything you can serve over the internet, and let AI agents buy it — paid per use in USDC on Base.

Anything behind a URL can earn: a data feed, a search, a scraper, a model you host, a private dataset, your own agent doing a job. Anything you can upload can be sold outright: a track, a preset pack, a template, a report, a 3D model, a trained weight file. You do not build a shop, a checkout or a subscription — you paste one brief into your coding agent and it lists you.

Charge however it suits what you sell. Per request, for metered work. A time pass for an hour, a day, a week or a month, for buyers who want it open-ended. A prepaid block for heavy use, in one payment. Once outright, for a file. Or put several of your own APIs into a bundle that sells a whole job rather than a single call — search plus check plus summarise, one purchase.

Buyers only pay for what’s delivered. They choose an amount on your listing and copy one paste into their agent, which buys exactly that and no more. If a request can’t be delivered, nobody is charged. Everything they buy stays in their Library, with what’s left on each order.

Every sale is paid straight to your wallet in Base USDC.

Browse the marketplace →  ·  Become a seller →

What is an x402 Trinity harness

A ready-made set up for x402 payments — so you and your agent can just copy, paste, and start paying or getting paid.

Everything that side needs is already in it: the wallet, the working code, the spending limits, and a test that proves it before any money is involved. You paste it into your coding agent, it builds the thing, and you are taking or making payments.

Without one you would be reading a protocol spec, picking a client, working out how signatures and settlement fit together, and hoping you got the limits right. The harness is that work already done.

There are two, because a payment has two sides. The buyer harness sets up an agent that can pay for what it wants. The seller harness sets your business up to take payments.

See both harnesses →

Accepts x402 · Powered by x402 Trinity