MPP Endpoints
MPP is the machine-facing commercial layer on top of Remlo. Each endpoint either charges a one-off HTTP 402 payment or opens a session that uses cumulative vouchers. The handlers are built withmppx.
Full endpoint table
| # | Method | Route | Charge | Type | Payer | Backing system |
|---|---|---|---|---|---|---|
| 1 | GET | /api/mpp/treasury/yield-rates | $0.01 | Single charge | AI agent | YieldRouter |
| 2 | POST | /api/mpp/payroll/execute | $1.00 | Single charge | AI agent | PayrollBatcher, Supabase |
| 3 | POST | /api/mpp/employee/advance | $0.50 | Single charge | Employee | StreamVesting |
| 4 | POST | /api/mpp/compliance/check | $0.05 | Single charge | Employer, auditor, or agent | TIP-403, compliance_events |
| 5 | GET | /api/mpp/employee/balance/stream | $0.001/tick | Session SSE | Employee or agent | StreamVesting |
| 6 | GET | /api/mpp/payslips/[runId]/[employeeId] | $0.02 | Single charge | Employee or employer | payment_items, payroll_runs |
| 7 | POST | /api/mpp/memo/decode | $0.01 | Single charge | Auditor or employer | decodeMemo() |
| 8 | GET | /api/mpp/employee/[id]/history | $0.05 | Single charge | Employee or agent | payment_items |
| 9 | POST | /api/mpp/bridge/offramp | $0.25 | Single charge | Employee | Bridge transfer API |
| 10 | POST | /api/mpp/treasury/optimize | $0.10 | Session | Employer agent | PayrollTreasury, YieldRouter |
| 11 | GET | /api/mpp/marketplace/compliance-list/[employerId] | $0.50 | Single charge | Employer or auditor | compliance_events |
| 12 | POST | /api/mpp/agent/session/treasury | $0.02 | Session | AI agent | Treasury, yield, registry contracts |
Session endpoints
Only three endpoints use session mechanics in the current design:| Route | Session unit |
|---|---|
/api/mpp/employee/balance/stream | second |
/api/mpp/treasury/optimize | session |
/api/mpp/agent/session/treasury | session |
Multi-rail endpoints
Two MPP write routes currently use a composed payment path with Tempo and Stripe fallback:/api/mpp/payroll/execute/api/mpp/bridge/offramp
Mppx.compose() with:
- a Tempo PathUSD charge
- a Stripe charge with
currency: "usd"anddecimals: 2
Request shapes
POST /api/mpp/payroll/execute
executeBatchPayroll() is submitted.
POST /api/mpp/employee/advance
StreamVesting.claimAccrued().
POST /api/mpp/compliance/check
GET /api/mpp/employee/balance/stream?employeeId=emp_123
Returns an SSE stream with one event per second. The payload includes:
tickemployeeIdbalancebalanceUsdsalary_per_second_usdtimestamp
address query support is still accepted for compatibility, but employeeId is now the canonical request shape.
POST /api/mpp/bridge/offramp
POST /api/mpp/treasury/optimize
summary, suggestion, recommendations, current vs recommended allocation, and projected annual yield.
GET /api/mpp/marketplace/compliance-list/[employerId]
Returns the marketplace allowlist contract:
POST /api/mpp/agent/session/treasury
action values:
balanceyieldrebalanceheadcount
rebalance action accepts either:
allocationparams.targetAllocation