Paste your URL, set a per-call price, and share a buy link. Buyers prepay by card; agents call with spend-capped Pay Tokens.
Live today: x402 gateway / Stripe-backed Pay Token / spend caps / usage ledger. No crypto wallet. First 3,000 calls free, then 3%. Sellers keep 97%.

import { createLemonCakeSDK } from "@lemon-cake/mcp-sdk";
const lc = createLemonCakeSDK(); // demo mode without env vars
// HTTP route — one line.
app.use(lc.protect("/api/search", { cost: 0.02 }));
// Or an MCP tool — same idea.
server.tool("search", lc.charge({ price: 0.02 }), handler);Drop-in MCP middleware. Works with any MCP SDK. Free for your first 3,000 calls.
Getting started
You can start without writing code. Five minutes on the timer is plenty.
1 min
1 min
3 min
5 minutes total. After that, agents come and pay on their own.
How it works
Buyer prepays → agent spends within the cap → 97% lands with you. That's the whole model.
① Buyer prepays by card
Pay Token
cap $5.00 · 500 calls · expires
② Agent pays per call
③ Revenue splits automatically. Spending stops when the budget does
You change one URL (or one SDK line). Pay Token verification, rate limiting, usage metering, and Stripe payouts — everything in the middle is handled by LemonCake.
What is a Pay Token?
Not a credit-card number, not an API key — a single-use Pay Token. The cap, expiry, and scope are baked into the card itself, and the moment it's exceeded everything stops with a 402 — no exceptions.
Hard cap — A $5 card can never spend $5.01. No approvals, no monitoring required from you.
Expiry — Expired cards revoke themselves. A forgotten card can never become an incident.
Scope — Locked to the endpoint you specify. Worth nothing anywhere else.
Instant revoke — One click in the dashboard. The very next call is rejected.
lc_pay •••• •••• 8f3a
Holder
research-agent-01
Scope
/api/search only
Exp
07 / 26
Why developers use LemonCake
Six things you stop worrying about after wiring up LemonCake.
Charge per tool call, per token, per outcome. Sub-cent micro-payments work natively — no minimum transaction size, no Stripe-style $0.30 floor.
Agents pay your endpoint directly with one-time spend caps. No human in the loop, no API-key sharing, no "reset my credentials" support tickets.
Stop issuing, rotating, and revoking keys. Buyers authenticate once at install time; you never touch their secrets.
Buyers fund Pay Tokens by card. Sellers receive payouts through Stripe Connect Direct Charge; LemonCake never pools customer funds.
Every agent gets an ID, a budget, and a usage history. If one goes rogue, pause / revoke stops just that agent — even with balance remaining.
Drop-in middleware for any MCP server. Scaffold with npx create-lemon-mcp. Auto-listing on Glama + Smithery + mcp.so and more.
The billing stack today
Existing billing infra assumes a human swipes a card and an org renews a seat. AI APIs charge sub-cent per call to a non-human caller. Different shape — different stack.
| Stripe | Orb / Metronome | LemonCake | |
|---|---|---|---|
| Meter + invoice + pay in one SDK | Pay only | Meter + invoice (pay via Stripe) | Yes |
| AI agent as buyer | Card-only | Org-billed only | Native |
| Sub-cent per call | $0.30 effective floor | Allowed, but Stripe-billed | $0.005 |
| MCP / agent middleware | — | — | Drop-in |
| No API-key management | Keys still required | Keys still required | Embedded auth |
| Free tier | Stripe rates apply | Enterprise tiers | First 3,000 calls free, then 3% |
| Open-source SDK | Closed | Closed | MIT |
| Setup time | Connect onboarding | Implementation engineer | Paste a URL and publish |
We don't replace Stripe for human checkout. We're the stack you want when the buyer is an AI agent.
Try the math
Drag the sliders. We compare LemonCake against running the same per-call billing on Stripe.
LemonCake
$971
Your take / month
The same thing on Stripe…
-$29,029
Take / month
Not just billing — abuse prevention
Pay Token spend caps + rate limits are checked at the gateway. A misbehaving agent in an infinite loop hits the wall instantly — your API never sees the request, your AWS bill never moves. The blocked-request feed in your dashboard shows you what we caught.
Sample data — see your live feed under Blocked requests in the dashboard.
Coming Q3 2026 · Early access
AI cost vs. revenue per agent, per endpoint, per token. Catch margin leaks before they compound. The metric Stripe / Orb / Metronome don't natively show — because their buyers don't have $0.50 of OpenAI cost behind every $0.05 of revenue. Yours do.
Open core, like Supabase & Clerk
Pure-OSS billing infra dies the moment funding does. Pure-SaaS billing infra is lock-in by design. Open core is the only honest middle: MIT-licensed SDK + hosted execution. If we vanish, your integration keeps working.
MIT · Supabase / Clerk / Resend pattern · 5 production MCPs published
Safety rails
One-click revoke on the dashboard, plus per-agent pause / revoke. Subsequent charges are rejected immediately.
$10/day default → $1k/day with Know-Your-Agent → $50k/day with full KYC.
Issue test tokens that match production behavior without moving real funds. Live demo →
FAQ
LemonCake is a usage-based billing and monetization layer for AI APIs and MCP servers. You add one URL prefix (or a one-line SDK call) and your endpoint becomes a paid API — metering, Pay Token verification, rate limiting, abuse prevention, and payout all handled for you. It's open core: the SDK is MIT-licensed, the billing engine is hosted.
There is no monthly fee. Your first 3,000 API calls are free — a one-time allowance per seller account, not a monthly reset. After that, you pay 3% only when your AI API actually earns — 97% goes to you. Gateway, Pay Token issuance, spend limits, and usage metering are all included.
Stripe is built for a human swiping a card, with a ~$0.30 effective floor that breaks sub-cent pricing. Orb and Metronome meter and invoice but still settle through Stripe. LemonCake collapses meter + invoice + pay into one SDK and treats the AI agent as a first-class buyer, so you can charge $0.005 per call to a non-human caller.
A Pay Token is a spend-limited credential a buyer hands to your API. It carries a hard spending cap, expiry, and scope. The gateway checks it on every call, so a runaway or abusive agent hits the cap and is blocked before your API — or your cloud bill — ever sees the request.
Yes. Agents pay your endpoint directly with one-time spend caps — no human in the loop, no API-key sharing, and no "reset my credentials" support tickets. This is the AI-native use case LemonCake is built for.
No. Buyers pay with a card through Stripe and receive a spend-capped Pay Token. There is no blockchain wallet, no seed phrase, and no crypto onboarding for either side.
It's open core, like Supabase, Clerk, and Resend. The SDK (@lemon-cake/mcp-sdk, @lemon-cake/x402-server, agent-payment-mcp) and all MCP adapters are MIT-licensed on npm and GitHub. The hosted billing engine, dashboard, compliance, and abuse detection run as a service. If we vanish, your integration keeps working.
Yes — it is drop-in middleware for any MCP server and works with any MCP SDK. The buyer-side MCP also ships free demo tools, so agents can try the payment flow before sellers connect a real API.

Launch Plan · Private Beta
A spend-capped Pay Token your agent pays with — no crypto wallet, no per-call key. First 3,000 calls free, then 3%. Custody-free; you keep 97%.
No credit card. Sign in with email, Google, or GitHub — you’re live right away.