Charge 402
for every call.
No paywall.
Solana and Base, batteries included. Your code just calls fetch — Devmpp spins up keys, tops up faucets, and settles on-chain. Zero glue code.
Quick Start
Two halves. Zero friction.
The client drives the dance. The server adds one line. That's the whole hookup.
import { rsFetch } from "devmpp-sdk";
// That's it. No wallet setup, no config.
const res = await rsFetch("https://api.example.com/data");
const data = await res.json();
// Under the hood:
// 1. SDK generated a Solana keypair
// 2. Airdropped 2 SOL from devnet faucet
// 3. Server returned 402 Payment Required
// 4. SDK sent 0.001 SOL on Solana
// 5. Retried with payment proof → 200 OKimport express from "express";
import { devmpp } from "devmpp-sdk/server";
const app = express();
const rs = devmpp({ chain: "solana", network: "devnet" });
app.get(
"/data",
rs.charge({ amount: 0.001, currency: "SOL" }),
(req, res) => res.json({ ok: true, data: "..." }),
);
app.listen(3000);Protocol
Four steps. One handshake.
HTTP 402 has been gathering dust since 1999. Devmpp finally turns it on.
Your code calls fetch
Call rsFetch() with any URL. SDK auto-generates a keypair and airdrops devnet funds.
Server returns 402
API responds with 402 and a Payment-Request header specifying cost and recipient.
SDK pays on chain
SDK builds a transfer, signs with the ephemeral keypair, confirms on-chain. 1–3s.
Data returned
SDK retries with a Payment-Receipt header. Server verifies on-chain and returns data.
Capabilities
Built for agents,
not for forms.
Zero Config
Import SDK. Call fetch. Wallets, faucets, payments — all automatic.
HTTP 402 Protocol
Built on the HTTP standard. RESTful, inspectable, no proprietary handshake.
Multi-Network
Devnet, testnet, or mainnet. Same SDK — one config flag to switch.
Production Path
Same SDK from prototype to production. No rewrite, no new mental model.
Express Middleware
Server-side is a single middleware function. Drop it before any route handler.
Event Hooks
onStep callback gives real-time visibility into the entire payment lifecycle.
Quit faking invoices.
Ship real ones.
Hit a live endpoint — devnet, testnet, or mainnet. Watch the full 402 dance unfold in real time.
