Private x402 payments · settled on zERC20

AI agents pay APIs.
The public link is gone.

SubEtha keeps the x402 HTTP payment flow — request, 402 Payment Required, pay, result — and replaces settlement with zERC20 burn / mint. The provider gets paid, while the public chain does not expose a direct link between the paying agent and the API provider.

Try the demo Get in touch
Built on the official zERC20 toolchain — no new token, no fork.
What the chain sees
BURN · IndexedTransfer
payer → 0xd2d2…7ed9  −1234
a fresh, opaque one-time address — the treasury can't be derived from it
✕ no on-chain link
MINT · Verifier.singleTeleport
→ treasury  +1234
proof-gated — which burn it corresponds to stays a private witness
Two facts remain on-chain: a burn and a mint. The correspondence between them never appears.
The problem

A payment log is a strategy log.

Machine-payment protocols like x402 settle with an ordinary on-chain ERC-20 transfer — public and permanent. An AI agent pays per request, at machine frequency. That single design choice leaks two things:

01 · AGENT SIDE
What the agent is doing can be inferred

Keep paying from the same wallet and the public record shows which APIs were paid, when, how much, and in what order. An observer can read the agent's workflows, external dependencies, and intent — its payment history doubles as a behavior log and a window into its cost structure.

02 · PROVIDER SIDE
The provider's revenue is public

A fixed payTo address lets anyone watch the inflows and estimate revenue, usage trends, and dependence on key customers — material competitors can use directly for pricing and sales strategy.

API calls are high-frequency, mechanical, and purpose-bound. The more machines pay on-chain, the more the public ledger becomes the transaction log of the machine economy — and the greater its leakage risk.

How it works

The same 402 flow. The link is what's missing.

SubEtha keeps the request / payment-required / retry shape of x402 — but the payTo carries a one-time burn address instead of the provider's treasury, and settlement goes through zERC20's burn → proof-gated mint.

STEP 1
Request

The agent calls a paid API — no keys, no account.

STEP 2
402 challenge

The provider answers with a price and a one-time burn address — never its treasury.

STEP 3
Sign — 0 gas

When permit mode is offered, the agent signs an authorization bound to that exact burn address — no transaction or gas for the payer.

STEP 4
Accepted

In permit mode the facilitator broadcasts the burn; self-transfer clients can broadcast it themselves. Once it confirms, the API result is served.

STEP 5
Finalized

Later, a ZK proof mints to the treasury — without revealing which burn it redeems.

Why the burn and the mint don't link
  • The burn address is an opaque one-way hash, fresh for every payment — the receiver can't be derived from it, and burns don't link to each other.
  • The mint's ZK proof exposes only the transfer root, a recipient hash, and the amount. Which burn was spent is a private witness.
  • The payer is never shown the treasury: the 402 carries only the burn address. No payer → treasury transfer ever exists on-chain.
DERIVATION (PROVIDER-SIDE ONLY)
burnAddress = truncate160(
  Poseidon("burn", recipientFr, secret))
recipientFr = SHA256(chainId ‖ recipient ‖ tweak)
the secret never appears on-chain — it is what breaks the link
Demo

Watch one private payment, end to end.

The guided browser demo runs the whole flow on the real zERC20 stack. Each step is a button, labeled with who acts — so you can see exactly what the client does, what the provider does, and what lands on-chain.

① 402Call the API — get the price and a burn address Client
② SignSign the payload — no transaction, 0 gas Client
③ BurnBroadcast the burn — resource served on confirmation Provider
④ MintSettle — the proof-gated mint lands in the treasury Provider

The payoff: the treasury grows, while traceable inflows to it stay at zero.

Run it yourself → GitHub
SubEtha guided web demo
Use cases

Where confidentiality is a must-have, not a nice-to-have.

Not privacy as ideology — privacy as loss prevention. These are the domains where a public payment history is a direct competitive leak.

FINANCIAL RESEARCH
Research agents that buy data

A fund's agent buying news, filings, satellite and on-chain data reveals its investment themes through its payment order alone. Payment privacy is alpha protection.

B2B PROCUREMENT
Purchasing & negotiation agents

Payments across supplier, logistics, credit and FX APIs expose supply chains and demand forecasts — handing negotiating power to competitors and suppliers.

TRADING BOTS
Bots that trade on paid signals

A bot paying per call for market data, signals and execution APIs stamps its strategy onto the chain — the timing and cadence of its payments show what it watches and when it acts. Observers can reverse-engineer, copy, or front-run it.

