How agents pay for APIs

Six explainers, each with a working example. For one-paragraph definitions of every term, see the glossary; to wire payments into a framework, see integrations.

x402

x402 is an open protocol that makes HTTP 402 Payment Required a working payment flow: the server puts machine-readable payment terms in a PAYMENT-REQUIRED header, the client retries with a signed stablecoin authorization in PAYMENT-SIGNATURE, a facilitator verifies and settles it on chain, and the answer carries a PAYMENT-RESPONSE receipt.

HTTP 402 Payment Required

HTTP 402 Payment Required is the status code a server returns when a resource exists but costs money. Long reserved for future use, it is now the price quote in x402 and MPP: the 402 carries the payment terms in its headers, and the payment rides on the retry.

MPP (Machine Payments Protocol)

MPP (the Machine Payments Protocol) carries pay-per-request payments through HTTP's standard authentication headers: a 402 challenges with WWW-Authenticate: Payment, the client answers with an Authorization: Payment credential, and the settled response returns a signed Payment-Receipt. Its evm method settles USDC by EIP-3009; its tempo method settles natively on Tempo.

Agent payments

Agent payments are how software agents buy tools and data on their own: the agent reads a price from an HTTP 402, pays per request from its own wallet (x402 or MPP) or a prepaid key, receives a receipt, and stays inside spend limits its operator set in advance.

Pay-per-call API

A pay-per-call API prices every request on its own and takes payment with the request, rather than through a subscription, a quota or an API key. The price is quoted in an HTTP 402 before anything is paid, and a failed call is not charged.

MCP payments

MCP payments let an assistant pay for a tool call made over the Model Context Protocol, either through a local MCP server that signs payments underneath (wallet or prepaid key) or through a hosted connector that returns MPP challenges in the tool result and accepts a credential in _meta on the retry.