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
| Feature | Charge Intent | Channel Intent (Sessions) |
|---|---|---|
| Settlement | Per-request, on-chain on Stellar | Session-based, single funding tx + refund |
| Throughput | 1 tx per tool call | Thousands of calls per session |
| Best for | One-off queries, external callers | Agent chat workflows, batch analytics |
| Auth header | Authorization: Payment <credential> | x-mpp-session: <session-id> |
| Proof | SP1 purchase receipt per call | SP1 purchase receipt per debited marketplace execution |
Existing Architecture Alignment
StellarNotherc's session lifecycle implements the core primitives that MPP channel intent requires:
| MPP Concept | Implementation |
|---|---|
| Session with spending limit | mpp-session.ts — budget allocation, funding verification, 24h TTL |
| Per-call charges | chargeMppSession() — atomic charge with rollback on failure |
| Refunds | refundMppSessionCharge() — automatic refund on tool failure |
| Charge intent | mpp-charge.ts — WWW-Authenticate challenge + Authorization credential verification |
| Proof of payment | SP1 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
StellarNotherc Docs