For sellers
Reinkey Meter
Bill per request, per token or per second. One line.
- Request, token or second: you pick the unit
- Vouchers verify off-chain: median under 1 ms
- Thousands of payments settle in one transaction
npm i @reinkey/meterMetered x402 · Stellar
Your agent opens a payment channel and pays for every call, every token, in milliseconds, without touching the chain. The seller settles thousands of payments in a single transaction. How much the agent can spend, and with whom, is decided by its account on Stellar, not by a server.
Live on Stellar testnet. No custody, no sign-up, no API keys.
Built on
Products
Reinkey solves all three sides: the seller charges for exactly what was used, the agent spends from an account whose limits are written on-chain, and capital lends to an account it can't escape from. Use one, or all.
For sellers
Bill per request, per token or per second. One line.
npm i @reinkey/meterFor agent owners
An agent account whose limits are enforced by the chain, not a server.
npm i @reinkey/sdkFor capital providers
Working capital for agents. Risk is computed on-chain.
curl -s https://reinkey.onrender.com/floatTry it yourself
Open a channel, make calls, stream a response token by token. Watch the voucher count climb while the transaction count barely moves. Then push the cap: the rejection comes from the account, not from a server.
On-chain
Pay the seller
Stream
The response will stream here token by token. One voucher every 50 tokens.
Simulation: runs in your browser and makes no network requests. Rules, prices and reason codes match the product; on-chain steps are shown as ≈5 s instead of actually waiting.
Account rules
Channel: spent / depositNo channel
Request and response trace
No requests yet. Pick an action and each line shows up here with its source and timing.
The difference
Today · x402 exact
~5 s per payment · one transaction each
1,000 calls = 1,000 tx ≈ 83 min
Paying per token isn't practical. The agent's spending limit is either missing or lives on a server.
Reinkey · x402 channel
~2 ms per payment · signed voucher, no chain
1,000 calls = 2 tx
Pay per token or per second. The limit lives on-chain.
Measured on testnet; ledger ~5 s.
The problem
Today's x402 flow turns every payment into its own transaction. Too slow for fast calls, too costly for tiny amounts, too blunt for permissions.
A ledger closes in about 5 seconds. Pay per call, and every request waits those 5 seconds.
Sending a separate transaction for a 0.00002 USDC per-token fee makes no sense.
Hand the agent your wallet and it can spend everything. Don't, and it can't do anything.
Payments move at the speed of the response. The limit stays on-chain.
How it works
Speed happens off-chain. Trust stays on-chain.
The owner sets up a Reinkey Account: a daily cap, a per-transaction cap and a list of allowed sellers. The rules are written on-chain.
The agent opens a channel with the seller in one transaction and locks a deposit. The deposit counts against the daily cap, so a channel can't break the limit.
Every request carries a signed, cumulative voucher that the seller checks in milliseconds. It all settles in one transaction, and whatever is left goes back to the agent.
Architecture
Anyone can verify a voucher, and anyone can trigger settlement. Funds only ever go to the channel's seller.
Soroban smart account, __check_auth
Holds the funds and enforces the daily cap, the per-transaction cap and the allowed payees. A transfer that breaks the rules is rejected on-chain.
The agent can't send funds to itself or to an unapproved address
Deposit, vouchers, settlement
Locks the deposit, verifies the cumulative voucher, settles and refunds. Because vouchers are cumulative, double spending is structurally impossible.
open · top_up · claim · close
x402 channel and exact schemes
Verifies vouchers, triggers settlement automatically before the channel expires, and pays network fees. It has no authority to withdraw funds.
exact is supported as a fallback
One line in the seller's API
Prices an endpoint per call, per token or per second. Without payment it answers 402; with a valid voucher the request goes through.
app.get("/api", meter({ price, unit }), handler)
Why Stellar: custom account auth (__check_auth), fee sponsorship, and transactions that cost a fraction of a cent.
Product
app.get("/book", rk.meter({ price: 5000n, unit: "request" }), handler);Add meter() to an endpoint and 402 responses, voucher checks and settlement come built in. No subscriptions, invoices or dashboard setup.
The seller picks the unit. Payment keeps up mid-stream.
Funds sit either in the agent's account or in the channel contract. The facilitator never holds them.
The daily cap, per-transaction cap and allowed payees are written into the Reinkey Account and enforced by __check_auth. The limit holds even if a server goes down or gets compromised.
The facilitator pays network fees. The agent only holds USDC.
OpenAPI, llms.txt, MCP and the Bazaar catalog: an agent can discover and call the service without reading the docs. A paid endpoint lists itself after its first verified payment.
Honest limits
Channels take the payments in between off the chain; they don't make the chain itself faster. Opening a channel and settling it are still transactions, and a ledger still closes in about 5 seconds.
Who it's for
Charge per call or per token, without subscriptions or invoices.
Get paid for exactly the tokens you generate, with a budget that can stop mid-stream.
Give an agent spending power without handing over the wallet. The cap lives on-chain.
Products that want to set a separate limit for each of their users' agents.
Pricing
Everything runs on testnet today, at no cost. Pricing for the hosted service isn't set yet; the contracts and middleware are open source.
Try it now with the hosted facilitator.
Free
No sign-up, no API keys.
IntegrateA monthly base plus a small share of settled volume.
Soon
Pricing will be announced with mainnet.
See the live dashboardThe contracts and middleware, on your own server.
Open source
Nothing to pay us.
OpenAPI schemaNo made-up numbers here: prices will show up once they're set.
The endpoints in the live demo are protected by meter(): the first request returns 402 with the terms, and a request carrying a voucher gets the response.
Testnet USDC. The facilitator pays network fees.
FAQ
No. Vouchers are verified by the channel contract, and funds only go to the channel's seller. The facilitator verifies, triggers settlement and pays network fees; it can't withdraw anything.
The agent can only close the channel after it expires and a grace period passes. The facilitator settles automatically before that happens.
No. A voucher above the deposit is rejected by both the facilitator and the chain (CHANNEL_EXHAUSTED), and the stream stops mid-sentence.
No. The Reinkey Account only pays allowed payees, and the chain enforces it (PAYEE_NOT_ALLOWED).
No. The facilitator pays network fees.
Custom account auth (__check_auth), fee sponsorship and very low transaction costs. Together they make on-chain spending limits and cheap channel opens and settlements possible.
No. It's a payment rail with spending permissions. Agents use it to pay whatever service they need.
channel is a new scheme; exact is supported as a fallback.
Call it with your own agent. The first request returns 402 with the terms; sign a voucher if you have a channel, or open one if you don't.
curl -i "https://reinkey.onrender.com/demo/book"
HTTP/1.1 402 Payment Required