AWS and OpenAI Unveil x402 Payment Protocol for Autonomous AI Transactions
OpenAI and Amazon Web Services (AWS) have jointly released a technical guide on how to implement x402 payment flows via Base, a layer-2 network. The guide, titled 'Controlled Agentic Commerce with AgentCore Payments,' demonstrates how AI agents can make autonomous payments for external resources without human intervention.
The x402 protocol is an open standard that settles transactions in USDC on Base and was conceived through collaborative efforts between Coinbase and Cloudflare. It works by having the AI agent receive a 402 Payment Required response, which includes payment terms, from the external service. The agent then checks whether the requested payment falls within its application-defined spending policies.
The guide uses OpenAI's Agents SDK and Amazon's Bedrock AgentCore Payments service to implement x402 payments. This architecture addresses the 'rogue agent' problem by maintaining audit trails for every transaction and keeping all spending approvals at the application layer.