# x402 isn’t good (yet) — Jan Curn, Apify

## Executive summary

The talk critiques current standards for agentic payments, arguing that while protocols like x402 are exciting, they suffer from significant architectural flaws, particularly regarding double spending and standardization conflicts. The speaker highlights the rapid proliferation of payment standards (L402, MasterCard Agent Pay, etc.) and proposes solutions such as batch settlement and a new 'Agent General Interface' (AGI) to facilitate robust, flexible agent-to-agent commerce.

## Key takeaways

- x402 Status Code Flaws: The x402 protocol requires the server to respond with HTTP 402 Payment Required. This conflicts with other standards (like MCP requiring 401), forcing companies to create dedicated hostnames for payments, which the speaker calls an anti-pattern.
- The Double Spending Window: A critical vulnerability in current payment flows is that until a transaction settles on the blockchain, the buyer can use the same funds for multiple transactions (double spending). This risk makes non-trivial work difficult to guarantee.
- Need for Flexible Interfaces: To avoid creating new endpoints or rigid API changes, the speaker introduced AGI (Agent General Interface), a simple markdown document designed for agents rather than humans. This allows services to adapt quickly without requiring strict backward compatibility.

## Technical details

- Payment Standards Conflict: The industry faces a 'standards pileup' (L402, MasterCard Agent Pay, x42, etc.). The conflict between required status codes (e.g., x402 requiring 402 vs. MCP requiring 401) forces architectural workarounds like dedicated hostnames.
- Payment Flow Vulnerability: The core vulnerability exists between the moment a signature is created and when the transaction settles on the blockchain. This window allows for potential double spending, especially problematic for services requiring non-trivial work or external payments.
- Batch Settlement: A promising workaround involves batch settlement: clients deposit money into escrow (a real blockchain transaction), receive a cryptographic voucher, and then perform multiple micro-transactions off-chain using that voucher before settling the entire group in one final blockchain transaction.
- API Design Philosophy: The speaker advocates for moving away from traditional Application Programming Interfaces (APIs) toward Agent General Interfaces (AGI), which are designed to be flexible and easily consumable by autonomous agents.

## Practical implications

- Developers building agentic services must account for the inherent time delay between payment authorization and blockchain settlement to prevent double-spending vulnerabilities.
- Architects should consider adopting batch settlement models or flexible interfaces (like AGI) over rigid, single-purpose API endpoints to future-proof against evolving payment standards.
- The shift toward agentic commerce suggests that external services will increasingly be consumed by autonomous agents rather than human users via traditional web forms.

## Topics

Agentic Payments, Blockchain Technology, API Design Patterns, Payment Protocols (x402, MCP), Distributed Systems Architecture, Apify, x402 Protocol, MCP (Messaging Connector Protocol), AGI (Agent General Interface)

Source: https://www.youtube.com/watch?v=h6mi88VrPtQ
