Daily budget exhausted
Agent daily budget exhausted: 0.40 purchases against a 1.00 daily limit
budget-demo-agent may spend 1.00 USDC-TEST per UTC day. It buys a 0.40 market snapshot again and again: PolicyGate signs while the day's total stays within the limit, then answers 403 spend.budget_exceeded with the signed figures (already signed today, this amount, the limit). Budgets count at signing, so an authorization the merchant never settles still counts.
Defaults: iss = http://localhost/tst-issuer, aud = edge, exp = now+1h, kid = tester-rs256
An agent keeps making small purchases until it reaches its daily budget. The next payment is refused, with the day's total in the signed record. The budget is shared by every visitor to this demo, so it may already be used up today. Test network: no real money.
Test network — no real money. A simulated network (eip155:31337) and a test token (USDC-TEST); the merchant settles in memory, nothing is sent to a blockchain.
Execute scenario
The agent buys again and again until PolicyGate's daily budget refuses. Each attempt: merchant 402, PolicyGate's decision, and on an allow the paid retry. Runs on the server: the agent's token and the full signature never reach your browser.
Proves a daily budget is enforced across payments, not only per payment, and that each refusal carries the figures it was decided on.