Reproducible x402 Receipts and Signed Evidence
How payment proof, request digests, assertion outcomes, and Ed25519 signatures form an auditable agent transaction.
Two proofs with different jobs
The x402 PAYMENT-RESPONSE proves the facilitator's settlement result. The signed evidence payload proves what deterministic work the Verification Core performed. Keep both: payment proof answers “was value settled?”, while the evidence signature answers “what request and checks produced this result?”.
Reproduce the verification
- Preserve the exact response body and x402 payment response.
- Locate the evidence key by
kidin https://agent-economy.kgninja.dev/.well-known/jwks.json. - Base64url-decode
evidence.signed_payload_b64urlinto payload bytes andevidence.signature.value_b64urlinto signature bytes. - Verify Ed25519 directly over those payload bytes. Do not parse, reserialize, or canonicalize them before verification.
- Only after signature verification, parse the payload bytes as JSON. Require its
evidence_id,transaction_id,request_hash,input_digest,algorithm_version,executor_version,outcome,checks_digest, andexecuted_atto match the response, original request and evidence digest, and a locally recomputed digest of the returned checks. - Separately compare the quote ID, receipt, amount, network, asset, resource, transaction hash, and x402 payment response with the original challenge and local records. These fields are correlated with the signed payload through the transaction, but the evidence signature does not directly cover the quote, receipt, or settlement response.
Replay behavior
An idempotency key is bound to a canonical request. Retrying the same delivered purchase returns the same transaction instead of creating duplicate revenue or cost events. Reusing an idempotency key with different content fails. Quotes expire, but completed transaction records remain auditable.
Data minimization
Raw evidence is processed in memory and is not retained in D1. Durable records contain cryptographic digests and the minimum transaction, settlement, assertion, and accounting fields needed for audit and replay safety. Agents should still avoid sending secrets or unnecessary personal data.
Trust limits
Signature validity does not convert supplied data into real-world truth. It authenticates the service's execution record. An independent verifier must still decide whether the original evidence source and the declared assertions are appropriate for its use case.