Stripe MPP Payment Method

VerifiedSafe

Configure Stripe as an MPP payment method using Shared Payment Tokens (SPTs) for card and wallet payments in machine-to-machine transactions.

Sby Skills Guide Bot
DevelopmentAdvanced
7/25/2026
Claude CodeCursorCodex
#stripe#payments#http-402#shared-payment-tokens#machine-to-machine

Recommended for

Automated summary

Configures Stripe as an MPP payment method so agents can pay for machine-to-machine resources by card or wallet through Shared Payment Tokens layered on the HTTP 402 flow.

Strengths

  • Maps the full 402 → SPT → PaymentIntent sequence with concrete endpoints and parameters
  • Explains the SPT lifecycle (single-use, amount-capped, time-bound) and the four related webhook events
  • Shows the mppx server configuration and how to combine Stripe with Tempo for multiple payment methods
  • Requires fetching current Stripe docs before writing any code

Limitations

  • SPT creation uses a test-helper endpoint; the production issuance path is not covered
  • No guidance on error handling, retries, refunds, or idempotency
  • Configuration snippets are partial with commented-out sections, so no end-to-end runnable example is provided
When to use it

Use when adding card or wallet payments as a settlement method for M2M agent requests in an MPP service built on HTTP 402.

When not to use it

Don't use for ordinary e-commerce checkout, subscriptions, or crypto-only Tempo flows that never involve Stripe SPTs.

Security analysis

Safe
Quality score82/100

The skill is largely documentation and configuration guidance for Stripe/MPP integration. It uses environment variables for secrets, stays in Stripe test mode, and includes an explicit prohibition on logging card data. Tool declarations (Bash, WebFetch) are only used to fetch live docs and demonstrate API calls, with no destructive, exfiltrating, or obfuscated behavior.

Findings
  • •Declares Bash/WebFetch/WebSearch but only uses them to fetch Stripe documentation and illustrate API calls — no destructive or obfuscated actions.
  • •Payment API calls rely on process.env.MPP_SECRET_KEY; ensure the secret is never committed or logged, and default to Stripe test mode (examples use test_helpers/pm_card_visa).
  • •Explicitly warns against logging full card numbers/CVCs, which is good PCI hygiene.
  • •No curl|sh, no rm -rf, no base64 payloads, no secret exfiltration or safety-disabling instructions.
How this analysis is made

Examples

Add Stripe to an mppx server
Add Stripe card payments to my mppx server so agents can pay for /api/report with an SPT. Show the stripe.charge() configuration plus the PaymentIntent creation with shared_payment_granted_token.
Agent-side SPT creation and replay
Write the agent-side code that creates a Stripe Shared Payment Token with a $5 max amount in USD expiring in 10 minutes, scoped to seller network id acct_123, then retries the 402 challenge endpoint with that SPT credential.
Track SPT lifecycle via webhooks
Set up handlers for shared_payment.granted_token.used and shared_payment.granted_token.deactivated so I can log each SPT consumption and revoke access when a token expires.

name: mpp-stripe-method description: Configure Stripe as an MPP payment method — card and wallet payments via Shared Payment Tokens (SPTs), integrating MPP's HTTP 402 flow with Stripe's payment infrastructure. Use when enabling fiat/card payments for machine-to-machine transactions. allowed-tools: Read, Write, Edit, Bash, Grep, Glob, WebSearch, WebFetch

MPP Stripe Payment Method (Cards via SPTs)

Before writing code

Fetch live docs:

  1. Fetch https://docs.stripe.com/agentic-commerce/concepts/shared-payment-tokens for the latest SPT API
  2. Fetch https://docs.stripe.com/payments/machine/mpp for MPP + Stripe integration
  3. Web-search site:docs.stripe.com shared_payment granted_token for SPT creation and usage API
  4. Web-search mppx stripe payment method server configuration for mppx Stripe adapter setup

Conceptual Architecture

What Stripe Method Does in MPP

The Stripe payment method enables fiat/card payments within the MPP protocol. Instead of on-chain crypto transactions, the payment proof is a Shared Payment Token (SPT) — a one-time, merchant-scoped, amount-limited token that Stripe processes as a standard charge.

Flow: MPP + Stripe SPT

1. Agent → Server:        GET /resource
2. Server → Agent:        402 with Stripe payment challenge
3. Agent → Stripe:        Create SPT (or use pre-provisioned SPT)
4. Agent → Server:        GET /resource with SPT credential
5. Server → Stripe:       PaymentIntent.create with shared_payment_granted_token
6. Stripe → Server:       Payment confirmed
7. Server → Agent:        200 OK with Payment-Receipt

SPT Structure

