Stripe Previews 'Machine Payments' via HTTP 402 Code
Stripe has quietly launched a preview of a "machine payments" feature, surfaced through the use of the HTTP 402 "Payment Required" status code. This development indicates a move toward enabling programmatic, autonomous payments between bots and other systems. The infrastructure could support new use cases in agentic finance and embedded commerce.
- The HTTP 402 "Payment Required" status code was defined in 1997 as part of the original HTTP/1.1 specification but has remained largely unused. Its recent adoption by companies like Stripe and Cloudflare signifies a move to natively integrate payments into web protocols, particularly for automated, machine-to-machine transactions. - Stripe's implementation leverages the "x402" protocol, which was developed by Coinbase. This protocol allows an AI agent to request a resource, receive a 402 response containing a crypto deposit address, pay from its wallet, and then successfully retry the request. - The system is designed for microtransactions, enabling pay-per-use business models for as little as $0.01 per API call or data request. It utilizes USDC on the Base blockchain for settlement, and Stripe handles the gas fees and converts the crypto payments into the seller's Stripe balance. - This technology removes the need for traditional payment flows that require human interaction, such as entering credit card details or authenticating via methods like PayPal. Agents can interact with services on-demand using only a crypto wallet, without pre-registering for an account or managing API keys. - For developers, implementing this involves adding middleware to an HTTP endpoint that specifies a price in USDC. When a request is made without payment, the server returns the 402 status, and upon successful on-chain payment, it provides the requested content. - This infrastructure is a key enabler for "agentic commerce," where AI agents can autonomously transact to acquire data, run computations, or access services. This aligns with broader trends in embedded finance, where financial services are integrated directly into non-financial platforms and applications. - Visa and Mastercard are also developing agentic commerce solutions that use tokenization to tie a unique AI agent identity to a specific customer's payment credentials for secure, autonomous transactions. - The move towards programmatic payments, whether through APIs or blockchain-based smart contracts, allows for the automation of complex financial workflows, such as automatically releasing funds only when predefined conditions are met.