/stripe-mpp:mpp-charge-flowfrom stripe-mpp
Implements MPP one-time charge payment flows for per-request API monetization, data access, and file downloads using HTTP 402 Payment Required.
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 charge middleware API and configurationhttps://paymentauth.org/ for the canonical charge intent specificationsite:github.com stripe-samples machine-payments charge for charge flow sample codehttps://docs.stripe.com/payments/machine/mpp for Stripe charge integration detailsThe charge intent implements immediate, per-request settlement. Each API call triggers a single payment. The flow is:
Client: GET /api/data
Server: 402 Payment Required
WWW-Authenticate: Payment <challenge with intent="charge">
Client: Fulfills payment (on-chain tx or card charge)
Client: GET /api/data
Authorization: Payment <credential with proof>
Server: 200 OK
Payment-Receipt: <receipt>
// Protect a route with a charge gate
app.get('/api/data', mppx.charge({ amount: '100' }), async (c) => {
// Only reached after successful payment
return c.json({ data: 'premium content' });
});
The amount is specified in the smallest unit of the payment method's currency.
For routes where the price depends on the request:
app.get('/api/data/:size', async (c, next) => {
const size = c.req.param('size');
const amount = calculatePrice(size);
return mppx.charge({ amount: String(amount) })(c, next);
}, async (c) => {
return c.json({ data: 'variable-price content' });
});
WWW-Authenticate header with 402 status| Payment Method | Unit | Example: $0.01 |
|---|---|---|
| Tempo (USDC) | Smallest token unit | Verify in SDK docs |
| Stripe | Cents (minor currency unit) | 100 (1 USD cent = 100) |
| Lightning | Millisatoshis | Varies |
Always verify the exact unit convention in the SDK documentation for your payment method.
| Scenario | Server Response |
|---|---|
| No payment header | 402 with payment-required challenge |
| Payment amount too low | 402 with verification-failed |
| Payment to wrong address | 402 with verification-failed |
| Expired challenge | 402 with payment-expired |
| Duplicate credential (replay) | 402 with verification-failed |
| Successful payment | 200 with Payment-Receipt |
Fetch the latest mppx SDK docs and payment method documentation for exact charge configuration options and amount unit conventions before implementing.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
12 skills in this plugin
/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.npx claudepluginhub orcaqubits/agentic-commerce-skills-plugins --plugin stripe-mppOther plugins' skills for the same job