#2533·x402

Proposal: payload-side PII screening as an x402 hardening primitive (with reference MCP impl)

Author: vstantchCreated May 31, 2026Updated Sep 24, 2026

Problem

x402 payment metadata routinely carries user-supplied free text — resource_url query strings, description, reason — straight through to merchants and facilitators. When an LLM agent generates that text, it can include emails, phone numbers, SSNs, names, and other PII the user never intended to share. Once the merchant logs the request, retention is theirs to control. A search across this repo's issues (PII OR redaction OR personal data) returns zero — this seems to be an open gap in the hardening surface, complementary to the existing identity/reputation (#1277), escrow (#2222), and agent-wallet-SDK (#1566) tracks.

Why this matters at the spec level

  • Compliance exposure for agent operators. GDPR Art. 5 (data minimisation) and CCPA both assume the data controller intended to share what they sent. An agent that emits PII into a payment payload is the controller; "the LLM hallucinated my customer's SSN into the memo field" is not a defence.
  • No payment-execution actor catches this. Wallet SDKs sign whatever they're handed. Facilitators forward whatever they receive. The screening surface has to live before signing, on the agent side.
  • It composes cleanly with what's already shipped. Endpoint preflight (e.g. x402station.io) handles "is this URL safe to pay?"; spending policy handles "should I pay this amount?"; PII screening handles "what's in the payload I'm about to send?". These don't overlap.

Reference implementation

presidio-hardened-x402-mcp — Python MCP server, on PyPI and the canonical MCP Registry as of today. Three pre-signing tools an agent can call before submitting an x402 payment:

  • screen_payment_metadata(resource_url, description, reason, entities?) — Presidio-based detection + redaction
  • check_payment_policy(resource_url, amount_usd) — spending-policy gate
  • check_payment_replay(...) — fingerprint-based replay detection

Wire-contract parity with the existing screen.presidio-group.eu API (free tier, 100 req/day/key).

Research lineage

The underlying library presidio-hardened-x402 is the artifact behind an active publication track on x402 payload safety:

More artifacts on x402 hardening, agent-payment privacy, and adjacent topics are in the pipeline. The team (graduate students + postdocs) has bandwidth to follow emerging directions as they appear — happy to take this one further if it lands on the roadmap.

Possible shapes (in increasing commitment)

  1. Acknowledge. A line in the security/hardening docs noting "PII screening of payment metadata is a recommended pre-signing step" with a non-exclusive pointer to implementations.
  2. PRE_PAYMENT_GUARD extension point — a documented hook agent SDKs call before signing; PII screening, policy, mandate check, replay all plug in.
  3. x402-payload-classification header — receiver-visible assertion that screening was applied, with implementation + version. Useful for downstream audit.

Logging the white space here either way.