spec

MPP.sol

Machine Payments Protocol — Solana settlement adapter and CPI primitive.

What

MPP is a protocol co-authored by Stripe and Tempo Labs (IETF draft) that formalizes HTTP 402 Payment Required for machine-to-machine payments. Flow:

  1. Client requests a resource.
  2. Server returns 402 with a WWW-Authenticate: Payment challenge.
  3. Client pays via any supported method.
  4. Client retries with an Authorization: Payment header.
  5. Server returns the resource plus a Payment-Receipt header.

MPP is settlement-agnostic. Production methods today are Tempo, Stripe (card/wallet), and Lightning. This project adds Solana.

Why Solana

Scope

This repo (mppsol/spec) holds the specification. Reference implementations:

Repo Purpose
mppsol/core Shared types, receipt format, session schema.
mppsol/server HTTP middleware (Hono, FastAPI) emitting MPP 402 and verifying Solana settlement.
mppsol/agent Client SDK (TypeScript, Python) for agents holding Solana USDC.
mppsol/cpi Solana program exposing MPP semantics as a CPI target.

Specification contents

Status

Specification stage. v0.1 freeze and reference implementations targeted Q3 2026. RFC-style. Breaking changes expected before v1.

Differentiation

sendaifun/solana-mpp is an existing experimental Solana adapter for MPP — HTTP server middleware plus one-time charges and prepaid sessions, with in-memory storage and localnet examples. MPP.sol differs in two ways:

  1. Production-grade settlement. Devnet→mainnet path, persistent session state, observability, formal receipt verification, conformance tests against the upstream MPP spec.
  2. CPI primitive. MPP exposed as a Solana program other programs can invoke. Lets on-chain protocols (vaults, DEXes, oracle consumers) pay for off-chain resources directly, without an off-chain relayer.

Relationship to upstream MPP

MPP.sol implements the MPP wire protocol as defined by Stripe and Tempo Labs. We track the IETF draft and intend to propose a Solana settlement method registration once the spec stabilizes.

Contributing

Issues and discussion welcome. The spec is the highest-leverage place to contribute today; implementation work begins after v0.1 freeze.

Maintainership

Maintained by psyto. Licensed under Apache-2.0.