s402
Chain-agnostic HTTP 402 for agent payments, retired in September 2026 in favor of x402
s402
I retired s402 in September 2026. It was my HTTP 402 payment protocol for agents on Sui, and x402 has since become the industry standard. For new work, use x402.
The web already has a status code for "you must pay to proceed" — HTTP 402 Payment Required — it was just never wired up. s402 wires it up for the agent era: a chain-agnostic protocol for agent-to-service payments, with a spending mandate delegated by a human and enforced by the chain, not by the agent's good behaviour.
What it is
A wire format and SDK for the 402 handshake: a service replies 402 with payment terms; the agent presents a payment authorized by its mandate; the payment settles atomically and the agent gets a receipt. The protocol is chain-agnostic by design; the reference enforcement is Sui-native (owned-object mandates + PTB atomicity).
Why it matters
This is the SAY/DO boundary for money. An agent can propose any payment, but the mandate decides what actually executes — per-transaction caps, lifetime caps, expiry, instant revocation. The payment and the authorization ride in one atomic transaction, so there's no window where the check passed but the spend escaped.
Proof
- npm:
s402— v0.9.0, deprecated since September 2026. - Reference implementation + spec:
Building in this space, or want to compare notes?
Get in touch