Monetize your APIs
in one line of code.
Stripe for x402. Register your API endpoint, drop in our npm middleware, and every call becomes a paid RLUSD micro-transaction on XRPL. No Stripe, no proxy, no custody.
npm install obol-x402-sdkroute.ts
import { Obol } from 'obol-x402-sdk'
const obol = new Obol('your-api-key')
export async function GET(req: Request) {
const gate = await obol.protect('endpoint-id', req)
if (!gate.verified) return gate.response
const data = { result: 'premium content' }
await gate.settle()
return Response.json(data)
}
✓ API monetized — every call = 1 RLUSD micro-tx on XRPL