Stripe Provider
Stripe is one of the most popular payment processors globally, supporting credit cards, ACH transfers, and international payments in 40+ countries.
Features
- Global Coverage - Accept payments in 135+ currencies
- Payment Methods - Cards, bank transfers, digital wallets
Quick Setup
1. Get Your API Keys
- Sign up at stripe.com
- Navigate to Developers → API Keys
- Copy your Secret Key (starts with
sk_test_for testing)
2. Configuration
- Python
- TypeScript
from paymcp.providers import StripeProvider
PayMCP(mcp, providers=[StripeProvider(apiKey="sk_test_...")])
import { installPayMCP } from 'paymcp';
import { StripeProvider } from 'paymcp/providers';
installPayMCP(mcp, { providers: [new StripeProvider({ apiKey: "sk_test_..." })] });
3. Test Your Integration
@mcp.tool()
@price(amount=0.50, currency="USD")
def test_stripe_payment(message: str, ctx: Context) -> str:
"""Test Stripe payment integration"""
return f"Stripe payment successful: {message}"
Test with Stripe's test card: 4242 4242 4242 4242
Subscriptions
You can also gate tools behind active Stripe subscriptions:
- Python
- TypeScript
from paymcp import subscription
@mcp.tool()
@subscription(plan="price_pro_monthly") # or a list of accepted plan IDs
async def generate_report(ctx: Context) -> str:
return "Your report"
server.registerTool(
"generate_report",
{
title: "Generate report",
description: "Requires an active Pro subscription.",
_meta: { subscription: { plan: "price_pro_monthly" } }, // or an array of accepted plan ids
},
async (extra) => {
return { content: [{ type: "text", text: "Your report" }] };
}
);
Support
- Stripe Documentation: stripe.com/docs
- PayMCP Issues: GitHub Issues
- Stripe Support: Available in your Stripe Dashboard