r/x402

OpenAI wrote an article about x402 & agentic commerce
â–² 8 r/x402

OpenAI wrote an article about x402 & agentic commerce

If this isn't a clear signal that we're moving towards mainstream adoption then idk what is 👀 OpenAI, AWS, Coinbase, Stripe, all converging on x402 as the agent payment layer.

And it highlights exactly one thing that's very important for agentic commerce to exist: A layer that decides what services an agent may pay, which to avoid and in what boundaries to do so.

Here's something that stood out: *the entire security model of this post is "The agent is ONLY allowed to pay merchants that the application has approved in advance".* Every single payment is compared against a predefined whitelist (purpose, approved merchant, max_amount, expiry) before it gets processed.

However that paints a problem: In this case, the allowlist is manual; a human has to hardcode every allowed merchant before the agent is buying anything. This system simply does not scale once the agent is supposed to choose between thousands, if not tens of thousands different x402 endpoints autonomously.

If 300 publicly listed x402 endpoints are added every day (which is the approximate rate we're seeing at the moment, according to our automated scans), who's gonna check them all and approve them manually? Correct: nobody with a sane mind and also no LLM, as this work would burn an unbelievably large amount of tokens, JUST so your agent can save a few cents.

This is exactly where independent, automated and scalable trust-scoring comes in: a machine-readable, continuously updated "is this service alive, reachable, spec-compliant and actually on-chain?" signal, with a clear PROCEED / CAUTION / AVOID verdict and all necessary data attached, for your agent to make an informed decision ahead of purchase.

And coincidentally I've been building exactly this kind of service over the last few months: With x402-Trust this layer is not in need of a manually curated, high-maintenance service-whitelist.

Thank you to Big Tech for the reassurance that I (and we, as a builder community in the x402 ecosystem) are moving into the right direction! 🫡 Never stop building peeps, we're just getting started!

developers.openai.com
u/MountainAssignment36 — 3 days ago
â–² 3 r/x402

New update, new discovery vector 💡

From today onwards x402 Trust is able to score x402 endpoints that are hidden behind an MCP server 😃

If you offer your endpoints through a custom MCP that is discoverable through mcpregistery, we will automatically pick it up in the coming hours, probe it, score it and grade it just like "raw" endpoints!

For example: This endpoint was, prior to this update, completely invisible to our discovery sweep. Now we've picked it up and are already starting to score it.

The preview-card of https://x402.fuchss.app/endpoint/108709

So even if your agents are "only" capable of paying an x402 endpoint through a custom MCP server (which preconfigures all code necessary for a payment), so that the agent just needs to make a tool call to pay, it is still able to look up the endpoint behind that MCP and check is it trustworthy, has it high uptime and is the chance, that the payment will succeed high enough, that I want to spend tokens on calling this tool regularely?

Because, as we know, agents cost money with every request. So, it needs a precheck, before...

  • It calls a tool which only returns an error, because the backend (endpoint) is broken or unreachable, or...
  • even worse, it calls an x402 tool which got hijacked by an attacker, where any money will be sent into the void.

Better know, before your agent pays.

reddit.com
u/MountainAssignment36 — 8 days ago
â–² 5 r/x402

"What even is x402??"

This is a question that comes up every. single. time. when I show the service I've built over the last couple of months to my friends, collegues and family.

Like it or not: We (as in "we" here in the subreddit & x402 community) are living in a bubble. Look over the plates rim and you'll quickly realize that x402 is still a very niche technology that barely anyone has heard of... And I say that as someone working in IT for a living, with the majority of my friends doing so as well.

The idea behind the protocol is huge, sure. The execution is brilliant and has proven that it works, deployed on a wide scale already, yes. Adoption is rising, with major players like Cloudflare adding native x402 support to their products, that's undeniable.

But for the average consumer? They've never heard of it, and if I'm being honest: It's better this way. You also don't explain to your grandpa what HTTP is when you show him the internet. "This is Google, your searchengine, with which you can find any info for anything you desire!" is as deep as it gets.

And what about the builders? The tinkerers? The programmers, people who work in IT for a living? They haven't heard of it either... Not because they're ignorant or uninterested in new technologies, but because the surface of exposure is still so small that only people in extremely specific fields (agent-development or integration of web-based payment systems) hear about it organically.

I have to say, I'm lucky to be one of these people. And because I like to teach my friends, family, coworkers and anybody on the internet new things, I've written up a small interactive webpage, which shows what x402 is, but simplified: So anyone can understand it & anyone can try it out for himself!

See for yourself, or share with potentially interested people: https://x402.fuchss.app/x402/simple

... or: If your friend is more tech-oriented, give him the more "techy" breakdown instead: https://x402.fuchss.app/x402

Enjoy 😃 and if you have any thoughts or recommendations, let me know please!

reddit.com
u/MountainAssignment36 — 10 days ago
â–² 1 r/x402

I built a zero-dependency buyer-policy boundary for x402 agent wallets — looking for SDK maintainers to validate the interface

Most x402 buyer examples understandably focus on completing the payment flow:

  1. Receive PAYMENT-REQUIRED
  2. Sign the authorization
  3. Retry the request
  4. Verify PAYMENT-RESPONSE

But an agent that can sign payments still needs a policy boundary deciding whether it should sign a particular payment.

I extracted the controls from my production buyer into an Apache-2.0, zero-dependency TypeScript package:

npm install u/mahastrategies/x402-buyer-policy

Current version: 0.1.1

The package evaluates a live x402 requirement before the wallet is invoked. It supports:

  • Maximum amount per call
  • Maximum cumulative spend per task
  • Approved network and asset pairs
  • Approved merchant payees
  • Exact resource URL binding
  • Schema-validation evidence requirements
  • Human approval above a configurable threshold
  • Approvals bound to task, resource, network, asset, payee, amount and expiry
  • Authorization nonce replay prevention
  • Settlement transaction replay prevention
  • PAYMENT-RESPONSE verification
  • Optional independent on-chain transfer evidence

A simplified policy looks like this:

const policy = {
  maximumAmountPerCall: "5000",
  maximumAmountPerTask: "25000",

  approvedAssets: [
    {
      network: "eip155:8453",
      asset: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    },
  ],

  approvedPayees: [
    "0xec84c1cd6602bbe387bc8e6f0d3c062f2762de28",
  ],

  approvedResources: [
    "https://www.mahastrategies.com/api/v1/compress",
  ],

  requireSchemaEvidence: true,
  humanApprovalThreshold: "10000",
};

The intended integration boundary is immediately before signing:

const authorization = await authorizePayment({
  policy,
  taskId,
  requirement,
  authorization,
  schemaEvidence,
  ledger,
});

// Only invoke the wallet after authorization succeeds.
const signature = await wallet.signTypedData(...);

After settlement:

await verifyAndRecordSettlement({
  policy,
  taskId,
  authorization,
  receipt,
  chainEvidence,
  ledger,
});

The package deliberately does not:

  • Hold private keys
  • Select a wallet
  • Select a facilitator
  • Determine whether an endpoint is trustworthy or useful
  • Validate arbitrary JSON Schema itself
  • Treat a generic boolean as human approval

Schema validation can come from x402-doctor, an SDK validator or another trusted boundary. Human approvals require a trusted verifier and are scoped to the complete payment decision rather than represented as approved: true.

The included in-memory ledger is only suitable for tests and single-process examples. Distributed production agents need an atomic Redis, Postgres, Durable Object or equivalent implementation.

That is the part I would like maintainer feedback on.

I’m looking for one or two SDK/framework maintainers interested in answering:

  1. Does this policy boundary belong in an x402 client, immediately outside it, or in the wallet layer?
  2. Which decision codes and interfaces would make it easiest to integrate?
  3. Should budget reservation happen before authorization signing or only after the wallet accepts?
  4. Which durable ledger adapter would be most useful first: Redis or Postgres?
  5. Would a vendor-neutral policy JSON Schema help interoperability across TypeScript, Python and Go?

My goal is not to push another wallet abstraction. It is to make the decision immediately before an agent spends money explicit, testable and portable.

Package:

https://www.npmjs.com/package/@mahastrategies/x402-buyer-policy

Documentation and example policy:

https://www.mahastrategies.com/x402-buyer-policy

https://www.mahastrategies.com/x402/buyer-policy.example.json

Disclosure: I operate Maha Strategies and extracted this package from the safety controls used in my own x402 buyer tooling. I’m specifically looking for critical interface feedback or an SDK integration partner before building additional framework wrappers.

reddit.com
u/Optimal_Manner359 — 11 days ago