Machine Payments Protocol (MPP) ↗ is an open protocol for machine-to-machine payments. It standardizes the HTTP 402 Payment Required status code with a formal authentication scheme proposed to the IETF ↗. MPP gives agents, applications, and people one interface to pay for a service in the same HTTP request.
MPP is payment-method agnostic. It supports stablecoins, cards through Stripe, and custom payment methods. A service can offer more than one method.
- An Agent or HTTP client requests a paid resource.
- The service returns
402 Payment Requiredwith a payment Challenge. - The client fulfills the payment.
- The client retries with a payment Credential.
- The service returns the resource with a payment Receipt.
HTTP services exchange payment data in authentication headers. Model Context Protocol (MCP) tools use the same flow through JSON-RPC.
MPP defines three payment intents:
charge— Collect a one-time payment.session— Charge for measured usage.subscription— Sell recurring access.
For more information, refer to MPP payment intents ↗.
MPP is backwards-compatible with x402. MPP clients can consume existing x402 services without changes to those services.
Accept payments
Pay from the Agents SDK
MPP provides SDKs for TypeScript, Python, Rust, Go, and Ruby. The Cloudflare guides use the TypeScript mppx SDK ↗.
For current packages and integrations, refer to the MPP SDK documentation ↗.
- mpp.dev ↗ — Protocol documentation and guides
- IETF specification ↗ — Payment HTTP Authentication Scheme
- Pay Per Crawl — Cloudflare-native web content monetization