/stripe-mpp:mpp-proxyfrom stripe-mpp
Wraps existing APIs with HTTP 402 payment gates using mppx, enabling API monetization and marketplace patterns without modifying upstream services.
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://www.npmjs.com/package/mppx for the proxy handler API and configurationmppx proxy payment 402 existing API monetize for proxy implementation patternssite:github.com stripe-samples machine-payments proxy for official proxy sample codehttps://developers.cloudflare.com/agents/agentic-payments/mpp/ for Cloudflare Workers proxy patternsThe MPP proxy wraps an existing upstream API with a payment gate, requiring clients to pay before their requests are forwarded. The upstream API is unmodified — it never sees the payment flow.
Client → MPP Proxy (402 challenge-response) → Upstream API
↑ payment gate ↑ unmodified
┌──────────────┐ ┌──────────────────────┐ ┌──────────────┐
│ AI Agent │────→│ MPP Proxy │────→│ Upstream │
│ (Client) │←────│ 1. 402 Challenge │←────│ API │
│ │ │ 2. Verify Payment │ │ (Unmodified)│
│ │ │ 3. Forward Request │ │ │
│ │ │ 4. Return + Receipt │ │ │
└──────────────┘ └──────────────────────┘ └──────────────┘
The mppx SDK provides a dedicated proxy handler:
import { Mppx, tempo } from 'mppx/server';
const mppx = Mppx.create({
secretKey: process.env.MPP_SECRET_KEY,
methods: [tempo.charge({ /* config */ })],
});
// Proxy all requests to upstream with payment gate
app.all('/api/*', mppx.charge({ amount: '100' }), async (c) => {
const upstreamUrl = `https://upstream-api.com${c.req.path}`;
const response = await fetch(upstreamUrl, {
method: c.req.method,
headers: c.req.headers,
body: c.req.method !== 'GET' ? await c.req.text() : undefined,
});
return new Response(response.body, {
status: response.status,
headers: response.headers,
});
});
For edge-deployed proxies:
// Cloudflare Workers + MPP proxy pattern
export default {
async fetch(request, env) {
// MPP middleware handles 402 challenge-response
// On successful payment, forwards to upstream
}
};
| Strategy | Description |
|---|---|
| Flat rate | Same price for all requests |
| Endpoint-based | Different prices per API route |
| Payload-based | Price varies by request/response size |
| Metered | Session-based, charged per unit consumed |
| Tiered | Volume discounts (first 100 at $X, next 1000 at $Y) |
Authorization: Payment)Payment-Receipt header to upstream responseRoute to different upstreams based on the path:
const upstreams = {
'/ai/': 'https://api.openai.com',
'/data/': 'https://api.data-vendor.com',
'/search/': 'https://api.search-engine.com',
};
/openapi.json) describing proxied endpointsFetch the latest mppx proxy documentation and Cloudflare MPP integration guide for exact proxy API, configuration options, and edge deployment patterns 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-dev-patternsCross-cutting MPP development patterns — security, replay protection, HMAC challenge binding, receipt validation, error handling, retry logic, TLS requirements, and monitoring. Use when designing architecture or solving production concerns./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