<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: veto</title>
    <description>The latest articles on DEV Community by veto (@veto-ai).</description>
    <link>https://dev.to/veto-ai</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4017303%2Fdb0f6adf-95c4-45e8-892f-7fca2b238ab9.png</url>
      <title>DEV Community: veto</title>
      <link>https://dev.to/veto-ai</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/veto-ai"/>
    <language>en</language>
    <item>
      <title>Prompt-level spend limits don't hold: how to actually stop an AI agent from overspending (x402, AP2, and the payment path)</title>
      <dc:creator>veto</dc:creator>
      <pubDate>Tue, 07 Jul 2026 15:56:10 +0000</pubDate>
      <link>https://dev.to/veto-ai/prompt-level-spend-limits-dont-hold-how-to-actually-stop-an-ai-agent-from-overspending-x402-523j</link>
      <guid>https://dev.to/veto-ai/prompt-level-spend-limits-dont-hold-how-to-actually-stop-an-ai-agent-from-overspending-x402-523j</guid>
      <description>&lt;p&gt;You told the agent: &lt;em&gt;"Don't spend more than $50 on this task."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The agent spent $340.&lt;/p&gt;

&lt;p&gt;If you're building on x402, Google AP2, or any rail that lets agents pay autonomously, this isn't a hypothetical. It's an architecture problem, and the fix isn't a better system prompt.&lt;/p&gt;




&lt;p&gt;When you put a spend limit in a prompt, you're relying on the model to honor it. That works until it doesn't: a multi-step task where the agent loses context, a tool call that concatenates several individually-small charges, a subagent spawned by the top-level agent that never saw the original instruction, or just a model that decides the task is important enough to override a soft constraint.&lt;/p&gt;

&lt;p&gt;Prompt instructions are not enforcement. They're requests.&lt;/p&gt;

&lt;p&gt;This distinction matters more now than it did 18 months ago. x402 (the HTTP-402 + stablecoin payment protocol) has settled over $50M across 480,000+ agents. Google AP2 lets agents pay each other autonomously. The surface area for uncontrolled agent spend is real, it's growing, and there's no native policy mechanism baked into either protocol. You are currently shipping agents that can spend money with no hard stop between them and the payment rail.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The payment path is where the limit needs to live.&lt;/strong&gt; It needs to be in the path that every payment traverses, regardless of which model issued the request, which tool called it, or how many layers of subagents the chain involved. That's not the prompt. This is the same insight that makes RBAC work for databases. You don't enforce access control by asking the application to be polite. The control has to be structural, not instructional.&lt;/p&gt;

&lt;p&gt;An enforcement layer at the payment level intercepts the transaction before the rail executes it, checks it against policy, and either approves, denies, or escalates. The agent can't bypass this by ignoring a prompt constraint, because the constraint isn't in the prompt.&lt;/p&gt;




&lt;p&gt;Veto is built around this model. It sits between an agent and the money it's about to spend across any agent, any payment rail. A few things that matter technically:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Mandates, not promises.&lt;/strong&gt; Rather than trusting that an agent intends to stay within budget, Veto uses mandates — explicit buyer-side authorizations ("may my agent spend $X?"). These are signed artifacts, not prompts. They're cryptographically issued, and the merchant side can verify them locally at zero latency before any capture happens.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A fixed enforcement order.&lt;/strong&gt; The Acceptance Gate runs in a fixed sequence before any payment executes: verify mandate, check replay, evaluate reputation, run policy. The docs are explicit about why the order matters: "The order is the chargeback defense." And: "The rail only ever executes a spend the gate already approved." There's no shortcut, no layer an agent can skip.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rail-agnostic.&lt;/strong&gt; The policy engine sits above the settlement layer. x402 is the primary rail, but the architecture is pluggable (mock for offline testing, card as a future stub). One policy surface covers whichever rail you're using — "one policy, one audit surface, every rail."&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Signed receipts.&lt;/strong&gt; Every approved transaction produces a merchant-signed artifact linking back to the buyer's mandate. The dispute trail is created at the moment of transaction, not reconstructed from logs after the fact.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Non-custodial.&lt;/strong&gt; Veto never holds funds. You bring your own receiving address.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;If you're using Claude Code with payment-capable tools, Veto ships a &lt;code&gt;PreToolUse&lt;/code&gt; hook that intercepts payment-shaped tool calls before they run — transfers, sends, swaps, &lt;code&gt;cast send&lt;/code&gt;, &lt;code&gt;solana transfer&lt;/code&gt;, x-payment / HTTP-402 flows, Stripe calls. The hook queries Veto for allow / deny / escalate before the tool executes.&lt;/p&gt;

&lt;p&gt;That's the right abstraction. By the time the agent has decided to spend money and is calling the tool, no amount of system-prompt hedging is relevant. The firewall either lets it through or it doesn't. Slash commands (&lt;code&gt;/veto:authorize&lt;/code&gt;, &lt;code&gt;/veto:receipts&lt;/code&gt;, &lt;code&gt;/veto:policy&lt;/code&gt;) give you inspection and override directly in the workflow.&lt;/p&gt;




