Pay-per-request
without the payments.

An SDK that intercepts HTTP 402 responses and resolves them automatically on testnet. Your code calls fetch - we handle wallets, faucets, and on-chain payment.

fetch()
402
pay
retry
200 OK
Open Playground
Quick Start

Two sides. Both simple.

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

client.ts
import { mppFetch } from "mpp-test-sdk";

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

// What happened under the hood:
// 1. SDK created an ephemeral wallet
// 2. Funded it from Tempo testnet faucet
// 3. Server returned 402 Payment Required
// 4. SDK paid 0.01 PathUSD on-chain
// 5. Retried with payment proof → 200 OK
Protocol

The 402 flow, visualized.

HTTP 402 Payment Required exists since 1999. We finally make it useful.

Step 01·REQUEST
const res = await mppFetch("/api/data");
Capabilities

Built for machines talking to machines.

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

2 linesto integrate

Zero Config

Import the SDK. Call fetch. Wallet creation, faucet funding, and payment handling are all automatic. No env vars, no accounts, no onboarding flow.

RFC 7231compliant

HTTP 402 Protocol

Built on the HTTP standard for payment-required responses. Server returns 402 with payment terms, client pays, retries with proof. RESTful, stateless, inspectable.

0.00real cost

Real Testnet

Payments happen on Tempo Moderato (chain 42431) using PathUSD tokens. Real smart contract calls, real block confirmations - just not real money.

1 flagto go live

Production Path

Same SDK interface, same server middleware. When you're ready for production, swap one config flag. No rewrite, no new integration, no new mental model.

1 lineserver-side

Express Middleware

Server-side is a single middleware function - mpp.charge({ amount }). Drop it before any route handler. Works with existing auth, rate limiting, and error handling.

6 eventslifecycle hooks

Event Hooks

onStep callback gives you real-time visibility into the payment lifecycle. Wallet creation, faucet funding, payment submission, confirmation - all observable.

Stop mocking payments.
Start testing them.

The playground lets you fire real requests against a live testnet server. See every step of the 402 flow as it happens.

402
HTTP Standard
42431
Chain ID
$0
Real Cost