/stripe-mpp:mpp-dev-patternsfrom stripe-mpp
Documents cross-cutting MPP development patterns including HMAC challenge binding, replay protection, receipt validation, error handling, retry logic, TLS requirements, and monitoring for payment authentication architecture.
Ships in stripe-mpp. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Fetch live docs:
https://paymentauth.org/ for canonical security and encoding requirementssite:datatracker.ietf.org draft-ryan-httpauth-payment for the latest RFC drafthttps://docs.stripe.com/payments/machine/mpp for production integration patternssite:npmjs.com mppx for error handling and retry APIsThe 32-byte secretKey is the server's core security primitive:
openssl rand -hex 32const mppx = Mppx.create({
secretKey: process.env.MPP_SECRET_KEY, // 32-byte hex
methods: [/* ... */],
});
Single-use proof semantics prevent double-payment:
MPP mandates TLS 1.2+ (TLS 1.3 recommended):
Cache-Control: no-store on all responses containing credentialsRFC 8785 canonical JSON is required for deterministic encoding:
MPP uses RFC 9457 Problem Details for error responses:
{
"type": "https://paymentauth.org/problems/payment-required",
"status": 402,
"detail": "Payment is required.",
"challengeId": "..."
}
Error types:
payment-required — Normal challenge, no payment attempted yetverification-failed — Invalid proof of paymentpayment-expired — Challenge or credential expiredmalformed-credential — Cannot parse the credentialClient retry strategy:
payment-required — Normal flow, fulfill and retryverification-failed — Do NOT retry with same credential (likely invalid)payment-expired — Request a fresh challengemalformed-credential — Fix credential encoding, do not retry blindlyThe Payment-Receipt header proves delivery:
Even with payments, implement rate limiting:
Retry-After header when exceededRetry-After, add jitterMPP_SECRET_KEY — 32-byte hex, rotate periodicallySTRIPE_SECRET_KEY — Stripe API key, never in codeWALLET_PRIVATE_KEY — Crypto wallet key, use key management service.env files for development, secrets manager for production/openapi.json, /llms.txt) — cache aggressivelyCache-Control: no-store)Fetch the latest MPP specification and IETF draft for current security requirements, encoding rules, and best practices before implementing.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub orcaqubits/agentic-commerce-skills-plugins --plugin stripe-mpp12 skills in this plugin
/mpp-charge-flowImplement MPP one-time charge payment flows — per-request payment gates for API monetization, data access, and file downloads. Use when building pay-per-call APIs or protecting individual resources with HTTP 402 charges./mpp-client-fetchImplement MPP client-side payment handling with mppx.fetch(). Use when building AI agents or automated clients that consume 402-protected APIs, handling the transparent challenge-response payment flow./mpp-conformanceValidate MPP implementations against the specification — verify HTTP 402 challenge-response compliance, header formats, payment method correctness, service discovery, and production readiness. Use when auditing an MPP integration or preparing for production launch./mpp-proxyImplement MPP payment proxies — wrap existing APIs with HTTP 402 payment gates without modifying the upstream service. Use when monetizing third-party APIs, adding payment layers to existing services, or building API marketplaces./mpp-server-middlewareImplement MPP server-side middleware for Hono, Express, Next.js, and Elysia. Use when protecting API routes with HTTP 402 payment gates, configuring payment methods, or setting up the Mppx server instance./mpp-service-discoveryImplement MPP service discovery — OpenAPI documents with x-payment-info extensions, x-service-info metadata, and llms.txt for autonomous agent discovery. Use when publishing paid API metadata for AI agents to find and pay for your services.Other plugins' skills for the same job