跳到主要内容Skip to main content

x402x402

x402

  • AI 编程AI coding
  • 第三段 · 用深Stage 3 · Going Deeper
  • 引用核验 2026-11-21refs checked 2026-11-21
解决什么问题What problem it solves

让 API、内容或数字服务直接通过 HTTP 402 收款:客户端先拿到付款要求,付款后重试同一请求,不需要账号、API key 或订阅。Let APIs, content and digital services charge directly over HTTP 402: the client receives payment requirements, pays, and retries the same request without an account, API key or subscription.

这是什么What it is

x402 复用长期保留的 HTTP 402 Payment Required 状态码:服务端在响应里给出价格、收款地址、资产与网络,客户端完成支付后带凭证重试。

它是支付协商层,不规定具体的链上结算实现;稳定币、 facilitator、批量结算都可以接。

x402 reuses the long-reserved HTTP 402 Payment Required status. The server returns price, payee, asset and network; after payment the client retries with a proof.

It is a payment negotiation layer, not a settlement implementation: stablecoins, facilitators and batched settlement can all sit underneath.

为什么需要知道Why it matters

Agent 要按次调用大量服务,传统开户、绑卡、按月订阅都不适合机器。x402 把「这次请求要不要付、付多少、付给谁」放回 HTTP 本身,适合按次计费与微支付。Agents make many pay-per-call requests, while sign-up, card-on-file and monthly subscriptions are built for humans. x402 puts “does this request cost money, how much and to whom” back into HTTP itself.

别名Chinese aliases

HTTP 402 支付 · x402 协议 · 机器支付协议

出处Sources
  • x402 · 官方文档x402 official documentation ↗
  • x402 · 官方网站x402 official site ↗