Skip to content

Commit bb4ee80

Browse files
authored
quick fixes
1 parent 6721465 commit bb4ee80

4 files changed

Lines changed: 14 additions & 34 deletions

File tree

‎src/content/docs/agents/agentic-payments/index.mdx‎

Lines changed: 10 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ sidebar:
55
order: 8
66
group:
77
hideIndex: false
8-
description: Let AI agents pay for services programmatically using open payment protocols like MPP and x402 with Cloudflare's Agents SDK.
8+
description: Let AI agents pay for services programmatically using payment protocols like MPP and x402 with Cloudflare's Agents SDK.
99
---
1010

1111
import { LinkCard, CardGrid } from "~/components";
1212

1313
AI agents need to discover, pay for, and consume resources and services programmatically. The old way of onboarding required account creation, adding a payment method, and acquiring an API key before a payment can be made for services. Agentic payments as a category allows AI agents to purchase resources and services by interfacing with the HTTP 402: Payment Required response code.
1414

15-
Cloudflare's [Agents SDK](/agents/) supports agentic payments through two open protocols built on the HTTP `402 Payment Required` status code: **x402** and **Machine Payments Protocol (MPP)**. Both follow the same core flow:
15+
Cloudflare's [Agents SDK](/agents/) supports agentic payments through two protocols built on the HTTP `402 Payment Required` status code: **x402** and **Machine Payments Protocol (MPP)**. Both follow the same core flow:
1616

1717
1. A client requests a resource or calls a tool.
1818
2. The server responds with `402` and a payment challenge describing what to pay, how much, and where.
@@ -21,54 +21,35 @@ Cloudflare's [Agents SDK](/agents/) supports agentic payments through two open p
2121

2222
No accounts, sessions, or pre-shared API keys are required. Agents handle the entire exchange programmatically.
2323

24-
## x402 and MPP
24+
## x402 and Machine Payments Protocol
2525

2626
### x402
2727

