x402-native payments
for APIs, agents, and apps
Build monetizable services with native HTTP payment protocols. Vanta SDK brings programmatic payments to the protocol level—no payment processors, no subscriptions, just pure HTTP 402.
import { VantaMiddleware } from '@vanta/sdk'
// Protect any API route with x402 payments
app.use('/api/premium', VantaMiddleware({
price: '0.001', // Price per request in ETH
recipient: '0x...', // Your wallet address
network: 'base', // Network for payments
}))
// Clients automatically handle 402 responses
const data = await vantaClient.fetch('/api/premium/data')
// Payment happens seamlessly via HTTP headersTrusted by developers building the future of programmatic payments
Everything you need for x402 payments
A complete toolkit for building payment-enabled APIs, services, and autonomous agents.
Native HTTP 402
Built on the HTTP 402 Payment Required spec. No custom protocols, no vendor lock-in—just standard HTTP.
Cryptographic Verification
Every payment is cryptographically verified. Replay protection, signature validation, and tamper-proof receipts.
TypeScript First
Full type safety with zero runtime overhead. Autocomplete for every config option and API method.
Metered Billing
Support for per-request, per-byte, or time-based pricing. Flexible quota management built-in.
Access Tokens
Issue short-lived access tokens after payment verification. Perfect for session-based access patterns.
Multi-Network
Support for Ethereum, Base, Optimism, Arbitrum, and more. Automatic network detection and routing.
How Vanta SDK works
Four steps from request to receipt. See the x402 payment flow in action.
// Server middleware automatically issues 402
app.use('/api/premium', VantaMiddleware({
price: '0.001',
asset: 'USDC',
network: 'base',
}))Built for modern monetization
From AI agents to API marketplaces, Vanta SDK powers the next generation of programmable payments.
API Paywalls
Gate any API endpoint with instant micropayments. No API keys, no subscriptions—just pure HTTP 402.
Agent Tools
Enable AI agents to autonomously pay for tools, APIs, and compute without human intervention.
Metered Endpoints
Charge per token, per byte, or per compute second. Real-time metering with quota management.
Premium Webhooks
Monetize real-time data streams and event notifications with per-delivery micropayments.
Gated Datasets
Sell access to premium datasets, research, or proprietary information on a per-query basis.
Internal Platform Billing
Enable internal cost allocation across teams with transparent, auditable usage tracking.
Built for developers, by developers
A delightful developer experience with first-class TypeScript support and battle-tested middleware.
TypeScript-first
Full type safety with zero runtime overhead. Autocomplete for every config option and API method.
Edge-ready
Runs anywhere JavaScript runs—Node.js, Deno, Cloudflare Workers, Vercel Edge, and more.
Middleware adapters
Drop-in middleware for Express, Next.js, Fastify, Hono, and any Node.js framework.
Click any command to copy to clipboard
Loved by developers
See what developers are building with Vanta SDK.
“Finally, a payment solution that speaks HTTP. We integrated Vanta into our API gateway in under an hour. Game changer for our AI agent marketplace.”
“The x402 approach is elegant. No webhooks, no payment processors, no reconciliation headaches. Just pure HTTP payments that work.”
“We switched from subscription billing to pay-per-request with Vanta. Our conversion rate tripled because users can try before committing.”
Ready to build with x402?
Get started in minutes. Install the SDK, add the middleware, and start accepting payments on your API.