Skip to Content
KryptWarden Developers
REST APIs

Overview

The three HTTP services behind KryptWarden, and the conventions they share.

ServiceBase URLUsed by
Spend APIhttps://api.kryptwarden.xyzDashboards and your own reporting
Facilitator & relayerhttps://pay.kryptwarden.xyzx402 sellers (/verify, /settle) and the SDK (/relayer/*)
Demo sellershttps://demo-apis.kryptwarden.xyzTesting agents

Conventions

  • JSON in, JSON out. Send Content-Type: application/json on POST and PUT. Bodies are limited to 64 KB.
  • No API keys. The services are public on Testnet. Nothing they do needs your keys: reads come from the chain, and writes are either signed by an agent or harmless (labels).
  • Errors come back as { "error": "message" } with a 4xx or 5xx status.
  • Amounts come as both …Stroops (integer string, 7 decimals) and …Usdc (decimal string such as "3.00").
  • Times are unix seconds, except checkedAt, which is an ISO 8601 string.
  • CORS. Browsers can call the hosted services only from kryptwarden.xyz origins. Server-side calls work from anywhere.
  • Health. Every service answers GET /health with { "status": "healthy", ... }.

Is the data authoritative?

The Spend API's balances, policies and holds are read live from the contract on each request. Its ledger history comes from indexed contract events stored in Postgres. Use /reconcile to confirm the two agree.

On this page