&lt;p&gt;If you're building an agent that spends money — API calls, onchain transactions, anything on x402 or AP2 — there's one question prompt engineering can't answer: &lt;em&gt;what actually stops the agent from exceeding its authorization?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If your spend limit is only in the prompt, it's not a limit. It's a suggestion.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>security</category>
      <category>payments</category>
      <category>agents</category>
    </item>
    <item>
      <title>Selling to AI agents: what merchants need to know about x402 checkout, mandates, and chargeback-free settlement</title>
      <dc:creator>veto</dc:creator>
      <pubDate>Mon, 06 Jul 2026 08:21:25 +0000</pubDate>
      <link>https://dev.to/veto-ai/selling-to-ai-agents-what-merchants-need-to-know-about-x402-checkout-mandates-and-38ic</link>
      <guid>https://dev.to/veto-ai/selling-to-ai-agents-what-merchants-need-to-know-about-x402-checkout-mandates-and-38ic</guid>
      <description>&lt;p&gt;If you're building a platform that sells digital goods, API access, data subscriptions, or any service an AI agent might buy programmatically, you've probably noticed your existing checkout flow wasn't designed for this. A Stripe-hosted payment page expects a human to read it. A PayPal redirect expects a browser session. Neither exists when the buyer is a LangChain agent or a scheduled curl script.&lt;/p&gt;

&lt;p&gt;Here's what actually changes when the buyer is autonomous, and what infrastructure you need to handle it safely on the merchant side.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The core problem: human checkout flows break with autonomous buyers&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Traditional payment flows are built around human intent signals. A user loads a cart, sees a price, enters card details, clicks confirm. Fraud prevention leans heavily on behavioral signals from that session. Chargebacks exist partly because the system can't verify at authorization time whether the human who clicked "pay" was actually authorized to do so.&lt;/p&gt;

&lt;p&gt;AI agents remove most of those signals. No browser session, no mouse movement, no card-on-file tied to a human who can call their bank later. What you get instead is a programmatic request with a cryptographic authorization attached, which is actually more verifiable than what you get from a human, if you know how to check it.&lt;/p&gt;

&lt;p&gt;Most merchant infrastructure doesn't know how to check it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What x402 is, and why it matters here&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;x402 is an HTTP-native payment protocol built on the long-dormant 402 Payment Required status code. The idea: an agent hits your endpoint, you respond with 402 and a payment descriptor, the agent settles stablecoin payment on-chain, attaches proof to the next request, and you fulfill. No redirect, no session, no human in the loop.&lt;/p&gt;

&lt;p&gt;For pure machine-to-machine commerce, this is the right primitive. The payment proof is on the request. Settlement is final. There's no card network sitting in the middle that can reverse it three weeks later.&lt;/p&gt;

&lt;p&gt;But x402 alone doesn't solve the merchant's problem. It just moves where the problem lives. Instead of wondering whether a human's card was stolen, you're wondering whether the agent that just paid was actually authorized to spend that money in the first place. Different liability, equally real.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What a mandate is, and why you need to verify one&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In agentic payment systems, a mandate is a cryptographically signed authorization stating that an operator (a company, a developer, a human principal) has explicitly authorized a specific agent to spend funds up to certain limits for certain purposes. Think of it as a scoped, machine-readable power of attorney.&lt;/p&gt;

&lt;p&gt;Before you capture funds from an agent, you want to verify three things:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The mandate is real (the authorization signature is valid and wasn't forged)&lt;/li&gt;
&lt;li&gt;The mandate is current (it hasn't been revoked or replayed from a previous transaction)&lt;/li&gt;
&lt;li&gt;The transaction is in scope (what the agent is trying to buy matches what the mandate actually permits)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This verification has to be fast. If you're selling API access at request time, you can't afford a round-trip to a third-party verification service on every call. Latency aside, you also can't have your payment authorization path go down every time an external service is unavailable.&lt;/p&gt;

&lt;p&gt;The right architecture verifies mandates locally, with no network dependency. A signed authorization you can check offline gives you both the latency and the resilience properties you need.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why order matters more than you think&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Even with mandate verification in place, you need to think carefully about the sequence of checks before capturing payment. Skipping steps or running them in the wrong order isn't just a quality issue — it's a liability issue.&lt;/p&gt;

&lt;p&gt;Veto Checkout's documentation describes a fixed four-step gate that runs before any money is captured:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Verify the mandate (confirm the authorization signature is valid)&lt;/li&gt;
&lt;li&gt;Check for replay (ensure this transaction token hasn't been used before)&lt;/li&gt;
&lt;li&gt;Evaluate reputation (check what's known about this agent or operator)&lt;/li&gt;
&lt;li&gt;Run policy (apply your own merchant-defined rules: rate limits, spend caps, allowed product categories, etc.)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The docs describe this sequence explicitly: &lt;em&gt;"The order is the chargeback defense."&lt;/em&gt; And: &lt;em&gt;"The rail only ever executes a spend the gate already approved."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That framing is useful. The gate is what makes "settlement is final" mean something. If you capture funds before completing these checks, you've already lost the structural advantage that agentic payment gives you over card payments. You're back to relying on post-hoc dispute resolution.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Non-custodial settlement and rail flexibility&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One architectural detail worth understanding&lt;/p&gt;




&lt;p&gt;&lt;em&gt;This post is from the team at &lt;a href="https://veto-ai.com/?utm_source=devto&amp;amp;utm_medium=article&amp;amp;utm_campaign=fleet&amp;amp;utm_content=sdk" rel="noopener noreferrer"&gt;Veto&lt;/a&gt;. Veto Checkout is our merchant-side SDK for exactly this: agents discover your products, the acceptance gate verifies the mandate before you capture, and settlement lands instantly in USDC on Base. If you are thinking about selling to agents, the &lt;a href="https://docs.merchants.veto-ai.com" rel="noopener noreferrer"&gt;merchant docs&lt;/a&gt; show the whole flow in about 30 seconds.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>ecommerce</category>
      <category>payments</category>
      <category>agents</category>
    </item>
  </channel>
</rss>
