Logo AgentPay

Defense is not a layer. It is the path.

Every pay is checked before it lands. The edge rate-limits, caps body size, and answers with hardened headers. A live security map shows the defense posture — no secrets, no guesswork.


Security update

Harder edges.
Safer money.
Visible posture.

Three layers moved together: the pay path checks harder before a debit lands, the Worker rejects abuse earlier, and the dashboard shows a live defense map without opening DevTools.

01 · LEDGER

Safer money moves

Stronger pre-accept checks, idempotent pays, cleaner failure paths so partial writes are rare.

02 · EDGE

Harder API surface

Rate limits, body caps, timing-safe admin secrets, tighter CORS and session handling.

03 · MAP

Live security status

Public GET /api/security/status. Dashboard Safety section mirrors tier, budgets, and gates.


Ledger · Pay path

A debit is accepted only after the path is clean.

Payments are the highest-risk surface. The update tightens what must be true before money moves, and what happens when a write fails mid-flight.

checks

Stronger pre-accept gates

Amount bounds, repo shape, and auth are validated before any balance touch. The safety gate still runs wallet lock, velocity, daily cap, policy, and Edge Shield — one blocked condition stops the debit.

idempotency

Retries do not double-charge

Clients may send Idempotency-Key on pay. The same key returns the original outcome instead of posting a second transfer when the network retries or the agent replays.

failures

Clearer failure paths

Partial writes are less likely: debit and ledger insert are ordered so a failed step does not leave a silent half-state. Errors return explicit codes the dashboard and agents can branch on.


Worker · API surface

Abuse dies at the door.

Before a request reaches ledger logic, the edge already caps size, counts POSTs, and refuses casual probing.

per-IP · POST

Global request budget

Every IP shares a fixed window of POSTs. Heavy clients hit 429 before they can flood pay, escrow, or admin routes.

120requests / 60 seconds
body

256 KiB ceiling

Content-Length is checked early. Oversized JSON never reaches the parser.

admin

Timing-safe secrets

Cleanup and integrity keys compare in constant time. Length mismatches fail closed.


Response · Session

No casual fingerprint.
No loose origin.

Every JSON response carries a fixed security header set. CORS only reflects allowlisted origins. Sessions stay HttpOnly, Secure, SameSite.

X-Content-Type-Options: nosniff
X-Frame-Options: DENY
Referrer-Policy: no-referrer
Cache-Control: no-store
X-AgentPay-Security: bank-grade-v1

Permissions-Policy disables geolocation, mic, and camera by default. Admin and cleanup routes never leak timing through variable-length secret compares.


Dashboard · Safety

Defense posture
without DevTools.

public · no secrets GET /api/security/status
Tier
bank-grade-v1
IP budget
120 POST / 60s
Body cap
256 KiB
Gates
lock · velocity · policy · shield

Refresh the map from Safety. The dashboard mirrors the public status so operators see live limits, zero-loss instruments, and gate posture in one place.


Safety gate

One blocked condition
stops the debit.

wallet

Locked agents cannot open new spends. Refunds and settles still work.

velocity

Tx count and USD windows. Spikes can suspend the key and trip Edge Shield.

daily cap

Spend ceiling resets each UTC day. Over budget returns 429, not a silent fail.

policy

allow_to, deny_to, max_amount, task prefix — evaluated before every debit.

shield

Global freeze or agent quarantine blocks discretionary spends until cool-down.


Audit

Balances can be checked.
Not only assumed.

Operators with the admin secret can run a ledger integrity pass. It samples accounts and flags drift — it does not invent money.

POST /api/admin/integrity

Requires ADMIN_CLEANUP_SECRET (header or body). Timing-safe compare. Rate-limited like other admin routes.

Returns a structured report of sampled balances against expected ledger totals. Use it after incidents or before a sandbox wipe — not as a substitute for the safety gate on every pay.


Security

Harder at the edge.
Clearer on the ledger.

Checks before debit. Limits before flood. A live map you can refresh without guessing.

Open AgentPay

│

Join now
AI Assistant