Guides

Policy cookbook

AgentPay policies combine approval routing, per-card ceilings, aggregate held exposure, per-agent fleet caps, rolling-window velocity limits, and merchant-category allowlists. Edit the default in the dashboard, or pass policy_override on a single card.

Auto-approve under $X; require approval above

Hybrid mode. Below the threshold, cards mint silently; at or above, they queue in /approvals.

PUT /v1/policies/default
{
  "approval_required": false,
  "approval_threshold_cents": 2000,
  "max_card_amount_cents": 5000
}

Require approval for every card

Maximum caution — every card request queues and waits for you.

PUT /v1/policies/default
{
  "approval_required": true,
  "approval_channels": ["dashboard"]
}

Cap aggregate exposure

Your saved payment method never has more than this much held across all open cards combined.

PUT /v1/policies/default
{
  "max_total_held_cents": 10000,
  "max_card_amount_cents": 2500
}

Fleet caps (how many agents, how many cards per agent)

Define how many agents you allow overall, how many can be active at once, and how many cards each agent can hold.

PUT /v1/policies/default
{
  "max_agents": 10,
  "max_active_agents": 5,
  "max_cards_per_agent": 25,
  "max_active_cards_per_agent": 5
}

Velocity limits — catch a runaway agent

Rolling daily/weekly spend caps across the whole account. Independent of per-card ceilings.

PUT /v1/policies/default
{
  "velocity_day_cents": 5000,
  "velocity_week_cents": 20000
}

Per-agent override: lower cap on a specific agent

Trust different agents differently. Each agent can override max_card_amount_cents below the default.

PATCH /v1/agents/agnt_...
{
  "max_card_amount_cents": 500
}

# Then cards created by this agent are capped at $5, even if the default is $500.

Emergency stop

Pause an agent instantly — all existing open cards keep working (Stripe's authorization path) but no new cards issue. Revoke to close the door permanently.

# Pause one agent (reversible)
PATCH /v1/agents/agnt_.../
{ "status": "paused" }

# Revoke one agent (one-way door)
POST /v1/agents/agnt_.../revoke

# Or require approval for everything on the account
PUT /v1/policies/default
{ "approval_required": true }

Budget runway check before each request

Agents can call /v1/balance to see held exposure and policy ceiling, then decide whether to send the request at all.

GET /v1/balance
# -> {
#   "held_cents": 1500,
#   "open_cards": 2,
#   "max_per_card_cents": 5000,
#   "max_total_held_cents": 10000,
#   "pending_approvals": 0
# }
Coming next: external approval channels (WhatsApp, Slack, Telegram, email) — toggle these on in /policies to be notified when they ship. Today the dashboard is the only active channel.