← Back to blog

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

March 31, 2026  ·  Proco Team  ·  6 min read

Forbes recently published a video asking a deceptively simple question: how do AI agents actually pay for things? Watch it here.

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 has serious backing — Coinbase, Cloudflare, Google, Anthropic, AWS, and Visa are all building on it. Since May 2025, AI agents have already made over 107 million transactions using the standard. This isn't a whitepaper concept. It's live infrastructure.

Why a standard alone isn't enough

As Forbes notes, Coinbase CEO Brian Armstrong has made the point directly: AI agents can't open a bank account. But they can own a crypto wallet. That one sentence explains more about the next decade of payments than most whitepapers.

McKinsey projects that AI agents will mediate between $3 trillion and $5 trillion in commerce by 2030 — a number larger than the entire current crypto market cap. But an agent that can speak x402 still needs more than the protocol. It needs:

None of this comes out of the box with x402 alone. That's what we built.

Introducing procohq/pay and procohq/lab

Today we're open-sourcing two projects that give developers the complete infrastructure layer for AI agent payments.

procohq/pay is the payment infrastructure layer. 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.

TypeScript
import { procoX402Middleware } from '@proco/pay/express'

app.use(procoX402Middleware({
  apiKey: process.env.PROCO_API_KEY,
  routes: {
    'GET /data':     { amount: 1_00, currency: 'USDC' },
    'POST /analyze': { amount: 5_00, currency: 'USDC' },
  }
}))

Payment policies fire atomically before any transaction reaches the chain:

TypeScript
const wallet = await proco.wallets.create({
  agentId: 'research-agent-01',
  policies: {
    dailyCap:  50_00,
    vendors:   ['api.example.com'],
    currency:  'USDC'
  }
})

procohq/lab is the free developer environment for testing it. Runs on Base Sepolia with testnet USDC — no credit card, no real money.

bash
git clone https://github.com/procohq/lab
cd lab && npm install && cp .env.example .env

npm run server   # x402-compatible API on localhost:4402
npm run x402     # watch an agent pay, get access, settle on-chain
npm run policy   # test spending caps, allowlists, per-tx limits

Three scripts that walk through the full payment lifecycle in under ten minutes.

Why open source

The machine economy only works if the rails are open. Agents built by different teams, running in different frameworks, need to transact with each other across a shared standard. That requires infrastructure anyone can read, fork, audit, and build on.

Forbes asked how AI agents pay for things. The answer is: with open protocols, programmable wallets, and infrastructure built purely for them. We're open-sourcing ours because that's how trust gets established in infrastructure — not with a pitch deck, but with code.

procohq/pay on GitHub — payment infrastructure for AI agents procohq/lab on GitHub — free developer environment, no credit card Start building on Proco — production API and wallet dashboard

Start building with open rails.

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

procohq/pay → Try the dev environment