Skip to content

MPP (Machine Payments Protocol)

Machine Payments Protocol (MPP) is a protocol for machine-to-machine payments, co-authored by Tempo Labs and Stripe. It standardizes the HTTP 402 Payment Required status code with a formal authentication scheme proposed to the IETF. MPP gives agents, apps, and humans a single interface to pay for any service in the same HTTP request.

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

How it works

  1. A client requests a resource — GET /resource.
  2. The server returns 402 Payment Required with a WWW-Authenticate: Payment header containing a payment challenge.
  3. The client fulfills the payment — signs a transaction, pays an invoice, or completes a card payment.
  4. The client retries the request with an Authorization: Payment header containing a payment credential.
  5. The server verifies the payment and returns the resource with a Payment-Receipt header.

Payment methods

MPP supports multiple payment methods through a single protocol:

MethodDescriptionStatus
TempoStablecoin payments on the Tempo blockchain with sub-second settlementProduction
StripeCards, wallets, and other Stripe-supported methods via Shared Payment TokensProduction
LightningBitcoin payments over the Lightning NetworkAvailable
CardCard payments via encrypted network tokensAvailable
CustomBuild your own payment method using the MPP SDKAvailable

Servers can offer multiple methods simultaneously. Clients choose the method that works for them.

Payment intents

MPP defines two payment intents:

  • charge — A one-time payment that settles immediately. Use for per-request billing.
  • session — A streaming payment over a payment channel. Use for pay-as-you-go or per-token billing with sub-cent costs and sub-millisecond latency.

Compatibility with x402

MPP is backwards-compatible with x402. The core x402 exact payment flows map directly onto MPP's charge intent, so MPP clients can consume existing x402 services without modification.

Charge for resources

SDKs

MPP provides official SDKs in three languages:

SDKPackageInstall
TypeScriptmppxnpm install mppx
Pythonpympppip install pympp
Rustmpp-rscargo add mpp

The TypeScript SDK includes framework middleware for Hono, Express, Next.js, and Elysia, as well as a CLI for testing paid endpoints.