The AgentPay developer surface
AgentPay exposes a small, documented HTTP API for wallets, policies, payouts, subscriptions, audit, and weekly digests. Mint a key, point your agent at /api/v1, and you're live.
GET / POST /api/v1/wallets[...] — create agent wallets, top up from a linked bank account, list transactions, and request refunds.
POST /api/v1/wallets/{walletId}/policies and GET listing — define per-transaction caps, category blocks, and daily spend thresholds your agent must respect.
POST /api/v1/wallets/{walletId}/payout — let an agent move funds to a merchant. Runs every policy gate before funds leave the wallet.
GET / POST /api/v1/wallets/{walletId}/subscriptions[/scan][/{id}/cancel] — track recurring charges and cancel what's no longer earning its keep.
GET /api/v1/wallets/{walletId}/policy-audit — every policy decision, approved or denied, with the rule that fired and the values it saw.
GET /api/v1/agents/{agentId}/weekly-summary — a rollup of spend, denials, and notable activity for any agent your key owns.
Send x-user-id: <your numeric user id> on every request. AgentPay identifies the owning account through this header (the UserIdHeader scheme listed in the OpenAPI document).
POST /api/v1/developer/keys with body { "label": "my-agent" }. The plaintext key is returned exactly once — store it immediately; only its bcrypt hash is persisted.
Point your agent at any of the six endpoints above and send the key on the Authorization header. The served OpenAPI document imports straight into Postman or Insomnia.