← Blog
November 6, 2026 · 6 min

x402 2.30.0: a throwing gate hook now stops the payment

Last week the story was a release that closed a month of fixes. This week the cadence changed: a second release landed seven days later. It carries a fix we covered as unreleased two days ago, and we checked it in the published bundle.

We searched merged PRs in x402-foundation/x402 from 30 October to 6 November 2026. The GitHub search API returns 53. About half are small cleanups (PhilBot402), docs from mintlify[bot], or release PRs, so the count says little. The release says more.

The release, with dates

The npm registry dates @x402/core 2.30.0 at 2026-11-04 20:04:41 UTC. Version 2.29.0 is dated 28 October. That is seven days, against 29 days between 2.28.0 and 2.29.0.

PyPI shows x402 2.27.0 uploaded at 20:03 UTC the same day. The Go module has a go/v2.30.0 tag. Python numbering is independent of npm, so 2.27.0 on PyPI is the counterpart of 2.30.0.

The fix, checked in the bundle

On 4 November we published an audit of gate hook throws. The finding: in the TypeScript resource server, a beforeVerify or beforeSettle hook that throws was treated as approval. PR #3702 (issue #3689) changed that, and a follow-up, #4133, renamed the payer-facing codes.

We did not rely on the PR text. We unpacked the @x402/core tarballs for 2.29.0 and 2.30.0 and read dist/cjs/server/index.js.

Per the PR text, the thrown error's own message stays in the server warn log and is not sent to the payer. That matters: a hook that talks to Redis can throw a connection error with an internal address in it.

So "merged" is now "shipped" for the TypeScript server. One limit on this claim: we read the bundle, we did not run a payment through it this week. The run we did was against main on 4 November.

Merged after the release, not shipped

Everything below merged on 5 or 6 November, after both release uploads. It cannot be in 2.30.0 or Python 2.27.0.

Smaller: #4141 scopes EVM batch channel operations by network, and #4110 enforces XRPL spend caps in issued-currency units. We list them without testing them.

What it means for LLM4Agents

Our gateway is a payment gate in front of model calls. A gate hook is where we would put a balance check, a rate limit or a ledger write. Under 2.29.0, a bug in that hook would have turned a payment gate into a no-op without any visible sign except a warn line.

2.30.0 makes the safe behavior the default. It also changes what a flaky hook means: an outage in the store behind the hook now becomes a 402-style failure for the buyer, not a free request. That is the right trade, but it moves availability risk into our hooks.

The Lighthouse change matters for the Solana side. Phantom is a common wallet. A facilitator that rejects guard instructions placed before the transfer rejects valid payments, which looks like a flaky rail to the buyer.

Staying on the frontier

  1. Move to 2.30.0 (npm) and 2.27.0 (PyPI) in a branch. The diff from 2.29.0 is small. Re-run the probes that matter: a hook that throws must yield no facilitator call.
  2. Give every hook a timeout and a health check. Fail-closed turns a slow hook into lost revenue. We want to know before a buyer does.
  3. Alert on payer-facing codes. Count before_verify_hook_error and before_settle_hook_error. A rise means our own hook is failing.
  4. Wait for the Lighthouse release before changing our SVM allowlist, then replay a Phantom-shaped transaction against a facilitator we use.
  5. Treat unknown as a state in our client. When a cancel or settle call fails, record "unknown" and reconcile later. Do not retry with a new signature.

Caveat on method: we confirmed the 2.29.0 and 2.30.0 server code by reading the published bundles. Everything under "merged after the release" is based on PR titles and text, and we did not run it.

Pay per call, with the SDK pinned for you

LLM4Agents tracks x402 releases so your agent does not have to.

Register agent