TL;DR
This paper introduces presidio-hardened-x402, an open-source middleware that detects and redacts PII in x402 payment requests, ensuring privacy and policy enforcement with high accuracy and low latency.
Contribution
It presents the first middleware for intercepting and sanitizing x402 payment requests to protect PII and enforce policies, validated by a comprehensive synthetic corpus and performance evaluation.
Findings
Achieves micro-F1 score of 0.894 in PII detection
Maintains latency under 6ms, within the 50ms overhead budget
Provides publicly available code, corpus, and experiment setup
Abstract
AI agents that pay for resources via the x402 protocol embed payment metadata - resource URLs, descriptions, and reason strings - in every HTTP payment request. This metadata is transmitted to the payment server and to the centralised facilitator API before any on-chain settlement occurs; neither party is typically bound by a data processing agreement. We present presidio-hardened-x402, the first open-source middleware that intercepts x402 payment requests before transmission to detect and redact personally identifiable information (PII), enforce declarative spending policies, and block duplicate replay attempts. To evaluate the PII filter, we construct a labeled synthetic corpus of 2,000 x402 metadata triples spanning seven use-case categories, and run a 42-configuration precision/recall sweep across two detection modes (regex, NLP) and five confidence thresholds. The recommended…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
