惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

A
About on SuperTechFans
小众软件
小众软件
WordPress大学
WordPress大学
Microsoft Azure Blog
Microsoft Azure Blog
Recent Announcements
Recent Announcements
博客园 - 三生石上(FineUI控件)
博客园_首页
N
Netflix TechBlog - Medium
IT之家
IT之家
H
Help Net Security
博客园 - 聂微东
Google DeepMind News
Google DeepMind News
罗磊的独立博客
T
Tailwind CSS Blog
F
Fortinet All Blogs
Hugging Face - Blog
Hugging Face - Blog
MongoDB | Blog
MongoDB | Blog
V
V2EX
量子位
云风的 BLOG
云风的 BLOG
爱范儿
爱范儿
博客园 - 司徒正美
The Cloudflare Blog
Engineering at Meta
Engineering at Meta

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Machine-to-Machine Payments Are Coming Faster Than Anyone...
MPP TestKit · 2026-05-06 · via DEV Community

There is a quiet infrastructure crisis unfolding in AI development that nobody is talking about loudly enough.

AI agents are getting good - fast. They can write code, browse the web, book appointments, analyze data, and chain together complex multi-step workflows without human input. The tooling around them is evolving at a pace that would have seemed absurd three years ago.

But there is one thing they cannot do cleanly: pay for things.

Not because the technology doesn't exist. Because the payment infrastructure was never designed with machines in mind.


The Problem Nobody Built For

Every payment system we have today was designed for humans. Credit cards require billing addresses and CVV codes. PayPal requires a login flow. Stripe requires a server-side integration with API keys, webhook endpoints, and a merchant account that takes days to verify.

When a human wants to pay for something, these friction points are annoying but manageable. When an autonomous AI agent needs to pay for a single API call - at 2 AM, without a human in the loop - the entire stack collapses.

The agent needs to:

  • Hold credentials it can use programmatically
  • Initiate a payment without a UI flow
  • Receive instant confirmation
  • Retry the original request automatically

None of the existing payment rails were built for this sequence. They were built for checkout pages.


HTTP 402 Has Been Waiting Since 1999

Here is the part that makes this problem both frustrating and exciting: the HTTP spec saw this coming.

In 1999, when the HTTP/1.1 specification was published, the authors included status code 402 - Payment Required. The note in the RFC reads:

"This code is reserved for future use."

Twenty-five years later, it is still reserved. No major implementation. No standard. No tooling.

The reason is straightforward: in 1999, there was no programmable money. No way for a server to say "send me exactly $0.003 and I'll give you the data" and have a machine comply without a human typing in a card number.

That changed with blockchain. Specifically, it changed with Solana.


Why Solana Is the Right Layer for This

Not all blockchains are equal for this use case. Machine-to-machine payments at the API layer have strict requirements:

Speed. An API client waiting on payment confirmation cannot wait 10 minutes. Solana finalizes transactions in 400–800 milliseconds. That is fast enough to fit inside a single HTTP request-response cycle.

Cost. Paying $15 in gas fees to access a $0.001 API endpoint is absurd. Solana transaction fees are fractions of a cent - typically $0.00025 or less.

Programmability. The payment needs to be verifiable on-chain without a trusted third party. Solana's account model makes it straightforward to confirm a transfer happened, to whom, and for exactly how much.

Developer tooling. Solana has a mature JavaScript/TypeScript SDK, widespread RPC access, and faucets on devnet and testnet that make testing free and instant.

No other chain checks all four boxes at the level of maturity Solana does today.


The 402 Flow, Concretely

Here is what the machine-to-machine payment protocol looks like when properly implemented:

1. Client → GET /api/data
2. Server → 402 Payment Required
           Payment-Request: solana; amount="0.001"; recipient="9WzDX..."; network="devnet"
3. Client → builds and signs a Solana transaction
           sends 0.001 SOL to the recipient address
4. Client → GET /api/data
           Payment-Receipt: solana; signature="3xKm7..."; network="devnet"
5. Server → verifies the transaction on-chain
           confirms correct recipient and amount
6. Server → 200 OK + data

Enter fullscreen mode Exit fullscreen mode

No human. No UI. No stored credentials that can be stolen. No subscription to manage.

The agent generates an ephemeral keypair per session, gets funded from a faucet (on test networks) or a pre-loaded wallet (on mainnet), makes the payment, and moves on.


Who Builds This Infrastructure First, Wins

We are in a narrow window. AI agents are proliferating. The companies building them are running into the payment problem right now - and solving it badly, with workarounds like pre-purchased credit bundles, API key sharing, and centralized billing dashboards.

These are fine stopgaps. They are not the endgame.

The endgame is a world where any API can declare its price in a Payment-Request header, any agent can pay it atomically, and the entire interaction is settled on-chain without a third party in the middle.

That world creates:

  • A long tail of micro-API businesses that are uneconomical today because per-user billing infrastructure costs more than the service itself
  • Agent-native services that don't bother with human-facing dashboards because they only serve machines
  • Composable payment flows where one agent pays another, which pays a third, all within a single user-initiated task

The infrastructure for this needs to be built now, while the norms are still forming. Whoever defines the standard shapes how the next decade of API economics works.


What We're Building

MPP Test Kit is our contribution to this problem. It is an open-source SDK that makes testing the 402 payment flow trivial - for both sides of the transaction.

On the client side:

import { mppFetch } from "mpp-test-sdk";

// No wallet setup. No config. One line.
const res = await mppFetch("https://api.example.com/data");
const data = await res.json();

Enter fullscreen mode Exit fullscreen mode

The SDK generates a Solana keypair, airdrops SOL from the devnet/testnet faucet, handles the 402 response, executes the payment, and retries the request - all automatically.

On the server side:

import { createTestServer } from "mpp-test-sdk";

const mpp = createTestServer();

app.get("/api/data",
  mpp.charge({ amount: "0.001" }),
  (req, res) => {
    res.json({ data: "premium content" });
  }
);

Enter fullscreen mode Exit fullscreen mode

One middleware line. The server auto-generates its recipient wallet, returns 402 with the payment details, and verifies the Solana transaction on-chain before serving the response.

The goal is to make the 402 flow so easy to test that developers start building against it - and in doing so, establish what the real-world implementation of machine-to-machine payments looks like.


The Stakes

This is not a niche developer tool story. This is an infrastructure story.

The internet runs on HTTP. HTTP has a status code explicitly reserved for payments. Solana has the performance characteristics to make that status code real. AI agents have the economic incentive to use it.

The pieces are all here. What has been missing is the tooling that makes it easy to build and test.

We are building that tooling. But more than that, we are trying to establish a pattern - a shared understanding of how machines should pay each other - before that pattern gets defined by a centralized intermediary who extracts a fee from every transaction.

The window is open. It will not stay open forever.


MPP Test Kit is open source. Try the playground at mpptestkit.com or install the SDK: npm i mpp-test-sdk