Protocol

MPP Architecture

How StellarNotherc implements the Machine Payment Protocol with dual payment intents for agent commerce.

Machine Payment Protocol

The Machine Payment Protocol (MPP) is Stellar's standard for agent-to-service payments. StellarNotherc uses MPP with two complementary intents: charge for per-request micropayments and channel (sessions) for high-frequency agent workflows.

Sessions allow an agent to authorize a spending limit upfront, then stream micropayments against that session without a separate on-chain transaction for each call. The mppx SDK powers the portfolio-worker middleware, while the web app implements MPP natively for full control over challenge HMAC binding and hash memo verification.

Charge vs. Channel

FeatureCharge IntentChannel Intent (Sessions)
SettlementPer-request, on-chain on StellarSession-based, single funding tx + refund
Throughput1 tx per tool callThousands of calls per session
Best forOne-off queries, external callersAgent chat workflows, batch analytics
Auth headerAuthorization: Payment <credential>x-mpp-session: <session-id>
ProofSP1 purchase receipt per callSP1 purchase receipt per debited marketplace execution

Existing Architecture Alignment

StellarNotherc's session lifecycle implements the core primitives that MPP channel intent requires:

MPP ConceptImplementation
Session with spending limitmpp-session.ts — budget allocation, funding verification, 24h TTL
Per-call chargeschargeMppSession() — atomic charge with rollback on failure
RefundsrefundMppSessionCharge() — automatic refund on tool failure
Charge intentmpp-charge.ts — WWW-Authenticate challenge + Authorization credential verification
Proof of paymentSP1 purchase receipt proofs reconciled against durable marketplace executions

Wire Format

Challenge: WWW-Authenticate: Payment id="...", realm="...", method="stellar", intent="charge", request="<base64url>"

Credential: Authorization: Payment <base64url({"challenge":{...}, "payload":{"transactionHash":"..."}})>

Hash Memo: Stellar tx memo = SHA-256(challenge.id), binding payment to specific challenge