Complete library to integrate HTTP 402 micropayments into your web and AI applications
0% fees. Keep 100% of your revenue without intermediaries.
Payments confirmed in 2 seconds. No waiting.
One line of code. No accounts or registrations.
Base, Ethereum, Polygon, Arbitrum, and Optimism.
Complete and safe types throughout the library.
Middleware, hooks, and UI components included.
npm install @viainti/x402// middleware.ts
import { createX402Middleware } from '@viainti/x402/server'
export const middleware = createX402Middleware({
recipientAddress: '0xYourAddress',
routes: {
'/api/premium': '0.01', // $0.01 per request
},
})// Client with automatic payment
import { X402Client } from '@viainti/x402/client'
const client = new X402Client({
privateKey: 'your-wallet-private-key',
})
const response = await client.fetch('/api/premium')
const data = await response.json()Monetize your APIs by charging per request. Perfect for translation, image generation, and data processing services.
Create paywalls for articles, videos, and courses. Users pay only for what they consume.
AI agents that automatically pay for external services without human intervention.
Monetize internal microservices and create service marketplaces within your organization.
© 2025 ViaInti. All rights reserved.