npx claudepluginhub orcaqubits/agentic-commerce-skills-plugins --plugin stripe-mppThis skill is limited to using the following tools:
**Fetch live docs**:
Guides Payload CMS config (payload.config.ts), collections, fields, hooks, access control, APIs. Debugs validation errors, security, relationships, queries, transactions, hook behavior.
Acquire memory dumps from live systems/VMs and analyze with Volatility 3 for processes, networks, DLLs, injections in incident response or malware hunts.
Provides x86-64/ARM disassembly patterns, calling conventions, control flow recognition for static analysis of executables and compiled binaries.
Fetch live docs:
https://www.npmjs.com/package/mppx for the current server middleware API and configuration optionsmppx server middleware hono express next.js elysia for framework-specific integration patternssite:github.com stripe-samples machine-payments server for official server sample codehttps://docs.stripe.com/payments/machine/mpp for Stripe-side server configurationThe mppx server middleware intercepts requests to protected routes and implements the full HTTP 402 challenge-response flow:
Authorization: Payment header, returns 402 with WWW-Authenticate: Payment challengePayment-Receipt header to the responseThe central factory creates the server instance:
const mppx = Mppx.create({
secretKey: process.env.MPP_SECRET_KEY, // 32-byte hex for HMAC challenge binding
methods: [/* payment method configurations */],
});
The secretKey is critical — it binds challenges to prevent forgery and replay attacks.
| Framework | Middleware Pattern | Notes |
|---|---|---|
| Hono | app.get('/path', mppx.charge(...), handler) | Native middleware chaining |
| Express | app.get('/path', mppx.charge(...), handler) | Standard Express middleware |
| Next.js | Route handler wrapping | App Router and Pages Router |
| Elysia | Plugin-style integration | Bun-native framework |
Two middleware functions match the two payment intents:
mppx.charge({ amount }) — Per-request payment gate (charge intent)mppx.session({ maxAmount }) — Session-based streaming payment gate (session intent)'100' = $0.01 (USDC has 6 decimals, so 100 = 0.000100, but convention varies by method)A single server can accept multiple payment methods simultaneously:
const mppx = Mppx.create({
secretKey: process.env.MPP_SECRET_KEY,
methods: [
tempo.charge({ /* Tempo config */ }),
stripe.charge({ /* Stripe config */ }),
],
});
The client selects which method to use when fulfilling the challenge.
For routes where the price depends on the request:
mppx.charge()The middleware returns RFC 9457 Problem Details on payment errors:
| Status | Type | When |
|---|---|---|
| 402 | payment-required | No credential provided |
| 402 | verification-failed | Invalid proof of payment |
| 402 | payment-expired | Challenge or credential expired |
| 402 | malformed-credential | Unparseable credential |
secretKey, never hardcodeFetch the latest mppx package README for exact middleware API signatures, configuration options, and framework-specific examples before implementing.