zk402

Privacy-Preserving HTTP Payments

X402 payments with zero-knowledge proofs. No accounts. No KYC leaks. Everything in one round trip.

đź”’

Zero-Knowledge Privacy

Prove compliance without revealing identity. Age verification, sanctions screening, geo-restrictions—all handled with ZK proofs.

⚡

Single Round Trip

Everything in one HTTP request. Credentials, payment, and access—no multi-step flows, no sessions, no state.

🔑

No User Accounts

No signup forms. No passwords. No KYC databases. Just cryptographic proofs and instant access.

How It Works

1

Provider Sets Requirements

Define what you need: age > 18, non-sanctioned entity, specific jurisdictions, etc.

2

Client Generates ZK Proofs

Using verifiable credentials, client creates zero-knowledge proofs that satisfy requirements without revealing underlying data.

3

Everything Protocol Request

Single HTTP request contains payment, proofs, and authorization. Provider verifies and grants access instantly.

Simple Integration

// Client side
const request = await zk402.createRequest({
  endpoint: 'https://api.example.com/data',
  payment: { amount: 100, currency: 'sats' },
  credentials: [ageProof, sanctionsProof, geoProof]
});

const response = await fetch(request.url, request.options);

// Provider side
const verified = await zk402.verify(req, {
  requiredProofs: ['age > 18', '!sanctioned', 'geo:US,EU'],
  paymentAmount: 100
});

if (verified.valid) {
  // Serve protected resource
  return res.json({ data: protectedData });
}

Built For

AI APIs

Pay-per-request inference without API keys or rate limits

Paywalled Content

Micropayments for articles, data, or media—no subscriptions

Compliance-First Apps

Meet regulatory requirements without collecting PII

Everything Protocol

Powers the vision of single-request internet access

Start Building with zk402

Open source. Developer-first. Privacy-native.

View Documentation on GitHub