---
type: Agentic Web Standard
title: "s402"
description: "How can an agent pay a Sui-native resource using six payment schemes (including prepaid batching and escrow), while staying wire-compatible with plain x402 clients?"
resource: "https://raw.githubusercontent.com/s402-protocol/core/main/docs/specification.md"
tags: ["pay", "http-header", "community", "accept-agent-payments", "agent-checkout"]
status: deprecated
generated: { by: agenticweb-builder/1.0, at: 2026-10-30T00:00:00Z }
verified: { by: process:agenticweb-engine, at: 2026-10-23T00:00:00Z }
stale_after: 2026-11-22T00:00:00Z
sources:
  - id: ref-1
    resource: "https://raw.githubusercontent.com/s402-protocol/core/main/docs/specification.md"
    title: "s402's specification.md, versioned as Wire Format Specification v1 (Draft, March 2026), defines s402 as encoding, field, and validation rules for six payment schemes (exact, upto, prepaid, stream, escrow, unlock) carried inside the x402 v2 PaymentRequired envelope, using the same payment-required, x-payment, and payment-response headers as x402 for wire compatibility."
    last_modified: 2026-03-01T00:00:00Z
  - id: ref-2
    resource: "https://raw.githubusercontent.com/s402-protocol/core/main/README.md"
    title: "The s402-protocol/core repository README describes s402 as 'a profile of x402: the Sui binding, and the rules about what an agent may pay,' states it is audited/tested against a specific x402-foundation/x402 commit as of 2026-09-04, and that the Sui reference implementation ships separately as @sweefi/sui, whose Prepaid scheme is modelled (not measured in production) to cut effective per-call gas cost via Programmable Transaction Blocks."
    last_modified: 2026-09-04T00:00:00Z
  - id: ref-3
    resource: "https://github.com/s402-protocol/core"
    title: "The repository's own GitHub metadata describes it as 'Sui-native HTTP 402 protocol. Wire-compatible with x402. Atomic settlement via PTBs,' created 2026-02-15, last pushed 2026-09-04, with 0 GitHub stars at time of check."
    last_modified: 2026-09-06T00:00:00Z
  - id: ref-4
    resource: "https://github.com/s402-protocol/core/releases/tag/v0.8.0"
    title: "Repository archived by its owner"
    last_modified: 2026-10-15T00:00:00Z
---

# s402

s402 is an agentic-web standard (HTTP header) at step 7, Pay, governed by Single open-source project; its status is "Archived repository". It answers: "How can an agent pay a Sui-native resource using six payment schemes (including prepaid batching and escrow), while staying wire-compatible with plain x402 clients?" Implementation status is prototype, last verified 2026-10-23.

# Overview

s402 is a Sui-chain profile of x402: it reuses x402 v2's `PaymentRequired` HTTP envelope and header names (`payment-required`, `x-payment`, `payment-response`) wholesale, and adds a Sui-specific binding plus a policy layer covering six payment schemes — exact, upto, prepaid, stream, escrow, and unlock — the last four of which go beyond what plain x402 or Stripe's MPP currently define [^ref-1]. The project's own README is explicit about the relationship: "s402 does not fight x402 or Stripe MPP head-on... it absorbs them as payment-in formats... and supersets them on primitives their business models cannot ship" [^ref-2].

It solves Sui-native settlement for agent payments, including a "Prepaid" scheme that the project models as settling 1,000 API calls in 2 on-chain transactions via Sui's Programmable Transaction Blocks (PTBs), versus 1,000 transactions for one-shot "Exact" payments — but the README is careful to flag this as a modelled estimate under stated assumptions, not a measurement from production traffic [^ref-2]. It does not define its own transport or discovery mechanism distinct from x402: an s402-profile 402 response is detected only by the presence of an `extensions.s402` key inside the same x402 v2 envelope, and a 402 lacking that key is still payable by an s402-aware client [^ref-1].

s402 was developed as a single-repository open-source project (`s402-protocol/core`) with no separate standards body or foundation; after commits through 2026-09-04 and tagging `v0.8.0` on 2026-09-21, the owner archived the repository (observed 2026-10-16) with zero GitHub stars and no evidence of external adopters [^ref-2][^ref-3][^ref-4]. The protocol layer is explicitly chain-agnostic in design (an "S7 invariant" keeps chain-specific logic out of the core), with the actual Sui settlement code shipping separately as `@sweefi/sui` — an npm package from what appears to be a company or team called "sweefi," whose relationship to s402-protocol was not independently confirmed beyond both projects' own cross-references [^ref-2]. What is unresolved: whether s402 has any production deployment beyond its own demos, and who or what "sweefi" is as an organization.

# Examples

```http
GET {origin}/{paid-path}
# parse: HTTP 402 with a payment-required header decoding (base64+JSON) to an x402 v2 PaymentRequired object whose extensions field contains an s402 key
# on absent: A 402 without extensions.s402 in the decoded PaymentRequired object is a plain x402 (or other x402-compatible) response, not s402; per the spec, such a response is still payable by an s402-aware client, so absence of the s402 extension does not mean the endpoint rejects s402 clients, only that it isn't advertising s402-specific schemes.
```

# Knowledge Graph

* **Lifecycle Step**: [7 Pay](/category/pay/index.md)
* **Builds on**: [x402](/okf/protocols/x402.md)
* **Pairs with**: [x402](/okf/protocols/x402.md), [Machine Payments Protocol (MPP)](/okf/protocols/mpp.md), [HTTP Message Signatures](/okf/protocols/http-message-signatures.md), [Agent Payments Protocol (AP2)](/okf/protocols/ap2.md)
* **Compared in**: [API Keys & Subscriptions vs x402 & MPP (HTTP 402) (classic vs agentic)](/compare/api-keys-vs-x402/index.md), [Cloudflare Pay Per Crawl vs s402](/compare/cloudflare-pay-per-crawl-vs-s402/index.md), [L402 vs s402](/compare/l402-vs-s402/index.md), [Machine Payments Protocol (MPP) vs s402](/compare/mpp-vs-s402/index.md), [s402 vs x402](/compare/s402-vs-x402/index.md)

[^ref-1]: s402's specification.md, versioned as Wire Format Specification v1 (Draft, March 2026), defines s402 as encoding, field, and validation rules for six payment schemes (exact, upto, prepaid, stream, escrow, unlock) carried inside the x402 v2 PaymentRequired envelope, using the same payment-required, x-payment, and payment-response headers as x402 for wire compatibility. (https://raw.githubusercontent.com/s402-protocol/core/main/docs/specification.md)
[^ref-2]: The s402-protocol/core repository README describes s402 as 'a profile of x402: the Sui binding, and the rules about what an agent may pay,' states it is audited/tested against a specific x402-foundation/x402 commit as of 2026-09-04, and that the Sui reference implementation ships separately as @sweefi/sui, whose Prepaid scheme is modelled (not measured in production) to cut effective per-call gas cost via Programmable Transaction Blocks. (https://raw.githubusercontent.com/s402-protocol/core/main/README.md)
[^ref-3]: The repository's own GitHub metadata describes it as 'Sui-native HTTP 402 protocol. Wire-compatible with x402. Atomic settlement via PTBs,' created 2026-02-15, last pushed 2026-09-04, with 0 GitHub stars at time of check. (https://github.com/s402-protocol/core)
[^ref-4]: Repository archived by its owner (https://github.com/s402-protocol/core/releases/tag/v0.8.0)
