Agentic Commerce: How to Build an App AI Agents Can Pay For
A plain-English guide to agentic commerce in 2026: what x402, ACP, and the Machine Payments Protocol do, plus a weekend walkthrough for shipping a paid API that AI agents can buy from.
Pare de configurar. Comece a construir.
Templates SaaS com orquestração de IA.
AI agents now hold wallets and pay for things on their own. Coinbase's x402 protocol passed 165 million transactions across roughly 69,000 active agents by late April 2026 (AWS for Industries, Apr 2026). Stripe, OpenAI, AWS, and Coinbase have all shipped payment rails for machines this year. The under-discussed move is not selling to agents at scale. It is building a small paid API that an agent can discover and pay for in one HTTP round trip, and you can ship that this weekend.
Pare de configurar. Comece a construir.
Templates SaaS com orquestração de IA.
What is agentic commerce?
Agentic commerce is software that lets AI agents discover, authorize, and pay for goods, services, and APIs without a human clicking a button each time. Instead of a person entering a card number, the agent carries a constrained wallet and settles payment programmatically over an open protocol.
There are two sides to it. The first is selling through agents: a shopper tells ChatGPT to buy running shoes and the agent completes checkout with a merchant on the buyer's behalf. The second, and the one most builders are sleeping on, is selling to agents: you expose a paid API, dataset, or tool, and other people's agents pay you per call to use it.
Stripe used its Sessions 2026 conference to lean into this hard, announcing 288 new products and features built around what it calls economic infrastructure for AI (Stripe blog, 2026). The short version: machine-to-machine payments stopped being a thought experiment in 2026 and became plumbing.
How do AI agents pay for things? (x402, ACP, MPP)
Agents pay through three open standards that launched or matured in 2026: x402 for per-request micropayments, ACP for agent-driven checkout at merchants, and MPP for programmatic agent-to-business payments through Stripe. They overlap but solve different problems.
x402 (Coinbase + Cloudflare). This revives the long-dormant HTTP 402 Payment Required status code as a real payment standard. An agent requests a resource, the server replies 402 with payment instructions in a header, the agent signs a stablecoin payment (USDC) and retries with that signature, and the server delivers the resource once a facilitator verifies settlement (Coinbase docs, 2026). It is built for tiny payments: think a tenth of a cent per API call. By late April 2026 around 69,000 active agents had run over 165 million transactions worth roughly $50M (AWS for Industries, Apr 2026). In April 2026 governance moved to the Linux Foundation with backing from Circle, Google, Microsoft, Stripe, and Visa (crypto.news, 2026).
ACP, the Agentic Commerce Protocol (OpenAI + Stripe). This is the checkout standard behind Instant Checkout in ChatGPT. It defines how an agent browses a product feed, manages a cart, and delegates payment so a merchant stays the merchant of record. It is Apache 2.0 licensed and the spec is public (ACP on GitHub, 2026). ChatGPT users in the US can buy from US Etsy sellers in chat, with Shopify merchants rolling out (OpenAI, 2026). Use ACP when you sell physical or catalog products and want agents to check out on a buyer's behalf.
MPP, the Machine Payments Protocol (Stripe + Tempo). Announced March 18, 2026, MPP is Stripe's open standard for agents to pay a business programmatically: microtransactions, recurring payments, stablecoins, and fiat through cards, Klarna, and Affirm (Stripe blog, Mar 2026). It rides on Stripe's existing PaymentIntents API through Shared Payment Tokens, so payments show up in your Stripe Dashboard like any other charge and settle in your default currency on your normal payout schedule.
A rough way to choose: x402 for cheap pay-per-call API access settled in stablecoins, MPP when you want agent payments to land in your existing Stripe account, ACP when an agent is buying products from your storefront.
What is AWS Bedrock AgentCore Payments?
AgentCore Payments is a managed AWS service, launched in preview on May 7, 2026, that lets an AI agent autonomously pay for APIs, MCP servers, paywalled content, and other agents. It speaks x402 under the hood and was built with Coinbase and Stripe (AWS What's New, 2026).
It matters because it handles the buyer side of the wallet for you: agents get built-in wallet management, policy-based spending controls, and a full audit trail, with stablecoin payments settling in roughly 200 milliseconds on Base (AWS ML blog, 2026). The preview shipped in four regions: US East (N. Virginia), US West (Oregon), Europe (Frankfurt), and Asia Pacific (Sydney).
For a builder, the takeaway is that the buyers are real and growing. AWS, OpenAI, and Coinbase have all handed agents a way to spend money. If you put up a paid endpoint that speaks x402, those agents can find and pay for it without anyone writing custom integration code on the buyer side.
How to build an app agents can buy from
Problem: You want recurring revenue from an API or tool, but signing up human customers, building a billing portal, and chasing invoices is weeks of work for an unproven idea.
Quick Win: Wrap one valuable endpoint in x402 payment middleware. Agents pay USDC per request, settlement is handled by a facilitator, and you never build a login or a subscription screen. You can have it live on testnet in an afternoon.
The plan is simple. You take an Express server, add x402 middleware that gates one route behind a price, point it at a facilitator that verifies on-chain settlement for you, and give it a wallet address to receive USDC. Start on Base Sepolia testnet so payments are free fake money while you build, then flip two values to go live on Base mainnet.
First, install the x402 server packages alongside Express.
npm install express @x402/express @x402/evm @x402/coreNext, the full server. The middleware intercepts requests to GET /risk-profile, returns a 402 with payment instructions when there is no valid payment, and only calls your handler once the facilitator confirms the agent paid. The payTo address is the wallet that receives USDC. The network identifier eip155:84532 is Base Sepolia testnet using CAIP-2 format.
import express from "express";
import { paymentMiddleware, x402ResourceServer } from "@x402/express";
import { ExactEvmScheme } from "@x402/evm/exact/server";
import { HTTPFacilitatorClient } from "@x402/core/server";
const app = express();
// The wallet that receives USDC. Use a fresh address you control.
const payTo = "0xYourReceivingAddress";
// Testnet facilitator. No signup, no API keys.
const facilitatorClient = new HTTPFacilitatorClient({
url: "https://x402.org/facilitator",
});
// Register the "exact amount" payment scheme on Base Sepolia (eip155:84532).
const server = new x402ResourceServer(facilitatorClient).register(
"eip155:84532",
new ExactEvmScheme(),
);
// Gate the route behind a price. Everything else stays free.
app.use(
paymentMiddleware(
{
"GET /risk-profile": {
accepts: [
{
scheme: "exact",
price: "$0.01",
network: "eip155:84532",
payTo,
},
],
description: "Credit risk score for a wallet address",
mimeType: "application/json",
},
},
server,
),
);
// This handler only runs after payment is verified.
app.get("/risk-profile", (req, res) => {
res.json({
address: req.query.address,
score: 742,
band: "low-risk",
generatedAt: new Date().toISOString(),
});
});
app.listen(4021, () => {
console.log("x402 server listening at http://localhost:4021");
});That is the entire seller integration. The middleware does the 402 handshake, the facilitator verifies settlement on-chain, and you never touch a blockchain SDK or store a private key for incoming funds.
To understand what an agent sees, here is the flow without middleware doing the talking. The agent's first request comes back as a 402 with a PAYMENT-REQUIRED header describing the price, network, and recipient. The agent signs a USDC payment authorization (USDC supports EIP-3009, which lets a relayer submit the signature for you) and retries with a PAYMENT-SIGNATURE header. The second request returns 200 and the data.
GET /risk-profile?address=0xabc HTTP/1.1
Host: yourapi.com
HTTP/1.1 402 Payment Required
PAYMENT-REQUIRED: {"scheme":"exact","price":"$0.01","network":"eip155:84532","payTo":"0xYourReceivingAddress"}
GET /risk-profile?address=0xabc HTTP/1.1
Host: yourapi.com
PAYMENT-SIGNATURE: <signed USDC transfer authorization>
HTTP/1.1 200 OK
Content-Type: application/json
{"address":"0xabc","score":742,"band":"low-risk"}When you are ready for real money, change two things. Point the facilitator at Coinbase's mainnet endpoint (which needs CDP API keys), and switch the network to Base mainnet. Make sure payTo is a mainnet wallet you control, because that is where USDC actually lands.
// Mainnet: CDP-hosted facilitator + Base mainnet network id.
const facilitatorClient = new HTTPFacilitatorClient({
url: "https://api.cdp.coinbase.com/platform/v2/x402",
});
const server = new x402ResourceServer(facilitatorClient).register(
"eip155:8453", // Base mainnet
new ExactEvmScheme(),
);If you would rather take agent payments into your existing Stripe account instead of a crypto wallet, MPP is the path: you accept the payment over Stripe's PaymentIntents API and funds settle in your default currency on your normal payout schedule (Stripe blog, Mar 2026). Same idea, different rail.
Here is the one BTN tie-in worth making. The slowest part of shipping a paid product is usually the boring plumbing around the payment, not the payment line itself: auth, the database, webhooks, the dashboard, error tracking. Build This Now ships with Stripe already wired in (checkout, subscriptions, webhooks, customer portal) and a production codebase under it, so the agent-payable endpoint becomes one feature you add on top rather than a project you start from zero. You describe the endpoint, the agents build and test it, and you ship.
Is this a real opportunity in 2026?
It is real but early, and "early" is the point. The transaction volumes are genuine: 165M+ x402 transactions and roughly $50M in volume by late April 2026 (AWS for Industries, Apr 2026), with the protocol now under Linux Foundation governance and backed by Circle, Google, Microsoft, Stripe, and Visa (crypto.news, 2026).
Be honest about the size, though. Roughly $50M in cumulative volume across tens of thousands of agents is a young market, not a gold rush. Average transaction values are tiny by design, since x402 is built for sub-cent micropayments. The opportunity is not "get rich this quarter." It is "stake out a useful paid endpoint while almost nobody else has, and be discoverable when agent traffic compounds."
Good first products are things an agent needs mid-task and will happily pay a fraction of a cent for: a clean data lookup, a niche calculation, a format conversion, a verification check, a specialized search. If a human would copy-paste your output into their work, an agent will pay per call for the same thing at scale.
Frequently asked questions
Do I need to understand crypto to accept agent payments?
No. With x402 a facilitator handles on-chain verification and settlement, so you provide a wallet address and a price and never write blockchain code. If you prefer fiat, MPP routes agent payments through Stripe's PaymentIntents API into your existing Stripe account (Stripe blog, Mar 2026).
What is the difference between x402, ACP, and MPP?
x402 is per-request micropayments in stablecoins over HTTP, best for paid APIs and content (Coinbase docs, 2026). ACP is agent-driven checkout at merchants, the standard behind ChatGPT Instant Checkout (ACP on GitHub, 2026). MPP is Stripe's protocol for agents to pay a business programmatically in fiat or stablecoins (Stripe blog, Mar 2026).
How much does x402 cost to use?
Coinbase's facilitator currently settles USDC on Base mainnet with no protocol fees, and the testnet facilitator at https://x402.org/facilitator needs no signup (Coinbase docs, 2026). You pay normal network costs, but x402 is designed so those are negligible per transaction.
Which token does x402 use?
USDC is the smoothest option because x402 needs a token that implements EIP-3009, which lets a relayer submit a signed transfer authorization without the agent setting allowances first (Coinbase docs, 2026). The protocol supports EVM and Solana networks.
Can my existing Stripe-based app accept agent payments?
Yes. MPP rides on Stripe's PaymentIntents API through Shared Payment Tokens, so agent payments appear in your Stripe Dashboard like standard charges and settle on your usual payout schedule (Stripe blog, Mar 2026).
Posted by @speedy_devv
Pare de configurar. Comece a construir.
Templates SaaS com orquestração de IA.
Vercel deepsec with Claude Code
Open-source security harness from vercel-labs that audits your repo with Claude Opus. Wire it into the Claude Code build loop.
Run a Team of AI Agents in Parallel with Git Worktrees
A hands-on workflow for running multiple Claude Code agents at once using git worktrees: real commands, a directory layout, the merge strategy, and the practical 5-7 agent ceiling.