MPP vs x402
Dexter offers two payment SDKs. Both use HTTP 402 for machine payments. They serve different use cases and are completely independent packages with no dependency between them.
At a Glance
| @dexterai/mpp | @dexterai/x402 | |
|---|---|---|
| Protocol | Machine Payments Protocol (Stripe/Tempo IETF draft) | x402 (Linux Foundation standard) |
| Chains | Solana only | Solana + 7 EVM chains |
| Per-request payments | Yes (charge mode) | Yes (default) |
| Streaming sessions | Yes (Swig voucher channels) | No (Access Pass is time-based, not usage-based) |
| Gas sponsorship | Always (Dexter co-signs as fee payer) | Only on select flows |
| Express middleware | No | Yes (x402Middleware) |
| React hooks | No | Yes (useX402Payment, useAccessPass) |
| Browser client | No | Yes (createX402Client) |
| Dynamic pricing | No | Yes (character, token, custom) |
| Access passes | No | Yes (time-limited JWT) |
| API discovery | No | Yes (searchAPIs) |
| Budget accounts | No | Yes (agent spending controls) |
| Sponsored access | No | Yes (ads for agents) |
When to Use MPP
Use @dexterai/mpp when:
- Streaming micropayments: Agent orchestration, continuous data feeds, model inference pipelines where you make many sequential calls to the same seller
- Gas-free buyers: The buyer has USDC but no SOL. Dexter sponsors all transaction fees.
- Solana-native settlement: You want managed Solana settlement with co-signing, simulation, and confirmation handled for you
- Non-custodial sessions: Buyers retain custody through Swig smart wallet delegation with on-chain spend limits and revocability
When to Use x402
Use @dexterai/x402 when:
- Multi-chain: You need EVM chain support (Base, Polygon, Arbitrum, Optimism, Avalanche, BSC, SKALE)
- Drop-in middleware: You want a single Express middleware line to protect endpoints
- React/browser apps: You need React hooks or browser-based payment flows
- Time-based access: Access passes for subscription-like patterns (pay once, use for N hours)
- LLM pricing: Token-aware pricing for AI/ML endpoints
- API marketplace: You want your endpoint discoverable in the OpenDexter marketplace
- Sponsored access: Ad-supported free tier for agents
Can a Seller Accept Both?
Yes. Both SDKs point at the same facilitator (x402.dexter.cash), the same fee payer wallets, and the same RPC infrastructure. A seller can accept x402 per-request payments and MPP session payments with a single wallet address.
MPP can also express x402 payments natively. Services built on x402 can accept MPP-formatted payments without code changes.
How They Relate
Both protocols use HTTP 402 as the signaling mechanism. The key architectural difference:
- x402 was designed for per-request payments across many chains. The client signs each transaction and sends it with the request. Settlement is per-call.
- MPP was designed for machine-to-machine streaming. The protocol separates authorization (session open) from payment (vouchers) from settlement (session close), so high-frequency interactions don't require per-call blockchain transactions.
Both packages depend on @x402/extensions (the lower-level protocol library maintained by the x402 ecosystem), but neither depends on the other.
Migration
There is no migration needed. The packages are independent and can coexist. A seller can serve both x402 and MPP endpoints from the same application. A buyer can use both SDKs to pay different sellers.
If you currently use x402 and want to add session support for high-frequency buyers, install @dexterai/mpp alongside @dexterai/x402. They do not conflict.