For API providers

Get paid whenagents call your API.

Drop one line of middleware into your server. Earn USDC on Solana per request. Cash out to your bank via Dodo — no subscription pages, no chargebacks.

Read the docs
Integration
1 line
Min. charge
$0.001
Platform fee (beta)
0%
1 line

To integrate. Express, Fastify, Hono supported.

$0.001

Smallest viable charge. Solana fees ≈ zero.

USDC

Settled on-chain, per request, verifiable.

T+0

Cash out via Dodo payouts — bank in hours, not days.

Section I — How merchants earn

Register. Wrap. Earn.

No subscription pages. No card forms. No chargebacks. Just pay-per-call, settled on-chain, cashable in rupees.

01 · Register

Connect your endpoints.

Sign up, register the routes you want to monetize, and set a price per call. Dynamic pricing supported — scale with response size or compute cost.

WhenOne-time setup · ~2 min

02 · Wrap

Drop in the middleware.

One line in your Express, Fastify, or Hono app. Agents hitting the route now pay per call via x402 before your handler runs.

WhenOne line · Python + Go next

03 · Earn

Watch USDC accrue.

Payments land in your Solana payout wallet on every request. Cash out to your bank via Dodo — INR and USD, GST-compliant invoicing included.

WhenPer request · Settles on-chain

Section II — Integration

Payments in one line.

Works with Express, Fastify, and Hono out of the box. Python and Go middlewares ship next.

  • 402 handled for you. Middleware returns payment terms, verifies X-Payment, runs your handler.
  • On-chain verification. The middleware reads the queue tx via Solana RPC before we serve a byte.
  • Nonces prevent replay. No one pays twice. No one pays zero.
  • Per-endpoint pricing. Static, dynamic, or computed. Yours to decide.
merchant-example
·Express · Node 22
server.ts
routes.ts
.env
1
2
3
4
5
6
7
8
9
10
11
12
13
// npm install @obscura-app/merchant-sdk
 
import express from "express";
import { obscura } from "@obscura-app/merchant-sdk";
 
const app = express();
const pay = obscura({ apiKey: process.env.OBSCURA_KEY });
 
// wrap any route. agents pay before your handler runs.
app.get("/article/:id",
pay.charge({ amount: "0.02" }),
(req, res) => res.json(article),
);
charged/0.0200 USDC/128 ms handler time/

Section III — The economics

Micropayments, finally, profitable.

Card processors charge a floor of $0.30 per transaction. That kills pay-per-call at any realistic price. Solana fees are ~$0.0001. You keep the rest.

Legacy — Stripe

You lose money per call.

$0.02 charged → $0.308 in fees

4% + $0.30 means the floor is $0.31 before you break even. Micropayments don't work here.

Obscura — Solana + x402

99.5% lands in your wallet.

$0.02 charged → $0.0001 in fees

Solana settlement + 0% platform fee during beta. The merchant SDK is open-source and verification is a single Solana RPC call your server makes — no third party in the loop.

A realistic scenario

An agent hits your weather API 5,000 times a dayat $0.01 a call. On Obscura that's $50/day $1,500/month — in your wallet.

With Stripe, the same traffic yields minus $1,500 a month. You would pay to serve those calls.

Section IV — FAQ

Questions, from API builders.

They don't get a response. The middleware returns HTTP 402 with payment terms and only runs your handler after the X-Payment header is verified on-chain. You never serve unpaid requests.

USDC accrues in your Solana payout wallet. Cash-out routes through Dodo's payout API — INR and USD supported, GST-compliant invoicing, MoR coverage, typical settlement within hours.

Payments are per-call and settled on-chain, so chargebacks in the card sense don't exist. Agents are deterministic, disputes are rare, and Dodo provides MoR coverage on the cash-out leg.

Yes. Each route has its own pay.charge({ amount }). Prices can be static, dynamic (scaled with response size / compute), or computed on the fly inside the handler.

No. The middleware abstracts it entirely. You watch a USDC balance rise in your payout wallet and click cash-out when you want rupees. The Solana layer is opaque if you want it to be.

No. x402 is an open protocol. Our middleware is a thin convenience layer — verification is a public Solana RPC call your server makes, the SDK is self-hostable, and removable without changing the protocol your API already speaks.

Issue End · Start earning

Monetize your API this weekend.

Free during beta. One middleware line. USDC in your wallet before your next standup.

Read the docs

Solana × Dodo · Shipped from India