npm·@agentpaywall/sdk·v0.3.0·live on npm|Security reviewed· view audit →|Solana · USDC · devnet

API micropayments · Solana · USDC

Paywall your API in two lines of code.

Every call settled in USDC, on Solana, in 400 ms. A native HTTP 402 challenge your AI-agent consumers already understand — no subscriptions, no $0.50 minimums, no chargebacks.

View SDK docs
Transactions
9,297
Live APIs
6
Settled
$0.0000
Median settle
~400ms
server.ts
1import express from 'express';
2import { agentPaywall } from '@agentpaywall/sdk';
3
4const app = express();
5
6app.get(
7 '/api/weather',
8 agentPaywall({
9 priceUsdc: 0.001,
10 recipientWallet: process.env.WALLET!,
11 apiId: 'weather-v1',
12 }),
13 (req, res) => res.json({ temp: 72 }),
14);
Last verifiedwaiting for next call…

Every call returns a 402 Payment Required with USDC instructions. Consumer signs the Solana tx, retries with X-Payment-Proof, gets 200. Middleware handles replay, verification, recording.

The whole integration

This is all the code.

One wrapper around your handler. Everything else is Solana doing its job.

$npm install @agentpaywall/sdk
Express · integration
1import express from 'express';
2import { agentPaywall } from '@agentpaywall/sdk';
3
4const app = express();
5
6app.get('/api/weather',
7 agentPaywall({ priceUsdc: 0.001, recipientWallet: YOUR_WALLET, apiId: YOUR_API_ID }),
8 (req, res) => res.json({ temp: 72, condition: 'clear' }),
9);

Your API now charges $0.001 per call, settled on Solana, tracked in your dashboard.

The big board

APIs earning right now.

Every row is a real endpoint on the network. Watch it flash green when a payment lands.

Live
  • 01
    LLM Classify
    Classify short text with an LLM.
    $0.0040
    $0.0960
    $2.4080
    1
  • 02
    GST Validator
    Validate Indian GST numbers.
    $0.0010
    $0.2140
    $1.8720
    4
  • 03
    Geo IP Lookup
    IP → country, city, ASN.
    $0.0008
    $0.1760
    $1.8640
    5
  • 04
    Weather Pro
    Hyper-local weather + forecasts.
    $0.0020
    $0.0880
    $1.8220
    2
  • 05
    IPL Live
    Live IPL match data.
    $0.0005
    $0.3310
    $1.5520
    7
  • 06
    OCR Extract
    Text from images/PDFs.
    $0.0030
    $0.0540
    $1.4340
    1
How it works

Three steps. No servers.

01

Wrap your endpoint

Drop the middleware on any route. Existing handlers keep working exactly as before.

02

Agent sends USDC

Callers receive a 402 challenge, sign a Solana transaction, and retry with the signature.

03

You earn

USDC lands in your wallet in 400 ms. Every call tracked in the dashboard.

Why Solana

This couldn't exist before.

The only chain fast and cheap enough to settle a payment inside a single request.

Stripe

$0.30 minimum

Traditional payment rails are built for checkouts, not per-call pricing. At $0.001 a call you'd lose $0.299 every time.

Agents

Wallets, not forms

The next million API consumers are AI agents. They can hold a Solana wallet. They cannot fill in a card form.

Solana

400 ms settlement

Your USDC arrives before your handler finishes serializing the response. Fees: $0.00025. That makes $0.001/call math work.

Built on x402 · Solana · USDC

The protocol is the rails.
AgentPaywall is the platform.

The x402 standard (Linux Foundation · Coinbase · Stripe · Google) defines the open payment protocol. AgentPaywall is the managed product layer built on top — dashboard, marketplace, analytics, and an India-first developer community that the raw protocol will never include.

Feature
x402 raw protocol
AgentPaywall
Time to first paywall
2–4 hrs (wire your own stack)
5 min
Earnings dashboard
Build it yourself
Included
Per-call analytics
Build it yourself
Included
Replay protection
Implement your own store
Built-in, zero config
Framework adapters
Reference impl only
Express · Next.js · Fastify
API registry & marketplace
Live on platform
Protocol fee
0% (self-host settlement)
1% · no monthly fee
402 protocol standard
x402 (Linux Foundation)
x402 compatible

Same 402 standard. Any consumer that speaks the x402 protocol works with AgentPaywall out of the box. Being built on an open Linux Foundation standard is a feature, not a constraint.

India-first. Coinbase's facilitator won't have a Hindi-speaking community, 100xDevs integrations, or India-focused DX. Distribution built on relationships isn't a technical feature — it can't be forked.

Cheaper than Coinbase CDP below $0.10/call. Coinbase's facilitator charges a flat $0.001 per transaction. AgentPaywall's 1% fee on a $0.001 call costs $0.00001 — 100× less. Any API priced under $0.10/call pays less with us, with no free-tier cliff.

Try it

Watch a 402 settle live.

Click run. This is exactly what an AI agent sees when it pays for an API call.

agent@paywall · demo
$ curl https://api.agentpaywall.com/weather?q=Bengaluru
# Run the call to see what an agent sees.
Marketplace

APIs available right now.

Each endpoint uses AgentPaywall. Each call earns its developer USDC.

GST Validator

$0.0010

Validate Indian GST numbers.

4 calls/min
1,872 total

IPL Live

$0.0005

Live IPL match data.

7 calls/min
3,104 total

Weather Pro

$0.0020

Hyper-local weather + forecasts.

2 calls/min
911 total

Geo IP Lookup

$0.0008

IP → country, city, ASN.

5 calls/min
2,330 total

LLM Classify

$0.0040

Classify short text with an LLM.

1 calls/min
602 total

OCR Extract

$0.0030

Text from images/PDFs.

1 calls/min
478 total
  • Warming up the stream…
Ship a paywall in 2 minutes

Your API is an income stream.
Wire up the meter.

Connect your Solana wallet and charge for your first call today.

Read the docs