How to Sell to Agents

We're open-sourcing the AgentCash router, the easiest and most effective way to one-shot wrapping an API in x402 and MPP.

Lucas Shin··4 min
agentcash/router header image

If you’re here, you already know a thing or two about agentic payments -- x402, Machine Payments Protocol, agents buying services in stablecoins. You already know about Open Agentic Commerce and that agents will become the primary way we interact with, transact on, and consume the web. You already know that the old business contract of the internet is dying.

If you have no idea what I’m talking about, read Agentic Commerce for Dummies (brief overview for beginners) or Machine Economy 2030 (my thesis on what this space will turn into) to get caught up.

I’m writing this for three types of people:

  • The Tinkerer. You experiment with agents on nights and weekends, or you recently discovered vibe-coding and refuse to sit out the next iteration of commerce. You want something live and earning today.
  • The API Provider. You run an API business and are starting to explore selling to agents. You need to know what the integration actually involves before you commit.
  • The Merchant with Resources that Aren't being Discovered. You’ve already shipped an x402 or MPP resource but agents aren’t finding it.

Regardless of which bucket you're in, the solution is the @agentcash/router, the easiest and most effective way to one-shot wrapping an API in x402 and MPP.

This package is proven, and we just made it open-source. We’ve relied on this library to build each of the 44 origins we’ve built at Merit Systems, which have generated ~$40K in revenue over ~765K transactions so far in 2026.

It's the fastest way to start selling to agents.

What does it take to become a successful merchant?

I’m sure you have the general shape of x402 and/or MPP in your head – one HTTP request, a 402 with a price, a signed payment, a retry, the product that you requested.

But unfortunately there’s a huge difference between standing up an x402/MPP endpoint and actually turning agents into meaningful customers. We at @merit_systems have tested tens of thousands of resources registered on x402scan and mppscan over the past months and have learned a few things. The techniques that have worked are outlined below:

  • Every agentic payment method. USDC payments via x402 and MPP, at fixed prices or metered per token, per request, per unit of work. Every payment standard and pricing model you skip is a set of buyers who can’t pay you, and every endpoint you build needs a bulletproof pricing model.
All Payment Methods
  • Discovery. Openapi.json and llms.txt allow agents to find, understand, and call your API. Structure these properly so that your endpoints can be used out-of-the-box and indexed by x402scan, mppscan, and any other tooling marketplace for agents.
Discovery Docs
  • Identity without accounts. You need a way to verify who’s calling, but there are no accounts in agentic commerce. A wallet signature is how you recognize a returning buyer, grant pay-once access, and keep per-user state. That memory has to survive across every instance of your server.
siwx()

Try to implement all of this by hand and you're probably looking at several days of work at least. And if you get any of it wrong, you won't know. Your endpoints look live, but agents quietly fail to pay you and you never find out why.

So What?

The @agentcash/router packages our entire proxy architecture and accumulated learnings into a standardized implementation, ensuring that what you ship is correct by construction.

With the router, a complete paid endpoint looks like this:

Example Router Route

This route now answers x402 and MPP challenges, validates inputs, publishes its own discovery docs, and gives your customers wallet-based identities.

Since every router endpoint emits the same 402 shape, the same schemas, and the same settlement behavior, endpoints that use the router will just work for any agent with a wallet.

How to use the router

I took an API I built and gave my coding agent one instruction:

Read agentcash.dev/merchants.md and follow the guide to make my API discoverable and payable by agents. Only ask me questions if you need input you can’t determine yourself.

While I scrolled through my X feed for the next 15-20 minutes, my agent:

  • Installed the router
  • Converted every endpoint into a paid route (also identified a streaming endpoint and switched it to per-token billing instead of a flat price)
  • Published the discovery docs (openapi.json and llms.txt)
  • Registered to x402scan and mppscan

And just like that, I had 8 StableEstate.dev endpoints tested and ready to go.

StableEstate.dev

Monetizing an API used to mean a Stripe integration, a billing portal, and a pricing page -- yup, too much work. Now you can go from API to your first paying customer in under 30 minutes.

Get started

Here's where to go depending on where you're at:

  • Want to see how fast you can deploy a live, agent-payable resource? The one-click deploy with the Vercel template clones a working pay-per-call API into your GitHub, asks for three env vars, and puts you live on Vercel with every pricing mode already wired up. Swap the demo routes for your real ones and you're live in 5 minutes.
  • Don't want to deploy on Vercel? Follow this walkthrough to build an app from scratch using Next.js, Hono, Bun, or Node.
  • Already on x402 or MPP but want to use the router? Follow this simple guide.
  • Already have an API but want to start selling to agents? Pass the prompt from earlier to your coding agent:
Read agentcash.dev/merchants.md and follow the guide to make my API discoverable and payable by agents. Only ask me questions if you need input you can’t determine yourself.

If you have any questions, feel free to DM.

Conclusion

Every paradigm shift creates new merchants.

Shopify did it for ecommerce.

Stripe did it for online businesses.

Open Agentic Commerce will do it for anyone with a coding agent.

Give your agent a wallet

One balance, USDC on Base · Solana · Tempo. Let your agent pay for any payment-protected API — no API keys.

More from the blog