MPP Protocol Deep-Dive
Overview
Protocol Specification
HTTP 402 Payment Required
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
Example request
402 Response structure
Required fields
Field
Type
Description
Optional fields
Field
Type
Description
Payment Methods
Crypto payment method
Payment Execution
Transaction construction
Transaction signing and submission
Payment Credentials
Credential format
Service verification
Resource Delivery
Response with receipt
Receipt structure
Receipt verification
Error Handling
Payment errors
Service errors
Version Negotiation
Client specifies version
Server responds with supported version
Version compatibility
Extensions
Escrow extension
Subscription extension
Security Considerations
Payment replay prevention
Amount verification
Blockchain confirmation
Implementation Checklist
Next Steps
Resources
Last updated
Was this helpful?
