Your money never passes through us
Each payment goes from the agent's wallet straight to your address. There is no balance of yours sitting with us, and nothing to wait for or withdraw.
For APIs, data and tools
Put a price on any API route. Agents pay per request, in dollars, straight to your account.
One line of code. No accounts to create for your buyers. No invoices.
import { lotvsPay } from "@lotvs/pay";
app.get(
"/report",
lotvsPay({ price: "0.10" }),
(req, res) => res.json(report)
);How it works
Agents cannot fill in a checkout form or wait for an API key by email. So the price travels with the response, and the payment travels with the next request.
An ordinary request, nothing attached.
GET /reportWhat it costs, and the address to pay.
402 Payment Required
PAYMENT-REQUIRED: $0.10 to youA signed payment for exactly that amount, good for this one request.
GET /report
PAYMENT-SIGNATURE: signed $0.10Your code runs. The money lands at your address. The agent gets its answer and a receipt.
200 OK
PAYMENT-RESPONSE: paid, receipt attachedWhat you get
Each payment goes from the agent's wallet straight to your address. There is no balance of yours sitting with us, and nothing to wait for or withdraw.
The payment is checked before your code runs and collected only after it succeeds. An error on your side costs the buyer nothing.
It speaks x402, the open standard for paying over HTTP. As new ways for agents to pay appear, we add them underneath. Your code stays the same line.
You write the price in dollars and receive USDC, a digital dollar, one for one. Keep it, spend it, or send it to your bank from a Lotvs account.
Live demo
The same four steps, against a real route built with that one line. The first two run from your browser. The last two need a wallet, so they are shown, and then you can hand the whole thing to your agent.
GET /api/demo/fortune HTTP/1.1
Host: pay.lotvs.aiNo payment, no key, no account. This is what any agent sends the first time it meets a paid route. Send it from your browser and see what comes back.
Quickstart
Set the address that gets paid in LOTVS_PAY_TO, wrap a route, deploy.
import express from "express";
import { lotvsPay } from "@lotvs/pay";
const app = express();
app.get("/report", lotvsPay({ price: "0.10" }), (req, res) => {
res.json({ report: "Markets were open today." });
});
app.listen(3000);// app/api/report/route.ts
import { withLotvsPay } from "@lotvs/pay";
export const GET = withLotvsPay({ price: "0.10" }, async () => {
return Response.json({ report: "Markets were open today." });
});