Skip to main content

MPP (Machine Payment Protocol) Payments

Conto supports the Machine Payment Protocol (MPP) for session-based micropayments on the Tempo blockchain. MPP enables agents to open payment sessions, make incremental charges, and settle when done.

How It Works

Agent opens session  →  Makes requests (charges accrue)  →  Session closes  →  Settlement
  1. Agent calls an MPP-enabled service and receives a 402 challenge
  2. Agent pre-authorizes the session deposit through Conto policies
  3. Agent opens an MPP session with a deposit budget
  4. Agent makes requests, each consuming part of the deposit
  5. Session closes and unused deposit is returned

Pre-Authorization

Before opening an MPP session, validate against policies:
curl -X POST https://conto.finance/api/sdk/mpp/pre-authorize \
  -H "Authorization: Bearer $CONTO_SDK_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 10.00,
    "recipientAddress": "0xServiceAddress",
    "resourceUrl": "https://api.service.com/stream",
    "serviceDomain": "api.service.com",
    "intent": "session",
    "depositAmount": 10.00
  }'
Response (Approved):
{
  "authorized": true,
  "wallet": {
    "id": "wal_123",
    "address": "0xAgentWallet",
    "chainId": "4217",
    "availableBalance": 500.00
  },
  "reasons": ["Within MPP session budget", "Service domain allowed"]
}

Recording Transactions

After MPP charges are settled, record them in Conto:
curl -X POST https://conto.finance/api/sdk/mpp/record \
  -H "Authorization: Bearer $CONTO_SDK_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 3.50,
    "recipientAddress": "0xServiceAddress",
    "transactionHash": "0xabc123...",
    "resourceUrl": "https://api.service.com/stream",
    "serviceDomain": "api.service.com",
    "sessionId": "mpp_session_xyz",
    "scheme": "mpp",
    "walletId": "wal_123",
    "chainId": "4217"
  }'

Querying Services

View MPP services your agent has used:
GET /api/sdk/mpp/services

Budget Tracking

Check remaining MPP budget:
GET /api/sdk/mpp/budget

MPP Policy Rules

Configure MPP-specific policies to control session-based payments. See Advanced Policies for the full rule type reference. Key rule types:
  • MPP_MAX_PER_REQUEST — Cap per individual charge
  • MPP_PRICE_CEILING — Hard price ceiling
  • MPP_SESSION_BUDGET — Maximum deposit per session
  • MPP_MAX_CONCURRENT_SESSIONS — Limit active sessions
  • MPP_MAX_SESSION_DURATION — Maximum session length
  • MPP_ALLOWED_SERVICES — Allowlist of service domains
  • MPP_BLOCKED_SERVICES — Blocklist of service domains

Supported Chain

MPP payments are currently supported on the Tempo blockchain:
PropertyValue
NetworkTempo Mainnet
Chain ID4217
CurrencypathUSD (TIP-20)
Explorerhttps://explore.tempo.xyz

Next Steps

x402 Payments

HTTP 402 micropayments for APIs

Advanced Policies

Configure MPP-specific policy rules