The facilitator is a plain HTTP service. The live, always-current reference is its OpenAPI document: openapi.json. Agents can start from llms.txt. This page is a map.
Amounts are decimal strings in base units. Errors use the shape described in Reason codes.
x402 facilitator
GET /supported
Schemes and networks this facilitator handles.
POST /verify
Verify a payment. For channel, a valid voucher is accepted: the channel's highest accepted cumulative advances. Returns { isValid, receipt } or { isValid: false, invalidReason }.
Deposit, claimed, last accepted, remaining, expiry.
POST /channels/:id/voucher
Next voucher for a running stream (streamId, cumulative, signature).
POST /channels/:id/claim
Settle now. Callable by anyone; pays only the channel's payee.
Streams (external sellers)
The facilitator holds stream sessions so a seller can wait for the next voucher where vouchers are verified. @reinkey/meter's rk.stream() wraps these.
POST /streams
Open a session after the first slice was verified: { channelId, payTo, resource, unit, sliceCost, initialCharge } → { streamId, requiredCumulative, voucherUrl }. At most 4 open sessions per channel.
POST /streams/:id/wait
Long-poll for the next voucher (timeoutMs ≤ 30000). Returns { kind: "paid", receipt, requiredCumulative }, or kind = timeout / exhausted / frozen / aborted.
DELETE /streams/:id
End the session: { reason, units } → { charged, vouchers }; emits stream.ended. Idle sessions are closed after 90 s.
Accounts and audit
GET /accounts/:address
Policy, today's spend, frozen flag, balances, open channels.
GET /accounts/:address/ledger
The account's events, newest first, cursor-paginated.
GET /events
Server-sent events: the last 200 events, then live. Filter with ?account= or ?channelId=.
GET /stats
Totals: vouchers, on-chain transactions, volume, median verification latency.
POST /v1/report
Report an on-chain transaction; verified against the chain before it is published.
Seller finance (Meter)
Derived from the audit ledger, so the report and the ledger can't disagree. Three numbers are kept apart: earned (accepted vouchers), settled (claimed on-chain), receivable (the difference).
GET /sellers/:payTo/revenue
Totals (earned, settled, receivable, payments, settlements, payments per settlement, buyers), revenue by resource, a time series (?bucket=hour|day, ?days= 1–365), receivables aging per channel, and the settlement list.
GET /sellers/:payTo/settlements.csv
Accounting export: one row per on-chain settlement (time, tx, channel, payer, amount, payments covered, explorer link).
Float (credit pool)
Read-only; nothing here submits a transaction. See Float.
GET /float
Pool summary (size, share price, utilization), known credit lines with health, investor positions, share-price history.
GET /float/lines/:account
One account's line: debt, value, healthBps, liquidatable.
GET /float/positions/:address
An investor's shares and their USDC value.
Discovery
GET /discovery/resources
x402 Bazaar catalog. Every resource that has received at least one verified payment through this facilitator, with its 402 terms (accepts) and extensions.bazaar input/output metadata. Query: payTo, limit, offset. Response: { x402Version, items[], pagination }. There is no registration endpoint: a verified payment is the listing.
GET /openapi.json
OpenAPI 3 document.
GET /llms.txt
Plain-text guide for language models.
POST /mcp
Model Context Protocol endpoint. Tools include reinkey_list_resources (the catalog), reinkey_price_list, reinkey_get_channel, reinkey_get_account, reinkey_stats, reinkey_supported.
Events
Each event has id, type, source and ts. Types: channel.opened, channel.topped_up, voucher.accepted, voucher.rejected, channel.claimed, channel.closed, payment.exact, chain.rejected, stream.started, stream.ended, dex.swapped, account.frozen.
Reinkey runs on Stellar testnet. The contracts are unaudited. Don't send mainnet funds.