28-
[x402](https://www.x402.org/) is an open payment standard created by Coinbase. It uses on-chain stablecoin payments (USDC on Base, Ethereum, Solana, and other networks) and defines three HTTP headers — `PAYMENT-REQUIRED`, `PAYMENT-SIGNATURE`, and `PAYMENT-RESPONSE` — to carry challenges, credentials, and receipts. Servers can offload verification and settlement to a **facilitator** service so they do not need direct blockchain connectivity. It is governed by Coinbase and Cloudflare, two of the founding members of the x402 Foundation.
28+
[x402](https://www.x402.org/) is a payment standard created by Coinbase. It uses on-chain stablecoin payments (USDC on Base, Ethereum, Solana, and other networks) and defines three HTTP headers — `PAYMENT-REQUIRED`, `PAYMENT-SIGNATURE`, and `PAYMENT-RESPONSE` — to carry challenges, credentials, and receipts. Servers can offload verification and settlement to a **facilitator** service so they do not need direct blockchain connectivity. It is governed by Coinbase and Cloudflare, two of the founding members of the x402 Foundation.
2929

3030
The Agents SDK provides first-class x402 integration:
3131

3232
- **Server-side**: `withX402` and `paidTool` for MCP servers, plus `x402-hono` middleware for HTTP Workers.
3333
- **Client-side**: `withX402Client` wraps MCP client connections with automatic 402 handling and optional human-in-the-loop confirmation.
3434

35-
### MPP
35+
### Machine Payments Protocol
3636

37-
[MPP (Machine Payments Protocol)](https://mpp.dev) is an open protocol co-authored by Tempo Labs and Stripe. It extends the HTTP `402` pattern with a formal `WWW-Authenticate: Payment` / `Authorization: Payment` header scheme and is on the IETF standards track.
37+
[Machine Payments Protocol (MPP)](https://mpp.dev) is a protocol co-authored by Tempo Labs and Stripe. It extends the HTTP `402` pattern with a formal `WWW-Authenticate: Payment` / `Authorization: Payment` header scheme and is on the IETF standards track.
3838

3939
MPP supports multiple payment methods beyond blockchain — including cards (via Stripe), Bitcoin Lightning, and stablecoins — and introduces **sessions** for streaming and pay-as-you-go use cases with sub-millisecond latency and sub-cent costs. MPP is backwards-compatible with x402: MPP clients can consume existing x402 services without modification.
4040

4141
## Charge for resources
4242

43-
Use these guides to gate your own services behind payments:
44-
4543
<CardGrid>
4644
<LinkCard
47-
title="HTTP content"
45+
title="HTTP content (x402)"
4846
description="Gate APIs, web pages, and files with a Worker proxy"
4947
href="/agents/agentic-payments/x402/charge-for-http-content/"
5048
/>
5149
<LinkCard
52-
title="MCP tools"
53-
description="Charge per tool call using paidTool"
54-
href="/agents/agentic-payments/x402/charge-for-mcp-tools/"
55-
/>
56-
</CardGrid>
57-
58-
## Pay for resources
59-
60-
Use these guides to build agents that pay for external services:
61-
62-
<CardGrid>
63-
<LinkCard
64-
title="Agents SDK"
65-
description="Wrap MCP clients with withX402Client"
66-
href="/agents/agentic-payments/x402/pay-from-agents-sdk/"
67-
/>
68-
<LinkCard
69-
title="Coding tools"
70-
description="OpenCode plugin and Claude Code hook"
71-
href="/agents/agentic-payments/x402/pay-with-tool-plugins/"
50+
title="HTTP content (MPP)"
51+
description="Gate APIs, web pages, and files with a Worker proxy"
52+
href="/agents/agentic-payments/mpp/charge-for-mcp-tools/"
7253
/>
7354
</CardGrid>
7455

‎src/content/docs/agents/agentic-payments/mpp/charge-for-http-content.mdx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,5 +104,5 @@ Refer to the [Hono middleware reference](https://mpp.dev/sdk/typescript/middlewa
104104

105105
## Related
106106

107-
- [Pay Per Crawl](/ai-crawl-control/features/pay-per-crawl/) — Cloudflare-native monetization without custom code
108107
- [mpp.dev](https://mpp.dev) — Protocol specification
108+
- [Pay Per Crawl](/ai-crawl-control/features/pay-per-crawl/) — Cloudflare-native monetization without custom code

‎src/content/docs/agents/agentic-payments/mpp/index.mdx‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description: Accept and make payments using the Machine Payments Protocol (MPP)
1010

1111
import { LinkCard, CardGrid } from "~/components";
1212

13-
[MPP (Machine Payments Protocol)](https://mpp.dev) is an open protocol for machine-to-machine payments, co-authored by [Tempo Labs](https://tempo.xyz) and [Stripe](https://stripe.com). It standardizes the HTTP `402 Payment Required` status code with a formal authentication scheme proposed to the [IETF](https://paymentauth.org), giving agents, apps, and humans a single interface to pay for any service in the same HTTP request.
13+
[Machine Payments Protocol (MPP)](https://mpp.dev) is a protocol for machine-to-machine payments, co-authored by [Tempo Labs](https://tempo.xyz) and [Stripe](https://stripe.com). It standardizes the HTTP `402 Payment Required` status code with a formal authentication scheme proposed to the [IETF](https://paymentauth.org), giving agents, apps, and humans a single interface to pay for any service in the same HTTP request.
1414

1515
MPP is payment-method agnostic. A single endpoint can accept stablecoins (Tempo), credit cards (Stripe), or Bitcoin (Lightning).
1616

@@ -73,5 +73,4 @@ The TypeScript SDK includes framework middleware for [Hono](https://mpp.dev/sdk/
7373

7474
- [mpp.dev](https://mpp.dev) — Protocol documentation and quickstart guides
7575
- [IETF specification](https://paymentauth.org) — Full Payment HTTP Authentication Scheme specification
76-
- [x402](/agents/agentic-payments/x402/) — Coinbase's open payment standard, compatible with MPP
7776
- [Pay Per Crawl](/ai-crawl-control/features/pay-per-crawl/) — Cloudflare-native monetization for web content

‎src/content/docs/agents/agentic-payments/x402/index.mdx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ sidebar:
99

1010
import { LinkCard, CardGrid } from "~/components";
1111

12-
[x402](https://www.x402.org/) is an open payment standard built around HTTP 402 (Payment Required). Services return a 402 response with payment instructions, and clients pay programmatically without accounts, sessions, or API keys.
12+
[x402](https://www.x402.org/) is a payment standard built around HTTP 402 (Payment Required). Services return a 402 response with payment instructions, and clients pay programmatically without accounts, sessions, or API keys.
1313

1414
## Charge for resources
1515

@@ -44,5 +44,5 @@ import { LinkCard, CardGrid } from "~/components";
4444
## Related
4545

4646
- [x402.org](https://x402.org) — Protocol specification
47-
- [Pay Per Crawl](/ai-crawl-control/features/pay-per-crawl/) — Cloudflare-native monetization
4847
- [x402 examples](https://github.com/cloudflare/agents/tree/main/examples) — Complete working code
48+
- [Pay Per Crawl](/ai-crawl-control/features/pay-per-crawl/) — Cloudflare-native monetization

0 commit comments

Comments
 (0)