AI INFRASTRUCTURE
Agents that buy their own stack

An agent paying per call for inference, specialized models and tool APIs publishes its own architecture — which providers it depends on, at what volume, at what unit cost. That is your product's blueprint and cost structure, readable by competitors.

API PROVIDERS
The sell side, protected too

With a fixed payTo, anyone can chart a provider's revenue, growth and key-customer dependence. SubEtha makes revenue unreadable from the chain.

Your agents? Your APIs?

If your payment history would tell a competitor something, we'd like to hear about your case.

Tell us about it →
FAQ

Frequently asked questions

Is this a mixer or anonymous payments?+

No. Both ends of a payment stay visible: anyone can see that the agent spent tokens, and anyone can see that the provider's treasury received tokens. The one thing that never appears on-chain is the link between the two — which payment became which deposit. The goal is confidential machine payments for enterprise AI agents, not anonymity: auditable disclosure through view keys is an explicit part of the roadmap.

Does it change how I integrate x402?+

Barely. The flow stays the familiar one: call the API, get told “payment required”, pay, receive the result. The only difference is the payment address you're handed — a single-use address created just for that one payment (the burn address), instead of the provider's own receiving address. Settlement then runs behind the scenes through zERC20's burn → mint.

Does the paying agent need gas?+

In permit mode, when the facilitator offers the PermitBurner helper, the agent only signs an approval — think of it as signing a check (technically, an EIP-2612 permit plus an authorization pinned to that exact payment address). The facilitator submits it and pays the gas. A self-transfer fallback is also available, but then the payer submits the burn transaction and pays gas.

What actually remains on-chain?+

Only two records. One: the payer sent tokens to a single-use address (the burn). Two: tokens arrived in the provider's treasury (the mint). Nothing written on-chain connects the two, so an outside observer can't tell which payment became which deposit.

Is there a new token?+

No. SubEtha issues no token of its own and modifies (forks) nothing that already exists. It is the bridge that connects the x402-style payment flow to settlement on the official zERC20 toolchain.

Can a provider settle many payments at once?+

An experimental batch path is available for supported deployments. A provider can let payments accumulate and settle them into its treasury together, at a time of its choosing. Since every payment uses its own single-use address, batching still does not create a direct on-chain payer-to-provider link, although timing and amount correlations remain possible.

Technical writing

Go deeper into the design.

For the implementation details and the thinking behind SubEtha, see the longer technical articles.

Roadmap

From working flow to payments layer.

NOW
Working reference implementation — local PoC

The full loop — request, 402, permit or self-transfer, burn, accepted response, and proof-gated mint — runs today on the official zERC20 toolchain as a local, non-production reference implementation. Unaudited; commercial availability remains subject to licensing and operational readiness.

DISCOVERY
Design partners — running now

Validate the payment-history leakage problem with financial research teams, data providers, and agent builders now — before choosing which enterprise controls and provider integrations to prioritize.

ADOPTION
Two-sided adoption — providers + agents

Make the first integration easy on both sides. For API providers: a drop-in x402 adapter, testnet sandbox, onboarding docs, settlement and fee transparency, and hands-on integration support. For agent builders: payer SDKs, MCP/Python/CLI and framework integrations, safe defaults, examples, and reference apps. Providers should accept SubEtha without changing their API product; agents should pay without implementing private settlement themselves.

PHASE 1
Beta payment layer

Harden the real-settlement x402-compatible payment layer and its provider and agent integrations for external testing. The initial beta focuses on one network and one asset, with security and operational hardening before broader availability.

PHASE 2
Agent controls & operations

Give enterprises control over how their AI agents spend: per-agent budgets, approved providers, human approval, persistent payment state, reporting, and integrations with agent runtimes.

PHASE 3
Compliance as a feature

Customer-controlled view keys, time-bound disclosure packages, sanctions screening on both deposit and payout, auditor exports. Publicly private, institutionally auditable.

PHASE 4
Commercialization

Operate a managed private payment layer for enterprise AI agents: convert design partners into paid deployments, build a trusted provider network, publish a public draft of the x402 privacy scheme, and harden the developer integrations for external use. The product is operated confidentiality — not only a library.

Contact

Building services for AI agents?

SubEtha is a privacy-preserving payment layer for AI agents using APIs and data services. We're speaking with people building or operating agents, providing services to them, and exploring this space. Try the demo, read the code, or get in touch.

pioneerandf@gmail.com GitHub ↗ X / @peaceandwhisky ↗