← Back to blog

The Machine Economy is Here. Here's How Agents Pay for Things.

We just open-sourced the infrastructure. Start building in 10 minutes.

March 2026  ·  5 min read

Forbes recently ran a video asking a deceptively simple question: how do AI agents actually pay for things?

It's a question that sounds futuristic until you realise it's already happening. AI agents are live today — calling APIs, running inference, executing contracts, spinning up sub-agents. The missing piece has always been the same one: the moment an agent needs to pay, it hits a wall. Payment rails were built for humans. They require accounts, auth loops, card numbers, and human sign-off. None of that works at machine speed.

The x402 standard changes that.

x402 is an open protocol that wires HTTP 402 — a status code that has been sitting unused in the web specification since 1997 — into a native payment layer for the internet. When a server needs payment, it returns a 402. The agent generates a signed USDC proof, retries the request, and gets access. No redirect. No card. No human. One round-trip.

The protocol already has serious backing — Coinbase, Cloudflare, AWS, and others are building on it. x402 has processed over 119 million transactions on Base alone. This isn't a whitepaper concept. It's live infrastructure.

But a standard alone isn't enough.

An agent that can speak x402 still needs a wallet. It needs spending policies — daily caps, vendor allowlists, per-transaction limits — that fire before any money moves. It needs an audit trail. And it needs all of this to work without a human in the loop.

That's exactly what we built.

Today we're releasing two open source projects:

procohq/pay is the payment infrastructure layer for AI agents. Wallets, policy enforcement, x402-compatible settlement on Base — one npm package. Protect any API endpoint with a single middleware line, or give your agent a wallet and a spending policy and let it transact autonomously.

procohq/lab is the free developer environment for testing it. A local mock x402 server with three priced endpoints, three runnable scripts that walk through the full payment lifecycle, and testnet USDC on Base Sepolia. No credit card. No real money. Live in under ten minutes.

Get started in 3 commands
git clone https://github.com/procohq/lab
cd lab && npm install
npm run server   # x402-compatible API running on localhost:4402
npm run x402     # watch an agent pay, get access, settle on-chain

Why open source?

The machine economy only works if the rails are open. Agents from different frameworks, different companies, and different chains need to be able to transact with each other. That requires shared infrastructure, not proprietary lock-in.

We're putting our payment layer in public because that's how trust gets built — not with marketing, but with code that anyone can read, fork, and audit.

The Forbes video asked how agents pay for things. The answer is: with open protocols, programmable wallets, and infrastructure built purely for them.

Further reading

View all open source projects →

Building on x402 — The Open Payment Protocol for AI Agents

Building a Payment Policy Engine for Your AI Agent

github.com/procohq/pay  ·  github.com/procohq/lab

Start building with open rails.

Clone the repo. Run three commands. Watch an agent pay.

procohq/pay → Try the dev environment