MPP Session Payments
The Machine Payment Protocol (MPP) enables session-based micropayments on Tempo. Unlike x402 where each API call is a separate payment, MPP opens a session with a deposit budget. Your agent makes multiple requests against that budget and the session settles when done. This guide is a walkthrough. For the endpoint reference (request/response shapes, scopes, error codes), see SDK > MPP payments.Prerequisites
An active agent with an SDK key (Quickstart)
A funded Tempo wallet with
pathUSD on testnet/demo flows or USDC.e on mainnetAn MPP-enabled service to call (or use the examples below to simulate)
MPP vs x402
Use x402 when each API call is independent. Use MPP when your agent will make many requests to the same service in a session (e.g., streaming data, iterative processing, chat APIs).
How MPP Works
Step 1: Set Up MPP Policies
1
Create the policy
Go to Policies → Create Policy.
2
Add rules
Rule 1: Cap session deposit
No single session can have a deposit greater than $25.Rule 2: Cap per-request charge
No individual request within a session can charge more than $1.00.Rule 3: Limit concurrent sessions
Agent can have at most 3 open sessions at once.
3
Assign to agent
Go to the agent’s Permissions tab and assign the policy.
Step 2: Pre-Authorize the Session
When your agent needs to open an MPP session, first check policies withPOST /api/sdk/mpp/pre-authorize, sending the deposit amount and "intent": "session". Conto evaluates your MPP policies plus your general spend limits and responds one of two ways:
- Authorized: the response includes the wallet to use. Proceed to open the session with the MPP-enabled service.
- Denied: the response lists the violated rules. The agent should either request a smaller session or escalate.
Step 3: Open the Session
After Conto authorizes, open the MPP session with the service. The session deposit is locked onchain:Step 4: Make Requests
Each request to the MPP service consumes part of the deposit:Step 5: Close and Settle
When your agent is done, close the session. Unused deposit is returned:Step 6: Record in Conto
Record the settled amount withPOST /api/sdk/mpp/record, including the settlement txHash and the sessionId, so Conto can track spending. See Recording Transactions in the SDK reference for the request shape, including per-call batchItems.
Step 7: Monitor Spending
Check remaining MPP budget withGET /api/sdk/mpp/budget and list the MPP services your agent has used via GET /api/sdk/mpp/services. See Budget Tracking and Querying Services for details, including session-scoped budget views.
Dashboard
Go to Analytics to see MPP-specific metrics: session frequency, average session cost, per-service breakdown, and deposit utilization (how much of each deposit is actually used).Full Integration Example
Complete TypeScript flow for an MPP session: For MPP flows, call the SDK REST endpoints directly. This example reuses thepostConto helper and PreAuthorizeResponse type
from the x402 guide’s integration example:
MPP Policy Reference
The complete list of MPP rule types, value formats, and operators lives in Advanced Policies > MPP Protocol Rules.Troubleshooting
Session deposit higher than wallet balance
Session deposit higher than wallet balance
The deposit is locked onchain when the session opens. If your wallet has 20 session, it fails. Check your wallet balance and request a smaller deposit.
Settled amount doesn't match expected charges
Settled amount doesn't match expected charges
The service determines final settlement. If charges seem wrong, check the session details with the service provider. Conto records whatever you report. Make sure you’re recording the settlement amount from the close response.
MPP only works on Tempo, can I use it on Base?
MPP only works on Tempo, can I use it on Base?
MPP is currently supported only on the Tempo blockchain (see Supported Chain for chain IDs, currencies, and explorers). For paid APIs on Base or Ethereum, use the x402 protocol instead.
Next Steps
x402 Payments
Per-request API payments on Base and Tempo
MPP SDK Reference
Full API reference for MPP endpoints
Advanced Policies
All MPP policy rule types and value formats
Recipes
Copy-paste MPP recipes