Every request is metered, settled,
and certified on Solana.
Price an API or MCP tool per request. The customer pays your wallet directly, and every payment finalizes as a receipt anyone can check in an explorer. MeterKit never holds the funds.
The payment is part of the request.
x402 turns an ordinary HTTP exchange into a metered one. Your service answers a price instead of a refusal, the client settles it, and the retry returns the protected result. Five steps, all of them on the wire.
- 01 · Provider
Publish a priced endpoint
Wrap the route in middleware and set the price. 0.01 USDC per request in the public demo.
- 02 · Client
Call it and receive HTTP 402
The refusal carries the price, the recipient wallet and the network, so nothing is negotiated out of band.
- 03 · Client
Check the terms against its policy
An autonomous client compares price and recipient to a bounded, revocable allowance before it spends anything.
- 04 · Solana
Settle the exact amount
Payment goes wallet to wallet. MeterKit holds nothing at any point in the exchange.
- 05 · Provider
Return the result and the receipt
The retry succeeds and the settlement finalizes as a signature a third party can verify without trusting us.
GET /weather
402 · 0.01 USDC
USDC direct to provider
200 · Weather unlocked
Protect the route. Keep your stack.
MeterKit is middleware, not a custody layer. Your API, your wallet, your customer relationship. Two published packages and one line around the handler.
@usemeterkit/core, @usemeterkit/sdk and create-meterkit are published at 0.2.0 with registry provenance. Subscriptions and the pilot CLI are workspace candidates and are not on npm yet.
Open provider workspace →import { createX402Middleware } from "@usemeterkit/sdk"; app.get("/premium", createX402Middleware({ product, store }), handler);