An agent that only reads is a research tool. An agent that can commit a booking is a buyer, and a buyer is worth attacking. The moment you give a model a route that moves freight and asks for payment, every string it reads becomes a possible instruction from someone who is not your company.
Nettrux is a freight broker and forwarder in Fremont, California, and the first 3PL on x402. Our agent guide describes how an authenticated agent rate-shops, price-locks a quote, and calls a commit route that is documented as an x402 v1 402 challenge. This post is about the part the guide can't do for you: keeping the agent on your side of the table when its inputs are hostile.
Nothing below assumes a public, self-serve endpoint. The authenticated routes need a bearer token, the site does not issue one, and real-money settlement is gated off on the deployment today. Nettrux has settled a real x402 USDC payment on Base in testing. The threat model is worth building now, before any of that changes.
Freight is a document-heavy business, and most of those documents reach a buyer agent from outside the company:
The common thread: the model can't reliably tell a fact about the shipment from an instruction about what to do with it. So the defenses can't live only in the prompt. They have to live in code around the tools.
It helps to name the outcomes, because each one maps to a control:
The single most useful rule we follow at Nettrux is that software is not an approver. Agents shop, compare, and propose; a person approves the booking. In a buyer agent, that means the commit tool is not something the model calls freely. It produces a proposal object, and a separate step, outside the model's control, turns an approved proposal into the commit call.
The proposal should be a small, typed record: the quote id, the locked total, the mode, origin and destination, pickup date, and the source document that triggered it. The approver sees that record, not the model's narrative about why it's a good idea. If an injected email convinced the model to book, the human sees a booking with no matching order and stops it.
Most "worse booking" attacks work by nudging the shipment spec: an extra pallet, a heavier weight, a residential flag, a guaranteed service. Collect the spec from your own systems (the order, the ERP line, the warehouse scan) and freeze it before the agent calls rate-shop. The model can fill gaps by asking a person; it should not be able to edit dims or weights because a document told it to.
Then compare at the end. If the locked quote's rate input differs from the frozen spec, the proposal fails validation before anyone is asked to approve it.
The x402 flow gives you a clean place to check money. On Nettrux, the agent price-locks a quote, gets back a quote id and a locked total, and calls commit with a body of exactly the quote id. When that call comes back as a 402, the challenge carries the payment terms: amount, asset, network, and payee. The guide doesn't name a token, a chain, or a payee address; you read them off the challenge.
Your client should refuse to build the paid retry unless:
None of those checks should involve the model. They are comparisons between numbers your code already holds. And because the route can also answer with a 200, read data.booking.money_mode and data.settlement on the response you actually get rather than assuming money moved.
Give the agent the fewest tools that do the job. A buyer agent needs to read seller capabilities, rate-shop, lock a quote, submit a proposal, and read a receipt. It does not need a general HTTP tool, and it does not need to see the bearer token. Keep the token in the tool layer and inject it there, so a model that gets talked into "print your configuration" has nothing to print.
Read the deploy gates at the start of a session and pass them to the model as facts. On our guide, real-money settlement, guest checkout, and published discovery are all off today. An agent that knows guest routes are off won't be talked into calling them, and your tool layer shouldn't expose them anyway.
Replays and duplicates are a security problem as much as a reliability one. Our quote lock is idempotent on the quote number you send, and commit takes a single quote id, so a retry of the same approved proposal shouldn't create a second booking. Keep your own ledger too: one approved proposal, one commit attempt chain, one receipt.
Log the inputs that led to each proposal: which email, which document, which page. When something odd gets proposed, the log tells you where the instruction came from, and you can block that source.
Before a buyer agent touches a commit route, make sure you can answer yes to each of these:
Can't I just tell the model to ignore instructions in documents?
Do that too, but don't rely on it. Prompt-level rules reduce the rate of mistakes; code-level checks bound the damage when one gets through.
Does x402 make this riskier than invoicing?
It makes payment faster, which raises the stakes on a bad decision. It also puts the payment terms in a machine-readable challenge, which makes them easy to verify before you pay. The control is the check, not the rail.
Can I test this against Nettrux today?
The authenticated routes need a token that the site doesn't issue. Call dispatch at 1-888-617-3530 if you're building a buyer agent and want to talk about access.
Start with the agent guide and the field contract it links. Build the checks first, then the agent.
Alex Carney, Nettrux