Archive

s402

Chain-agnostic HTTP 402 for agent payments

TypeScriptSuiMoveHTTP 402

s402

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 — published, installable today.
  • Reference implementation + spec:
One instance of → the agent-to-human handoff

Building in this space, or want to compare notes?

Get in touch