{
  "id": "spt_...",
  "usage_limits": {
    "currency": "usd",
    "max_amount": 1000,
    "expires_at": 1711234567
  },
  "deactivated_at": null,
  "deactivated_reason": null
}

SPT Creation (Agent-Side)

POST https://api.stripe.com/v1/test_helpers/shared_payment/granted_tokens

Parameters:
  payment_method: pm_card_visa
  usage_limits[currency]: usd
  usage_limits[max_amount]: 1000
  usage_limits[expires_at]: <unix_timestamp>
  seller_details[network_id]: <seller_network_id>
  seller_details[external_id]: <optional_external_id>

SPT Consumption (Server-Side)

POST https://api.stripe.com/v1/payment_intents

Parameters:
  amount: 500
  currency: usd
  shared_payment_granted_token: spt_...
  confirm: true

Server-Side mppx Configuration

import { Mppx, stripe } from 'mppx/server';

const mppx = Mppx.create({
  secretKey: process.env.MPP_SECRET_KEY,
  methods: [
    stripe.charge({
      // Stripe configuration for MPP
      // Automatically creates PaymentIntents when valid SPT credentials arrive
    }),
  ],
});

SPT Properties

  • Single-use — Can only be charged once
  • Time-bound — Agent-defined expiration window
  • Amount-limited — Cannot exceed max_amount
  • Currency-restricted — Only functions in specified currency
  • Seller-scoped — network_id isolates tokens to specific merchants

SPT Webhook Events

| Event | Recipient | Trigger | |-------|-----------|---------| | shared_payment.granted_token.used | Seller | SPT successfully consumed | | shared_payment.granted_token.deactivated | Seller | SPT revoked or expired | | shared_payment.issued_token.used | Agent | Seller consumed the SPT | | shared_payment.issued_token.deactivated | Agent | SPT no longer valid |

Multi-Method Support

Combine Stripe with Tempo for maximum flexibility:

const mppx = Mppx.create({
  secretKey: process.env.MPP_SECRET_KEY,
  methods: [
    tempo.charge({ /* Tempo config */ }),
    stripe.charge({ /* Stripe config */ }),
  ],
});

Clients choose their preferred method when fulfilling the challenge.

Best Practices

  • Set SPT max_amount to the exact payment amount (not higher)
  • Set short expiration times — just enough for the payment to complete
  • Implement SPT webhook listeners for lifecycle tracking
  • Log SPT creation and usage for reconciliation (without sensitive data)
  • Handle SPT expiration gracefully — re-provision if needed
  • Never log full card numbers or CVCs (SPTs abstract away PCI data)

Fetch the latest Stripe SPT API documentation and mppx Stripe adapter docs for exact endpoint paths, request schemas, and configuration options before implementing.

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/stripe-mpp-payment-method-mrzxuq10/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/stripe-mpp-payment-method-mrzxuq10' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/stripe-mpp-payment-method-mrzxuq10/download' --output '.skill-downloads/stripe-mpp-payment-method-mrzxuq10/SKILL.md.part' && mv '.skill-downloads/stripe-mpp-payment-method-mrzxuq10/SKILL.md.part' '.skill-downloads/stripe-mpp-payment-method-mrzxuq10/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Tools declared by the author (check availability in your agent): Read, Write, Edit, Bash, Grep, Glob, WebSearch, WebFetch

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/stripe-mpp-payment-method-mrzxuq10/SKILL.md' && test -s '.skill-downloads/stripe-mpp-payment-method-mrzxuq10/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/mpp-stripe-method' && cp -R '.skill-downloads/stripe-mpp-payment-method-mrzxuq10' '.claude/skills/mpp-stripe-method'

Cursor
test -f '.skill-downloads/stripe-mpp-payment-method-mrzxuq10/SKILL.md' && test -s '.skill-downloads/stripe-mpp-payment-method-mrzxuq10/SKILL.md' && mkdir -p '.cursor/skills' && test ! -e '.cursor/skills/mpp-stripe-method' && cp -R '.skill-downloads/stripe-mpp-payment-method-mrzxuq10' '.cursor/skills/mpp-stripe-method'

Codex
test -f '.skill-downloads/stripe-mpp-payment-method-mrzxuq10/SKILL.md' && test -s '.skill-downloads/stripe-mpp-payment-method-mrzxuq10/SKILL.md' && mkdir -p '.agents/skills' && test ! -e '.agents/skills/mpp-stripe-method' && cp -R '.skill-downloads/stripe-mpp-payment-method-mrzxuq10' '.agents/skills/mpp-stripe-method'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/stripe-mpp-payment-method-mrzxuq10'

openskills read 'stripe-mpp-payment-method-mrzxuq10'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/stripe-mpp-payment-method-mrzxuq10/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills