What is X402v1 wire contract?

The X402v1 wire contract is the frozen byte-level format of an x402 challenge and payment proof. “Frozen” means it doesn’t change, so every official SDK signs and verifies identically — behaviour can’t drift between languages.

A single, frozen wire format is what lets nine SDKs across nine languages interoperate with the same servers and agents. The SDKs share a known-answer signature test — a fixed input with a fixed expected signature — so an Express server and a Go client agree byte-for-byte on what a valid challenge and payment proof look like.

Concretely, the contract pins the shape of two messages: the signed 402 challenge (the price, the accepted payment details, and a one-time nonce) and the payment proof the caller attaches on retry. Because those shapes are fixed, an agent runtime that learned to pay one x402 endpoint can pay any of them, and a server that upgrades its SDK never has to renegotiate the format with its callers.

“Frozen” is the whole point: versioning it as X402v1 means the byte-level behaviour won't shift underneath you. New capabilities arrive as new, explicitly-versioned contracts rather than silent changes to this one — so the integration you sign and verify against today keeps working, and cross-language interoperability doesn't quietly break.