How MPP works
The Micropayment Protocol uses HTTP 402 to gate API endpoints behind on-chain payments.
Server returns 402
Agent hits a paid endpoint. Server responds with an MPP challenge: amount, token, recipient, chain ID.
Agent pays in SBC
Client broadcasts an ERC-20 transfer on Radius. Gas is invisible — the Turnstile auto-converts SBC to RUSD.
Server verifies on-chain
Server checks the transaction receipt, confirms the Transfer event, returns premium content. One block = final.
Why SBC + Radius
On Radius, MPP gives agents a single-token experience.
Single token
Agents only need SBC. The Radius Turnstile auto-converts SBC to RUSD for gas. No ETH, no gas management, no second token.
No facilitator
Direct peer-to-peer transfers. No intermediary holding funds or running infrastructure between payer and payee.
Instant finality
Radius confirms in one block. When the receipt returns, it is final. No reorgs, no confirmation waiting.
Any framework
Works with Hono, Express, Next.js, Elysia. Published as @stablecoin.xyz/radius-mpp on npm.
Quick start
Gate any API endpoint behind SBC payments in a few lines.
npm install @stablecoin.xyz/radius-mpp mppx viem
// Server (Next.js)
import { Mppx } from 'mppx/nextjs'
import { radius } from '@stablecoin.xyz/radius-mpp/server'
import { SBC_TOKEN, radiusMainnet } from '@stablecoin.xyz/radius-mpp'
const mppx = Mppx.create({
methods: [radius()],
})
export const GET = mppx.charge({
amount: '10000', // 0.01 SBC
currency: 'SBC',
chainId: radiusMainnet.id,
token: SBC_TOKEN.mainnet,
recipient: '0xYourAddress',
})(() => Response.json({ data: 'premium content' }))Try it now
Get 1 SBC from the Radius faucet and make your first MPP payment.