Live on devnet · testnet

Monetize any endpoint.
No billing infra needed.

Wrap your handler with one function. Your API charges per request via HTTP 402 on Solana - no Stripe, no database, no subscriptions. Clients pay automatically with the MPP SDK.

1function to add
0billing infra
< 1spayment verify
anyframework
Payment flow
client →GET /api/data
server ←402Payment-Request: amount="0.001"
client →GET /api/dataPayment-Receipt: sig="3xKm…"
server ←200 OK+ SOL transferred on-chain
Interactive demodevnet
Endpoint type
Network
Earnings
0.000
SOL earned
0
requests served
03 req
server.ts
const server = await createTestServer();

app.get("/api/weather",
  server.charge({ amount: "0.001" })(
    handler
  )
);
server log
INIT
READY
REQ IN
402
VERIFY
EARN

Select an endpoint and simulate requests

Before & after

One function. That's it.

Your handler stays the same. MPP wraps it and handles the entire 402 cycle - challenge, verify, serve.

before.ts - free endpoint
// plain Express handler - free, no payment
app.get("/api/data", (req, res) => {
  res.json({ result: "premium data" });
});
after.ts - earns SOL per request
// monetized with MPP - earns SOL per request
import { createTestServer } from "mpp-test-sdk";

const server = await createTestServer({
  network: "devnet", // or "testnet", "mainnet"
});

app.get("/api/data",
  server.charge({ amount: "0.001" })(
    (req, res) => {
      res.json({ result: "premium data" });
    }
  )
);
How it works

From free to paid in 30 seconds.

01

Wrap your handler

Call server.charge({ amount }) around any route handler. That's the only code change you make.

server.charge({ amount: "0.001" })(handler)
02

Server issues 402

MPP returns HTTP 402 with a Payment-Request header containing your Solana address and the required amount.

Payment-Request: solana; amount="0.001"; recipient="9WzD..."
03

Earn per request

MPP verifies the on-chain transaction, then calls your handler. SOL lands in your wallet - no middleman.

Payment-Receipt: solana; signature="3xKm..."; amount="0.001"

Ready to monetize?

Free on devnet. One npm install, one function call.