When to pick MPP vs. alternatives
Anatomy
One-shot payment (simplest case)
For a single micropayment without opening a session:Open a session
deposit_amount is held from the agent’s wallet. Any unspent balance returns on close.
Sign a voucher
Each unit of work within the session produces a voucher:budget_remaining — once it hits zero, voucher requests return INSUFFICIENT_BALANCE.
Stream session costs
Useful when you want live metrics during a long session:Close a session
- All signed vouchers finalize
- Total paid amount debits from the agent’s wallet (vs. the deposit hold)
- Unspent deposit returns to the agent’s wallet
- Session transitions to
closed
Service-side: verify a receipt
When a consumer shows you a voucher, verify it:{ valid: true, session_id, amount, issued_at, expires_at } or a failure reason (replay, expired, revoked).
Discover MPP services
Analytics + reconciliation
Per-tenant summary:Provision a wallet for MPP
If an agent doesn’t have an MPP-capable wallet yet:Endpoints
| Endpoint | Purpose |
|---|---|
POST /v1/mpp/pay | One-shot micropayment |
POST /v1/mpp/sessions | Open session |
GET /v1/mpp/sessions | List sessions |
GET /v1/mpp/sessions/:id | Session detail + vouchers |
POST /v1/mpp/sessions/:id/voucher | Sign voucher |
POST /v1/mpp/sessions/:id/close | Close + settle |
GET /v1/mpp/sessions/:id/stream | SSE cost stream |
POST /v1/mpp/receipts/verify | Verify voucher |
GET /v1/mpp/services | Service directory |
GET /v1/mpp/services/:domain/pricing | Probe pricing |
POST /v1/mpp/wallets/provision | Provision MPP wallet |
GET /v1/mpp/analytics | Tenant summary |
GET /v1/mpp/reconciliation | Receipt-level recon |
GET /v1/mpp/transfers | List MPP transfers |
Lifecycle states
Session:open → active → closed | exhausted (budget ran out) | error
