- Published on
Privacy x402: Hiding Payment Data
Introduction
If you've been paying attention to crypto and AI lately, you've probably heard about x402. The protocol is everywhere right now. Privacy is having its moment too. This post combines both.
x402 enables internet-native payments using HTTP 402. Services can charge for API access without accounts, sessions, or payment processors. All payments settle on blockchain. Blockchain is public. Buyer addresses, payment amounts, transaction history, balances. All visible.
This post analyzes x402 blockchain payments and what can be made private. For full protocol details, check the official documentation.
To analyze privacy, we first need to understand the flow.
The x402 Flow
The following diagram and flow are from the official x402 protocol specification.

The flow breaks down into six steps:
- Client requests resource from server
- Server responds with
402 Payment Requiredand payment requirements - Client creates payment payload and sends request with
X-PAYMENTheader - Server verifies payment via facilitator's
/verifyendpoint - Facilitator settles payment on-chain via
/settleendpoint - Server returns the requested resource
What Data Gets Exposed
Before Settlement
When the client sends the payment payload, the facilitator receives an EIP-3009 transferWithAuthorization containing:
- Sender address
- Recipient address
- Payment amount
- Validity window
- Signature
The facilitator verifies the sender has sufficient balance and the amount matches the server's requirement. All data is visible to this third party.
On-Chain Settlement
Once settled, the transaction is public:
- Sender address
- Recipient address
- Amount
- Timestamp
Anyone can track who paid whom, how much, and when.
What Can Be Made Private
| Data | Currently | Can Be Private? |
|---|---|---|
| Sender address | Public on-chain | Yes |
| Recipient address | Public on-chain | Yes |
| Payment amount | Public on-chain | Yes |
| Balances | Public on-chain | Yes |
| Transaction link (who paid whom) | Traceable | Yes |
| Facilitator sees payment data | Yes | Harder |
Conclusion
Some of these are standard blockchain privacy problems. Hiding addresses and amounts on-chain has known solutions. Stealth addresses, encrypted balances, confidential transactions. The technology exists.
The facilitator is different. It needs to verify payments without seeing the data. This requires computation on encrypted values or zero-knowledge proofs that the payment is valid.
Multiple technologies can help here. FHE allows computation on encrypted data. ZK proofs can verify conditions without revealing inputs. Each comes with tradeoffs
At the end of the day, the system needs to be practical. Theoretical privacy means nothing if verification takes minutes or costs more than the payment itself. The challenge is finding the right balance between privacy and speed.
Future posts in this series will explore how specific technologies apply to these problems.