Monetize the
AI Agent Economy

The standard for HTTP 402 Micropayments. Streamline API billing, gate premium content, and enable autonomous agent-to-agent transactions on Solana.

SolanaSolana
Next.js
TypeScript
Express.js
npm
New in v3.5

The Easiest Way to
Integrate Agent Payments.

Forget complex transaction building. Give your AI agents a wallet and let them pay their own way with a single line of code.

agent.ts
123456789
import { createPayingAgent } from '@alleyboss/micropay-solana-x402-paywall/agent';
// 1. Initialize with your private key (One liner 🤯)
const agent = createPayingAgent(process.env.SOLANA_PRIVATE_KEY!);
// 2. Fetch premium data (Auto-pays 402 responses!)
const report = await agent.get('https://api.market-maker.ai/premium');
console.log("Paid & Downloaded:", await report.json());
Works with any LLM

* api.market-maker.ai is a placeholder URL for demonstration.

Compatible with:
LangChain
Autogen
Eliza
OpenAI Swarm

Built for the machine economy.

Traditional subscriptions don't work for AI agents or casual users. Micropay opens up a new revenue model: Pay-per-task.

API Monetization

Charge LLMs and Agents per request. No credit cards needed. Just a wallet signature and 0.00005 SOL.

Stateless Auth

No database required. JWT sessions carry the proof of payment cryptographically.

Self-Sovereign

Verify payments locally on your own RPC node. No dependency on external APIs. Trustless.

import { verifyX402Payment } from '@alleyboss/micropay';

export async function POST(req) {
const { signature } = await req.json();

// 1. Verify Payment on Solana
const { valid } = await verifyX402Payment({
price: 0.01,
recipient: 'WALLET_ADDR'
}, signature);

if (!valid) {
return new Response('Payment Required', {
status: 402
});
}

// 2. Deliver Content
return Response.json({
secret: 'AI_DATA_PAYLOAD'
});
}
Inspiration

Infinite possibilities.
Built with x402.

From autonomous agent marketplaces to gated silicon compute. The future of micropayments is here.

Gated APIs

Gated APIs

Monetize every request with zero friction. Perfect for LLM providers and serverless endpoints.

Hierarchies

Hierarchies

Agents hiring agents.

Metered Compute

Metered Compute

Pay for GPU ms.

Data Markets

Data Markets

Autonomous datasets.

Tool Rental

Tool Rental

On-demand high precision.

Model Fine-tuning Access

Model Fine-tuning Access

Gate specialized intelligence with on-chain verification and anti-replay protection.

Self-Sovereign

Stop paying
rent-seeking fees.

Switch to a private, high-performance facilitator. Keep 100% of your revenue. One-click deploy to your own infrastructure.

Monthly Cost

@ 1M Transactions

Safe & Fast
🏦

Public Node

1% Fee

$1,000/mo

Your Node

Zero Fee

$10/mo

You save $990/mo

Latency

~10ms

Written in Go

Uptime

99.9%

Railway SLA

Ready to monetize?

MIT Licensed. Open Source. Production Ready.