HTTP 402 Payments | Machine Payments Protocol (MPP) | Locus
All use cases

HTTP 402 Payments

The Machine Payments Protocol (MPP) uses HTTP 402 to enable AI agents to pay for web services natively — no API keys, no subscriptions, just pay and access.

What is HTTP 402?

HTTP 402 "Payment Required" has been a reserved status code since the early days of the web, designed for exactly this purpose: a server telling a client that payment is needed to access a resource. For decades it went unused because there was no standard way for machines to pay each other over HTTP. The Machine Payments Protocol (MPP) finally activates HTTP 402 by defining how an agent can discover the price, make a payment, and receive an access receipt — all within the HTTP request-response cycle. Locus is a key infrastructure provider for MPP, powering agent wallets and payment verification.

How MPP works

1. Agent requests a resource

The agent sends a standard HTTP request to an MPP-enabled endpoint. If payment is required, the server responds with HTTP 402 and includes payment details in the response headers: the price, accepted currency (USDC), and the payment address.

2. Agent makes payment

The agent's Tempo wallet (powered by Locus infrastructure) sends the requested USDC amount on Base. The transaction settles in under two seconds. The agent receives a payment receipt — a cryptographic proof of payment.

3. Agent accesses the resource

The agent retries the original request, this time including the payment receipt in the headers. The server verifies the receipt on-chain and serves the resource. The entire flow happens in seconds without human intervention.

MPP vs. traditional API authentication

Traditional API access requires signing up for an account, generating API keys, and pre-paying for credits or subscribing to a plan. MPP replaces all of this with a single mechanism: pay per request.

  • No accounts needed Agents don't need to sign up for services. They just need a funded wallet.
  • No API key management Payment itself is the authentication. If the agent paid, it gets access.
  • Instant access No waiting for account approvals or API key generation. Pay and use immediately.
  • Universal Any MPP-enabled service works with any MPP-compatible wallet. Open standard, no vendor lock-in.

Locus and the MPP ecosystem

Many Locus endpoints are available through MPP at mpp.sh/services, where agents with a Tempo wallet can call them over HTTP 402. Locus wallets are Tempo-compatible, so agents built on Locus can also call MPP-enabled services from other providers. Each new provider gives those agents another service they can discover and pay for without a separate account.

Related resources