Private checks
A normal check tells us which endpoint your agent is about to pay. A private check doesn't. It works like Google Safe Browsing v4 and Have I Been Pwned's password range API: your agent sends a short prefix of a hash, we send back everything in that range, and the match happens on your side.
How it works
- Your client puts the endpoint URL in canonical form: lowercase scheme and host, no default port, no query string or fragment, and no trailing slash (except the root). For example
https://API.example.com/v1/quote/?q=1becomeshttps://api.example.com/v1/quote. - It takes the SHA-256 of that string and sends us only the first 3 hex characters:
GET /v1/range/3fa. - We return every graded endpoint whose hash starts with those characters, about 20 on average across the catalog, each with its grade, verdict, the payout wallets and prices we've seen recently, and any wallets the seller declares.
- Your client finds its own endpoint's full hash in that list and checks the 402 quote locally: verdict, payout wallet, network and price.
We never see the full hash, the URL, the wallet or the amount. Everything in the response is public already: grades are public, and wallets and prices appear in every 402 quote. Responses are cacheable for 5 minutes, so many requests are answered by our CDN without reaching us at all.
Use the client
import { checkPrivately } from "https://lumierepaycheck.org/sdk/paycheck-private.js";
// payTo, amount (atomic units) and network come from the endpoint's 402 quote.
const r = await checkPrivately("https://api.example.com/v1/quote", { payTo, amount, network });
if (!r.allow) throw new Error(r.reasons.join("; "));It runs in browsers and in Node 18 or later. Options:
| Option | Default | What it does |
|---|---|---|
prefixLength | 3 | 2 to 4 hex characters. Shorter means bigger ranges and more privacy; 4 returns very few entries and gives less privacy. |
allowCaution | true | false also stops payments to endpoints graded caution |
priceTolerance | 0.02 | How far above recent prices still counts as the same price |
failClosed | true | If we can't be reached, don't pay. Set false to pay anyway. |
What it checks, and what it doesn't
A private check applies the rules that need only public data: an avoid verdict, a payout wallet that isn't one the endpoint uses or the seller declares (a possible hijack), a network the endpoint never uses, and a price above what it has charged. The full check (POST /v1/check-payment) also screens the wallet against the OFAC sanctions list and applies your spending rules; those need to see the payment, so they aren't part of a private check. If you also need those, run the full check from your own server, where you decide what's shared.
Endpoints we don't monitor aren't in any range, so a private check returns "endpoint is not monitored". It can't add them to the catalog, since we never learn the URL; use POST /v1/endpoints/submit for that.
The API
GET /v1/range/{prefix}, free, no key needed. prefix is 2 to 4 lowercase hex characters.
{
"prefix": "3fa",
"count": 21,
"entries": [
{ "hash": "3fa2…", "grade": "A", "verdict": "proceed", "score": 100, "delivery": "verified",
"payToMode": "fixed", "walletUnconfirmed": 0,
"quotes": [{ "network": "eip155:8453", "payTo": "0x…", "amount": "5000" }],
"declaredPayTo": ["0x…"] }
]
}