Project Summary
We propose to build an x402-compatible payment bridge that allows clients, services, and agents to pay HTTP endpoints using the x402 protocol, with payments privately settled to Zcash shielded addresses, enabling ZEC-native micropayments for APIs, AI agents, and services without identity linkage.
Project Description
The x402 protocol introduces a standardized way to monetize HTTP resources using payments instead of authentication β returning 402 Payment Required responses that specify how a client can pay to access a resource.
However, existing x402 implementations primarily rely on transparent or custodial payment rails. There is currently no privacy-preserving x402 settlement backend and no way to settle x402 payments directly into Zcash shielded pools.
This project introduces a Zcash-native x402 settlement bridge, enabling:
-
HTTP services and APIs to require payment via x402
-
Clients or agents to pay for requests
-
Payments to be settled privately to ZEC shielded or unified addresses
-
No linkage between client identity and on-chain Zcash activity
The result is a privacy-first monetization layer for the web and agent economy, powered by Zcash.
Proposed Problem
The modern web and agent ecosystem increasingly needs:
-
Micropayments for APIs
-
Pay-per-request AI inference
-
Agent-to-agent payments
-
Service monetization without accounts or logins
While x402 defines how clients can be asked to pay, it does not specify a privacy-preserving settlement mechanism.
Current approaches suffer from:
-
Identity leakage
-
Centralized custody
-
Transparent payment graphs
-
Poor fit for privacy-sensitive agents and users
Zcash, despite being the strongest privacy-preserving currency, lacks native tooling to act as a drop-in settlement layer for x402-based services.
Proposed Solution
We will build an x402 β Zcash settlement bridge that:
-
Allows an HTTP service to return a 402 Payment Required response that includes x402 payment instructions.
-
Enables clients or agents to submit payment authorization according to x402.
-
Converts the authorized payment into ZEC (via configurable liquidity provider or internal treasury).
-
Settles the payment to a fresh Zcash shielded address using a Rust-based settlement engine.
-
Returns an x402-compliant receipt allowing the original HTTP request to proceed.
Key properties
-
Fully compatible with x402 semantics
-
Privacy-preserving Zcash settlement
-
No persistent identity or address mapping
-
Suitable for humans, services, and AI agents
This enables pay-per-request APIs backed by ZEC, without sacrificing privacy.
Solution Format
The end product is a fully open-source, deployable x402 payment gateway that allows any HTTP service or API to require payment and have that payment settled privately to a Zcash shielded address. Developers will be able to add pay-per-request monetization to APIs and agent services using standard x402 semantics, while Zcash serves as the privacy-preserving settlement layer. A complete reference implementation, middleware, and end-to-end demo will enable immediate adoption by service operators and AI agents.
Will include:
-
Open-source x402 gateway service (TypeScript / Node)
-
Rust Zcash settlement engine using librustzcash / zcash_client_backend
-
Reference HTTP middleware for x402-enabled services
-
Developer documentation and examples
-
End-to-end demo: x402 request β ZEC settlement β protected API response
Dependencies
Listed below are factors we are dependent on, but not bottlenecked:
-
Zcash node or lightwalletd backend
-
Liquidity provider or ZEC treasury for settlement
-
HTTP services willing to test x402 flows
Technical Approach
x402 Gateway (TypeScript / Node)
-
Implements x402 request/response semantics
-
Generates 402 Payment Required responses
-
Verifies x402 payment proofs / authorizations
-
Tracks request-scoped payment state
Zcash Settlement Engine (Rust)
-
Constructs Orchard shielded transactions
-
Generates fresh addresses per settlement
-
Handles fees, retries, and error reporting
-
Returns TXIDs and settlement confirmations
Privacy Model
-
No storage of client identifiers
-
No linkage between HTTP request origin and ZEC address
-
Optional viewing-key support for service operators
-
Documented privacy guarantees and threat model
Upstream Merge Opportunities
-
Publish x402 middleware examples for Zcash-backed APIs
-
Contribute documentation or helpers to Zcash developer tooling
-
Potential upstream Rust utilities for shielded payment automation
-
Provide reference implementation for βx402 + privacy coinβ pattern
Success Metrics
-
Working x402 β ZEC settlement on testnet and mainnet
-
At least one reference x402-protected API using ZEC
-
Developer adoption of middleware or gateway
-
Positive community and maintainer feedback
The entire proposal with milestones is present here.
We are very upbeat about this integration, but please let us know what you think.
Thank you,
Krish