Inspiration
Millions of people and AI agents want high-quality data from APIs. But hardly anyone buys a $20/month plan just to make a handful of calls. Subscriptions shut out casual users and agents, and sellers miss the long tail of customers who would happily pay for a few calls.
Coinbase's x402 showed the fix: pay per request over plain HTTP. But it runs on crypto wallets and stablecoins. We asked: what if x402 micropayments ran on PayPal, the payment rail people already trust?
What it does
PayCall: pay per call, not per month. It's micropayment infrastructure for the AI era, powered by PayPal.
- Buyers top up once with PayPal, with optional auto-reload. They set daily caps and a max price per agent, and can pause any agent at any time.
- Agents pay for APIs automatically. When an API answers
402 Payment Required, the agent signs an Ed25519 voucher and retries. There's no card charge per call and no API key to manage. - Sellers either list any HTTPS API behind the PayCall proxy, or gate their own server with one line of middleware. They get paid out to PayPal automatically.
Pricing options:
- Per call: a fixed price, e.g. $0.005 per call.
- Metered: charged per token or per character, with the unused part of the cap refunded.
- Streaming: SSE responses are counted as they flow and cut off at the cap.
- Time passes: one payment buys a window of free calls.
- Dynamic pricing: the seller sets the price per request.
Every charge also comes with:
- A signed receipt (JWS).
- Idempotent retries, so re-sending a voucher never charges twice.
- Refunds and disputes.
Agents connect in seconds through our hosted MCP server. You add it to Claude and ask it to fetch a paid URL.
How we built it
- x402 v2 custom scheme
paycall-prepaid: agents sign cumulative vouchers (seq,cumulativeAmount) on a buyer→seller channel. Many tiny calls add up into one balance instead of many card charges. - Facilitator and proxy: Hono on Cloudflare Workers, with Drizzle, Neon Postgres via Hyperdrive, and KV for caches. All money is stored as integer micros (1,000,000 = $1).
- PayPal: Orders API and Vault for top-ups and auto-reload, Payouts API for batched seller payouts every 10 minutes, and webhooks for capture and payout events.
- Dashboard: Next.js 16 with Better Auth and the PayPal JS SDK. It has three views: Spend, Earn and Catalog, plus a live ledger over SSE.
- npm packages:
@paycall-live/sdk(a drop-infetchthat pays 402s),@paycall-live/mcp(MCP wallet for agents) and@paycall-live/middleware(seller middleware for Hono, Express and web-standard handlers).
Challenges we ran into
- Fees vs. micropayments: a card fee costs more than a $0.001 call. We fixed this with prepaid balances, off-chain signed vouchers and batched payouts, so PayPal moves money in large amounts while calls stay sub-cent.
- Fair metering on streams: charging for exactly what was delivered, even if the client disconnects mid-stream, then refunding the rest of the cap.
- Never double-charging: retries, network failures and seller errors all had to end correctly. A seller error means no charge, and a replayed voucher returns the original settlement.
- PayPal sandbox quirks: non-US sandbox accounts failed on currency support and payouts, so we moved everything to US sandbox accounts.
Accomplishments that we're proud of
- The full x402 flow working end to end on PayPal: agent request → 402 → signed voucher → upstream response → settlement → PayPal payout.
- An AI agent in Claude paying for a live streamed LLM response by the character, with the unused amount refunded and a verifiable receipt.
- Three published npm packages and a hosted MCP server. Any developer can start accepting micropayments in one line of code.
What we learned
- Micropayments are mostly an accounting problem, not a payment-rail problem. Aggregate off-rail, settle on-rail.
- x402's design works without crypto. HTTP 402 plus signed vouchers fits PayPal well.
- Building for agents means designing for autonomy and guardrails together: caps, per-agent limits and pause switches.
What's next for PayCall
- Move from sandbox to live PayPal, with more currencies and regions.
- A public marketplace of verified paid APIs that agents can discover and pay for on their own.
- Venmo funding and PayPal-native buyer protection for disputes.
- SDKs for Python and Go, plus integrations with more agent frameworks.