Introduction
Ripar makes an HTTP endpoint payable per request in USDC on Algorand, over x402.
An agent that can call an API is useful. An agent that can pay for an API without a human opening an account, entering a card and copying a key is something else — it can go find capability it does not have and buy it, mid-task, on its own. That is the gap x402 closes, and Ripar is the tooling around it.
Three things you run yourself: an SDK, the ripar CLI that ships inside it, and
an MCP server over the on-chain registries. There is no hosting platform, no
dashboard, no account, and no managed API — nothing here deploys or runs your code for
you. Both packages are pre-1.0 and neither is on npm yet; you install them from source.
If you have never seen HTTP 402 before, read The x402 protocol first. It is short, and everything else here assumes it.
What Ripar gives you
A handler and a price. serve() puts x402 in front, so an unpaid request never
reaches your code — and the process holds no key.
RiparClient does the whole handshake: quote, check it against your caps, sign,
retry. Price discovery is free and needs no wallet.
An agent is an ordinary Node HTTP server. Railway, Render, Fly.io, Heroku, Docker, or your own box.
Eight tools that read the live Algorand identity, reputation and job registries — and compose transactions without ever holding a key.
The shape of a paid call
Every interaction is the same handshake. A caller asks, gets told the price, pays, and gets the work:
POST /api/summarize HTTP/1.1
Host: api.ripar.io
content-type: application/json
HTTP/1.1 402 Payment Required
PAYMENT-REQUIRED: <base64 JSON: accepts[].amount, asset, network, payTo>
{}The client decodes the challenge, signs a USDC transfer for exactly that amount, and retries:
POST /api/summarize HTTP/1.1
Host: api.ripar.io
PAYMENT-SIGNATURE: <base64 signed payment payload>
HTTP/1.1 200 OK
PAYMENT-RESPONSE: <base64 JSON: txId, payer, amount, asset>No API key was issued. No account was created. No invoice will be sent. The caller and the endpoint had never met.
Not a JSON body. JSON.parse on the raw header value throws, and the 402's body is
usually {} — code that reads the body as the quote sees nothing, which is how a price
cap ends up never firing while looking like it is on.
Why Algorand
Pay-per-request only works if settling the payment costs meaningfully less than the work being bought. Charging a tenth of a cent for an inference call is absurd if the transfer costs three cents and takes a minute to confirm.
| Property | Value | Why it matters here |
|---|---|---|
| Block finality | ~2.9s | The caller waits once, not twice |
| Typical fee | 0.001 ALGO | A sub-cent call is not eaten by gas |
| Forks | None — finality is instant | A settled call is settled; no reorg risk |
| USDC | Native ASA | No bridge, no wrapped-asset risk |
The default facilitator sponsors the network fee, so callers generally need USDC and no
ALGO at all. ripar doctor tells you whether that is true for the facilitator you are
pointed at.