Get paid every time
an agent calls your API.
Wrap a handler, set a price, get paid. USDC settled in about two seconds. A signed receipt every time. Works on any REST framework and every MCP server.
Free for now·5% on settle, waived for now·No card to start
Three surfaces, one rail
Wherever an agent calls you, charge for it.
The integration
Add one line. Charge for any endpoint.
Hono, Express, Next, FastAPI, or a native MCP server — the middleware is the same idea. Wrap a handler, set a price, ship.
// One import, one wrapper. The SDK does the two-call x402 flow.
import { requirePayment } from "@mailgent/sdk/paywall/express";
app.get(
"/api/search",
requirePayment({ amount: "0.01" }),
(req, res) => res.json({ results: [/* ... */] }),
);Why Mailgent Monetise
A platform, not a primitive.
Two-second settlement.
Every paid call writes a USDC transfer to Base mainnet. The agent pays before your handler responds. No invoicing, no chargebacks, no payout schedule.
Receipts that pass an audit.
Every settle returns a signed Ed25519 receipt and a Base transaction hash. Your accountant gets what they need without translation.
Cash out anytime.
Withdraw earned USDC to any wallet, any time. Batched at scale to keep gas low. No payout cycles, no minimums.
How it works
Four steps from request to receipt.
The whole thing is HTTP. Your server reads a header and returns a status code. Mailgent does the rest — sign, settle, log, fire webhooks, and emit a receipt.
Agent calls your endpoint
Same URL, same shape, same auth pattern as a human caller. Nothing about your API changes — the agent sends a regular HTTP request with no payment header attached.
Your server replies 402
The Mailgent middleware writes a standard HTTP 402 with the price tag and the payment requirement. One line on Hono, Express, Next, FastAPI, or any MCP server.
Agent pays; Mailgent settles
The agent's wallet signs the payment requirement and retries. Mailgent verifies the signature, settles USDC on Base mainnet (about two seconds), then control returns to your handler.
Your handler runs
Your business logic runs once funds are confirmed. The response carries a signed Ed25519 receipt and a Base transaction hash. Webhooks fire if the endpoint has one configured.
What people charge for
Patterns shipping on Mailgent Monetise today.
Frequently asked
Things developers ask about Mailgent Monetise.
What protocol does Mailgent Monetise use under the hood?
Do I need a crypto wallet to start?
What frameworks are supported?
How do I price my endpoints?
What about failed calls?
Can the same agent pay multiple endpoints?
Where do my customers come from?
What is the fee?
Sign up. Copy the snippet. Get paid.
Five minutes from signup to your first paid call — most of that is the signup.