MPP Protocol Deep-Dive

Technical deep-dive into the Machine Payments Protocol specification and its implementation with Solana settlement.

Overview

The Machine Payments Protocol (MPP) is an open standard for machine-to-machine payments, co-authored by Stripe and Tempo. It enables agents to discover services, receive payment requests, authorize payments, and verify delivery—all without human intervention.

Protocol Specification

HTTP 402 Payment Required

MPP uses the HTTP 402 status code (Payment Required) to initiate payment flows.

RFC 7231 Section 6.5.2:

The 402 (Payment Required) status code is reserved for future use.

MPP formalizes this reserved status code for machine payments.

Request-Response Cycle

Agent                                           Service
  │                                                │
  ├─ GET /api/resource ──────────────────────────►│
  │                                                │
  │◄────── 402 Payment Required ──────────────────┤
  │        { payment_methods, amount, ... }       │
  │                                                │
  ├─ (Authorize payment on Solana) ──────┐        │
  │                                       │        │
  │◄──────────────────────────────────────┘        │
  │  signature: 5Kx...9mQ                          │
  │                                                │
  ├─ GET /api/resource ──────────────────────────►│
  │  MPP-Payment-Credential: solana:sig:5Kx...9mQ  │
  │                                                │
  │◄────── 200 OK ─────────────────────────────────┤
  │        { resource, receipt }                   │
  │                                                │

Payment Request Format

When a client requests a paid resource, the server responds with HTTP 402.

Example request

402 Response structure

Required fields

Field
Type
Description

amount

string

Payment amount in specified currency

currency

string

Currency code (USD, EUR, etc.)

payment_methods

array

Available payment methods

description

string

Human-readable payment description

Optional fields

Field
Type
Description

expires_at

string

ISO 8601 timestamp when payment request expires

metadata

object

Additional service-specific data

callback_url

string

Webhook URL for payment confirmation

Payment Methods

MPP supports multiple payment types. MoltMPP implements the crypto type with Solana settlement.

Crypto payment method

Fields:

  • blockchain: Target blockchain (solana, ethereum, base, polygon)

  • token: Token symbol (USDC, SOL, USDT, ETH)

  • token_address: Token mint/contract address

  • recipient: Merchant wallet address

  • network: Network identifier (mainnet-beta, devnet)

  • memo: Payment identifier for reconciliation

Payment Execution

MoltMPP handles payment execution on Solana.

Transaction construction

Transaction signing and submission

Payment Credentials

After payment execution, the agent provides proof of payment to the service.

Credential format

Credential structure: {blockchain}:{type}:{value}

Examples:

  • solana:signature:5KxQr...9mQ

  • ethereum:txhash:0xabc...def

  • base:txhash:0x123...456

Service verification

Service verifies payment on-chain before delivering resource:

Resource Delivery

Upon successful payment verification, service delivers resource with receipt.

Response with receipt

Receipt structure

Receipt is a signed proof of delivery:

merchant_signature: Cryptographic signature from merchant proving delivery

Receipt verification

Agent verifies receipt authenticity:

Error Handling

MPP defines standard error responses.

Payment errors

Insufficient payment:

Expired payment request:

Invalid credential:

Service errors

Service unavailable:

Version Negotiation

MPP supports version negotiation via headers.

Client specifies version

Server responds with supported version

Version compatibility

MoltMPP supports MPP v1.0. Future versions will maintain backward compatibility.

Extensions

MPP allows protocol extensions via custom headers.

Escrow extension

MoltMPP implements escrow for proof of delivery:

Agent creates escrow account instead of direct transfer.

Subscription extension

Future support for recurring payments:

Security Considerations

Payment replay prevention

Services must track used payment credentials:

Amount verification

Always verify on-chain amount matches requested amount:

Blockchain confirmation

Wait for finalized confirmation before delivering resources:

Solana confirmation levels:

  • processed: Transaction included in block

  • confirmed: Block confirmed by cluster

  • finalized: Block finalized (irreversible)

Use finalized for payment verification.

Implementation Checklist

For services implementing MPP with Solana:

Next Steps

Resources

Last updated

Was this helpful?