MPP (Machine Payments Protocol)

Session-based micropayments via Tempo blockchain, co-authored by Stripe and Tempo.

Flow

  1. Agent sends request with no auth header
  2. Server returns HTTP 402 with both x402 and MPP payment challenges
  3. Agent authorizes payment via Tempo wallet
  4. Agent retries with Authorization: Payment <credential> header
  5. Server verifies via mppx SDK, processes request, returns receipt in Payment-Receipt header

Install Tempo CLI

bash
# Install the Tempo launcher
curl -fsSL https://tempo.xyz/install | bash

# Or install binaries directly
curl -sL https://github.com/tempoxyz/wallet/releases/latest/download/tempo-wallet-$(uname -s | tr A-Z a-z)-$(uname -m | sed 's/x86_64/amd64/') -o ~/.tempo/bin/tempo-wallet
curl -sL https://github.com/tempoxyz/wallet/releases/latest/download/tempo-request-$(uname -s | tr A-Z a-z)-$(uname -m | sed 's/x86_64/amd64/') -o ~/.tempo/bin/tempo-request
chmod +x ~/.tempo/bin/tempo-*

# Set up your wallet (opens browser for passkey auth)
tempo wallet login

# Fund your wallet
tempo wallet fund

Usage

Simple request (one-shot charge)

bash
tempo request -X POST \
  -H "Content-Type: application/json" \
  --json '{"model": "deepseek-v3.2", "messages": [{"role": "user", "content": "Hello"}], "max_tokens": 100}' \
  https://api.surplusintelligence.ai/v1/chat/completions

Dry run (preview cost without paying)

bash
tempo request --dry-run -X POST \
  -H "Content-Type: application/json" \
  --json '{"model": "claude-opus-4.6", "messages": [{"role": "user", "content": "Hello"}], "max_tokens": 100}' \
  https://api.surplusintelligence.ai/v1/chat/completions

Session-based (streaming with off-chain vouchers)

bash
tempo request -X POST \
  --json '{"model": "deepseek-v3.2", "messages": [{"role": "user", "content": "Write a haiku"}], "max_tokens": 50, "stream": true}' \
  https://api.surplusintelligence.ai/v1/chat/completions

# List active sessions
tempo wallet sessions list

# Close session and settle on-chain
tempo wallet sessions close https://www.surplusintelligence.ai

Available Models

Live model list with current prices: GET https://api.surplusintelligence.ai/v1/models

Or browse: GET https://api.surplusintelligence.ai/v1/prices

How It Differs from x402

x402MPP
ChainBase (USDC)Tempo
SettlementOne on-chain tx per requestSession-based, bulk settlement
Best forSingle requests, simple agentsStreaming, high-frequency calls

Both protocols are advertised in the same 402 response — agents pick their preferred protocol.

Pricing

Agents are pre-charged based on max_tokens. Set max_tokens to the minimum you need to avoid overpaying. The cost estimate is shown in the 402 challenge response.

Configuration (Server)

The MPP server uses the operator wallet as the payment recipient. The challenge-signing secret is loaded from AWS Secrets Manager via the MPP_SECRET_ARN environment variable.