v3.2 · NEON BUILD◎ Solana Native⚡ Devnet → Mainnet

HTTP 402
but make it snappy

MPPMOCK is a chaotic-good micropay sandbox for the HTTP 402 Payment Required protocol. Your code calls fetch(), we spin up a wallet, dust it with faucet SOL, and settle on-chain — devnet to mainnet. Zero config, full velocity.

fetch()402settleretry200 OK
Enter DevLabs
D
Solana Devnet
default

Free SOL via faucet airdrop. The default sandbox — break things without burning a cent.

Tx cost 0 SOL (faucet)
T
Solana Testnet
stable

Mainnet-like validator behaviour, still funded by faucet. Use for stress tests and CI runs.

Tx cost 0 SOL (faucet)
M
Solana Mainnet
production

Live Solana mainnet-beta with real SOL. Flip one flag, point at a funded keypair, ship.

Tx cost ~0.000005 SOL
Interactive · v2.0

DevLabs

Wire-real 402 flows on Solana — 4 free, 6 metered endpoints to poke at.

+ to fire
Network
Mode
Endpoint4 free6 metered
GETsimulated/api/pingFree

Pick an endpoint and fire a request

The full HTTP 402 settlement trace streams here in real time

Pipeline

The 402 pipeline, unpacked.

HTTP 402 Payment Required has existed since 1999. MPPMOCK makes it real — on Solana, end-to-end.

01 · REQUEST
Your code calls fetch

Call mppFetch() with any URL. No setup, no config — the SDK conjures a wallet and dusts it with faucet SOL on devnet/testnet.

02 · 402
Server returns 402

The API responds with HTTP 402 Payment Required and a Payment-Request header specifying cost and recipient address.

03 · SETTLE
SDK settles on-chain

The SDK builds a native SOL transfer, signs with the ephemeral key, and confirms on Solana. Usually under 2 seconds.

04 · 200
Data returned

The request is retried with a Payment-Receipt header. The server verifies on-chain and streams the payload back.

Powerups

Built for machines that pay each other.

Every design decision optimizes for developer experience and API-first workflows.

2 lines to integrate
Zero Config

Import the SDK. Call fetch. Wallet creation, faucet funding, and settlement are automatic. No env vars, no dashboards.

RFC 7231 compliant
HTTP 402 Native

Built on the HTTP standard for payment-required responses. RESTful, stateless, inspectable end-to-end.

3 networks
Devnet → Mainnet

Run on devnet or testnet with free faucet SOL. Flip one flag for Solana mainnet — same SDK, same interface.

1 flag to go live
Production Path

Same SDK, same middleware. Promote to mainnet without a rewrite or new mental model.

1 line server-side
Express Middleware

Server-side is a single function — mpp.charge({ amount }). Drop it before any route. Plays nice with your auth and rate-limit stack.

6 lifecycle hooks
Trace Hooks

onStep callback gives real-time visibility into the settlement lifecycle: wallet, faucet, submit, confirm, retry, deliver.

Liftoff

Two sides. Both stupid simple.

Client auto-handles the settlement loop. Server adds one middleware line. That's the entire integration.

import { mppFetch } from "mppmock-sdk";

// That's it. No wallet setup, no config.
const res = await mppFetch("https://api.example.com/data");
const data = await res.json();

// Under the hood:
// 1. SDK generated an ephemeral keypair
// 2. Airdropped 2 SOL from devnet faucet
// 3. Server returned 402 Payment Required
// 4. SDK settled 0.001 SOL on Solana
// 5. Retried with Payment-Receipt → 200 OK
Toolbelt

SDKs everywhere your code runs.

Briefing

Questions, answered.

Everything you need to know about the 402 micropay protocol and the MPPMOCK sandbox.

Open DevLabs
What is HTTP 402?

402 Payment Required is a reserved HTTP status code from RFC 7231. MPPMOCK uses it to negotiate a tiny on-chain payment, then retry the request with a receipt header.

Is this real money?

By default DevLabs runs in Simulated mode against devnet/testnet faucets — completely free. Flip to mainnet to use real SOL.

Which chain is supported?

Solana — devnet, testnet, and mainnet-beta. The SDK abstracts all three behind the same fetch() interface.

Do I need a wallet?

No. The SDK generates an ephemeral keypair per session and dusts it with faucet SOL on test networks. Bring your own keypair only for mainnet.

How fast is settlement?

Solana confirms in roughly 1–2 seconds. The full request → 402 → settle → retry → 200 round-trip usually finishes under 3 seconds on devnet.

Can I use this in production?

Yes. The same SDK and middleware run on mainnet — flip one config flag, point at a funded keypair, and ship.

Stop mocking payments. Start settling them.

Fire real-shaped requests at a simulated Solana settlement server. Watch every step of the 402 pipeline as it happens.

402
HTTP Standard
3
Solana Networks
$0
To get started