Proposal: Settlement Attestation Receipt (SAR) - canonical delivery proof format for the x402 ecosystem
Proposal: Settlement Attestation Receipt (SAR) — a canonical delivery proof format for the x402 ecosystem
The gap this addresses
x402 solves how agents pay. ERC-8004 addresses who acted. Coinbase Agentic Wallets handle custody and spending policy.
None of these layers prove delivery.
An escrow contract waiting to release funds, a reputation system updating an agent’s score, a DAG orchestrator deciding whether to proceed — all of these need to answer one question before acting:
Did the agent actually deliver what was paid for?
Right now each system that needs this answer either skips the check, rolls its own verification logic, or trusts the agent’s self-report. That’s not a foundation for economic settlement at scale.
What SAR is
Settlement Attestation Receipt (SAR) is a minimal, open receipt format for delivery attestation in autonomous agent commerce.
A SAR receipt is a stateless, deterministic, cryptographically signed artifact that any system can verify offline, without contacting the issuing infrastructure. It answers one question — did the agent deliver what was specified — and produces a portable, replay-stable proof that payment rails, wallets, escrow contracts, reputation systems, and orchestration frameworks can act on independently.
The signed core includes all top-level fields except: sig, sig_alg, _perf, and _ext.
Extensions are additive and never affect the signed core or receipt_id derivation.
Design principles
Deterministic. receipt_id = SHA256(JCS(core_fields_bytes)). Any party can recompute the ID from the receipt contents. No trust dependency on the issuing server.
Minimal signed core. The signature covers only the invariant fields. Extension namespaces are additive and never affect receipt validity. Extension namespaces must not alter signed core fields or receipt_id derivation.
Portable. Ed25519 signatures. RFC 8785 — JSON Canonicalization Scheme (JCS). Public key discovery at .well-known/sar-keys.json. Verifiable in any language, on any chain, in any runtime. After initial public key resolution, receipts can be verified indefinitely offline without server interaction.
Non-custodial. SAR receipts are attestation artifacts. The format takes no position on custody, enforcement, or dispute resolution. Downstream systems decide how receipts are used.
Three verdict paths. PASS, FAIL, and INDETERMINATE. The third verdict matters: an evaluator that can’t determine delivery should say so, not collapse uncertainty into a false binary.
The receipt format
{
"receipt_version": "0.1",
"receipt_id": "sha256:4a7f3c...",
"task_id_hash": "sha256:9b2e1a...",
"verdict": "PASS",
"confidence": 0.94,
"reason_code": "SPEC_MATCH",
"ts": "2026-02-15T01:00:00.000000Z",
"verifier_kid": "sar-prod-ed25519-01",
"sig_alg": "Ed25519",
"sig": "base64url:...",
"_perf": {
"verify_ms": 82,
"total_ms": 105,
"spec_bytes": 128,
"output_bytes": 131
},
"_ext": {}
}The _ext envelope accepts namespaced integration context — x402 payment hashes, ERC-8004 agent DIDs, escrow contract addresses, wallet policy IDs, DAG workflow references — without affecting the signed core or receipt_id.
Reason code registry (v0.1)
| Verdict | Code | Meaning |
|---|---|---|
| PASS | SPEC_MATCH |
Output satisfies spec |
| PASS | SPEC_MATCH_PARTIAL |
Satisfies spec within confidence threshold (optional, confidence-thresholded) |
| FAIL | SPEC_MISMATCH |
Output does not satisfy spec |
| FAIL | OUTPUT_ABSENT |
No output produced |
| FAIL | OUTPUT_MALFORMED |
Output unparseable against spec schema |
| FAIL | TIMEOUT |
Output not produced within spec time window |
| FAIL | SPEC_INVALID |
Spec itself malformed or unevaluable |
| INDETERMINATE | SPEC_AMBIGUOUS |
Spec does not define clear success criteria |
| INDETERMINATE | EVALUATOR_TIMEOUT |
Verifier did not complete within SLA |
| INDETERMINATE | CONFLICT |
Multiple evaluation passes produced conflicting verdicts |
Reason codes are versioned and extensible. Implementers must treat unknown reason codes as non-fatal.
Verification algorithm (deterministic)
1. Parse the receipt JSON
2. Extract core fields — all top-level fields except sig, sig_alg, _perf, and _ext
3. JCS-canonicalize the core object (RFC 8785 — JSON Canonicalization Scheme)
4. SHA256 the canonical byte stream → confirm hex matches receipt_id after
removing the "sha256:" prefix
5. Resolve verifier_kid via GET /.well-known/sar-keys.json
6. Verify sig (Ed25519) against the SHA256 bytes using the resolved public keyNo server contact required after key resolution. Keys are published at a stable well-known endpoint and can be cached.
Current implementation
Default Settlement Verifier is a live reference implementation of SAR:
- MCP tool — discoverable and invocable by autonomous agents
- REST endpoint — direct verification via POST /settlement-witness
- Public spec — [defaultverifier.com/spec/sar-v0.1] (https://defaultverifier.com/spec/sar-v0.1/)
- Key discovery — [defaultverifier.com/.well-known/sar-keys.json] (https://defaultverifier.com/.well-known/sar-keys.json)
- Test vectors — [defaultverifier.com/spec/sar-v0.1/fixtures/README] (https://defaultverifier.com/spec/sar-v0.1/fixtures/README)
Cross-language fixture verification is complete. Python (jcs — RFC 8785 implementation) and Node (canonicalize) produce identical receipt_id values from identical inputs. Fixtures cover all three verdict paths — PASS, FAIL, and INDETERMINATE — and are independently verifiable against the public key in /.well-known/sar-keys.json.
The system has processed 5,400+ organic MCP tool invocations from 100+ unique agent clients since deployment.
What I’m looking for
This post is a request for technical feedback, not an announcement.
Specific questions for the community:
1. Reason code vocabulary — Are there failure modes you’re encountering in your agent workflows that the current registry doesn’t cover? Particularly interested in failure patterns from multi-agent DAG workflows and escrow-gated settlement scenarios.
2. Extension namespace design — The _ext envelope uses free-form namespacing right now. Should there be a registered namespace registry analogous to the reason code registry, or is open namespacing the right default?
3. Interoperability with Trusted Agent Protocol — Visa’s TAP and x402 have committed to alignment. Does SAR’s receipt format map cleanly onto TAP’s attestation model, or are there structural gaps that would prevent receipts from being portable across both protocols?
4. Onchain key registry — The current implementation uses .well-known for key discovery. For settlement-gating significant economic value, is an onchain key registry mirror necessary for v0.1, or is .well-known sufficient with a roadmap commitment for v0.2?
5. Spec governance — What’s the right home for SAR as a standard? Options range from a standalone SAR Foundation, to an x402 sub-specification, to an Ethereum EIP, to a joint proposal with existing identity standards bodies. Interested in the community’s read on what gives this the best chance of broad adoption.
Related
- x402 protocol: - x402 protocol
- ERC-8004 (agent identity and reputation)
- Coinbase Agentic Wallets
- Visa Trusted Agent Protocol
SAR v0.1 spec, fixtures, and key discovery are live. Feedback welcome here or via the spec repo.
Source: x402-foundation/x402