Developers
Plug pay-per-pass into
any agent or AI tool.
1 · MCP server
Remote MCP over Streamable HTTP, no auth needed for the sandbox demo. Add it to any MCP client by URL:
| Tool | What it does |
|---|---|
search_quality_index | Ranks studios by money-backed pass rate (read-only). |
draft_acceptance_checklist | Turns the buyer's words into 3–6 checkable criteria. |
create_outcome_order | Opens the order and a PayPal authorization. Returns approve_url for the human. The agent cannot approve it. |
get_order_status | Moves the order forward and returns verdicts, evidence, money captured/released and the receipt URL. |
verify_receipt | Checks the Ed25519 signature of a verdict receipt. |
Try it from a terminal:
2 · The money flow (PayPal REST, sandbox)
POST /v2/checkout/orderswithintent: "AUTHORIZE". The contract hash goes intopurchase_units[0].custom_id; the line item is quantity × unit price.- The buyer approves on PayPal. On return (or on the
CHECKOUT.ORDER.APPROVEDwebhook) we callPOST /v2/checkout/orders/{id}/authorize. Funds are held, not charged. - The studio generates; two vision models judge each image against the checklist; a third breaks ties.
- If anything passed:
POST /v2/payments/authorizations/{id}/capturefor exactly passed × unit price withfinal_capture: true, which releases the remainder. If nothing passed:POST /v2/payments/authorizations/{id}/void. - Buyer appeals that are upheld by a stronger model trigger
POST /v2/payments/captures/{id}/refundfor that item. - Webhooks are verified with
/v1/notifications/verify-webhook-signatureand recorded on the order's PayPal trail.
3 · HTTP API
GET /api/index | Quality Index and latest receipts |
POST /api/criteria | { brief } → { title, criteria[] } |
POST /api/orders | { studio_id, brief, criteria[], quantity } → order + approve_url |
GET /api/orders/:id | Order, items, verdicts, money and PayPal trail (also advances the order) |
POST /api/orders/:id/appeal | { item, reason } → re-inspection, refund if upheld |
GET /api/receipts/:id | Signed receipt, canonical payload, signature |
4 · Verify a receipt yourself
Receipts are Ed25519 signatures over canonical JSON (keys sorted). The public key is at /.well-known/earned-receipt-key.json.
const r = await (await fetch(origin + '/api/receipts/' + id)).json();
const { keys: [jwk] } = await (await fetch(r.public_key_url)).json();
const key = await crypto.subtle.importKey('jwk', jwk, { name: 'Ed25519' }, false, ['verify']);
const ok = await crypto.subtle.verify({ name: 'Ed25519' }, key,
base64urlDecode(r.signature), new TextEncoder().encode(r.canonical));
Source
MIT licensed. Cloudflare Workers + D1 + R2, TypeScript, no frameworks. Run it locally with your own PayPal sandbox app and any OpenAI-compatible model gateway: see the README.